aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_handle.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_handle.h')
-rw-r--r--src/messenger/gnunet-service-messenger_handle.h40
1 files changed, 27 insertions, 13 deletions
diff --git a/src/messenger/gnunet-service-messenger_handle.h b/src/messenger/gnunet-service-messenger_handle.h
index d8ff3aaa8..97a984721 100644
--- a/src/messenger/gnunet-service-messenger_handle.h
+++ b/src/messenger/gnunet-service-messenger_handle.h
@@ -60,7 +60,8 @@ struct GNUNET_MESSENGER_SrvHandle
60 * @return New handle 60 * @return New handle
61 */ 61 */
62struct GNUNET_MESSENGER_SrvHandle* 62struct GNUNET_MESSENGER_SrvHandle*
63create_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MQ_Handle *mq); 63create_handle (struct GNUNET_MESSENGER_Service *service,
64 struct GNUNET_MQ_Handle *mq);
64 65
65/** 66/**
66 * Destroys a handle and frees its memory fully. 67 * Destroys a handle and frees its memory fully.
@@ -79,7 +80,9 @@ destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
79 * @param[out] dir Path to store data 80 * @param[out] dir Path to store data
80 */ 81 */
81void 82void
82get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle, const char *name, char **dir); 83get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
84 const char *name,
85 char **dir);
83 86
84/** 87/**
85 * Returns the member id of a given <i>handle</i> in a specific <i>room</i>. 88 * Returns the member id of a given <i>handle</i> in a specific <i>room</i>.
@@ -91,7 +94,8 @@ get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle, const c
91 * @return Member id or NULL 94 * @return Member id or NULL
92 */ 95 */
93const struct GNUNET_ShortHashCode* 96const struct GNUNET_ShortHashCode*
94get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); 97get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
98 const struct GNUNET_HashCode *key);
95 99
96/** 100/**
97 * Changes the member id of a given <i>handle</i> in a specific <i>room</i> to match a <i>unique_id</i> 101 * Changes the member id of a given <i>handle</i> in a specific <i>room</i> to match a <i>unique_id</i>
@@ -105,7 +109,8 @@ get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, const str
105 * @return GNUNET_OK on success, otherwise GNUNET_SYSERR 109 * @return GNUNET_OK on success, otherwise GNUNET_SYSERR
106 */ 110 */
107int 111int
108change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, 112change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
113 const struct GNUNET_HashCode *key,
109 const struct GNUNET_ShortHashCode *unique_id); 114 const struct GNUNET_ShortHashCode *unique_id);
110 115
111/** 116/**
@@ -115,7 +120,8 @@ change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, const struct
115 * @param[in] ego EGO key pair 120 * @param[in] ego EGO key pair
116 */ 121 */
117void 122void
118set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_MESSENGER_Ego *ego); 123set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
124 const struct GNUNET_MESSENGER_Ego *ego);
119 125
120/** 126/**
121 * Returns the EGO used by a given <i>handle</i>. 127 * Returns the EGO used by a given <i>handle</i>.
@@ -133,7 +139,8 @@ get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle);
133 * @param[in] name Name (optionally: valid EGO name) 139 * @param[in] name Name (optionally: valid EGO name)
134 */ 140 */
135void 141void
136setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, const char *name); 142setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
143 const char *name);
137 144
138/** 145/**
139 * Tries to change the key pair of an EGO of a <i>handle</i> under the same name and informs all rooms 146 * Tries to change the key pair of an EGO of a <i>handle</i> under the same name and informs all rooms
@@ -154,7 +161,8 @@ update_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
154 * @param[in] name New name 161 * @param[in] name New name
155 */ 162 */
156void 163void
157set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, const char *name); 164set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
165 const char *name);
158 166
159/** 167/**
160 * Makes a given <i>handle</i> a member of the room using a specific <i>key</i> and opens the 168 * Makes a given <i>handle</i> a member of the room using a specific <i>key</i> and opens the
@@ -165,7 +173,8 @@ set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, const char *name);
165 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 173 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
166 */ 174 */
167int 175int
168open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); 176open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
177 const struct GNUNET_HashCode *key);
169 178
170/** 179/**
171 * Makes a given <i>handle</i> a member of the room using a specific <i>key</i> and enters the room 180 * Makes a given <i>handle</i> a member of the room using a specific <i>key</i> and enters the room
@@ -177,7 +186,8 @@ open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET
177 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 186 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
178 */ 187 */
179int 188int
180entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_PeerIdentity *door, 189entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
190 const struct GNUNET_PeerIdentity *door,
181 const struct GNUNET_HashCode *key); 191 const struct GNUNET_HashCode *key);
182 192
183/** 193/**
@@ -189,7 +199,8 @@ entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNE
189 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 199 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
190 */ 200 */
191int 201int
192close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); 202close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
203 const struct GNUNET_HashCode *key);
193 204
194/** 205/**
195 * Sends a <i>message</i> from a given <i>handle</i> to the room using a specific <i>key</i>. 206 * Sends a <i>message</i> from a given <i>handle</i> to the room using a specific <i>key</i>.
@@ -200,7 +211,8 @@ close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNE
200 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise. 211 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise.
201 */ 212 */
202int 213int
203send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, 214send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
215 const struct GNUNET_HashCode *key,
204 const struct GNUNET_MESSENGER_Message *message); 216 const struct GNUNET_MESSENGER_Message *message);
205 217
206/** 218/**
@@ -213,9 +225,11 @@ send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNU
213 * @param[in] hash Hash of message 225 * @param[in] hash Hash of message
214 */ 226 */
215void 227void
216notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, 228notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
229 const struct GNUNET_HashCode *key,
217 const struct GNUNET_MESSENGER_MemberSession *session, 230 const struct GNUNET_MESSENGER_MemberSession *session,
218 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash); 231 const struct GNUNET_MESSENGER_Message *message,
232 const struct GNUNET_HashCode *hash);
219 233
220/** 234/**
221 * Loads member ids and other potential configuration from a given <i>handle</i> which 235 * Loads member ids and other potential configuration from a given <i>handle</i> which