diff options
Diffstat (limited to 'src/messenger/gnunet-service-messenger_handle.h')
-rw-r--r-- | src/messenger/gnunet-service-messenger_handle.h | 40 |
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 | */ |
62 | struct GNUNET_MESSENGER_SrvHandle* | 62 | struct GNUNET_MESSENGER_SrvHandle* |
63 | create_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MQ_Handle *mq); | 63 | create_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 | */ |
81 | void | 82 | void |
82 | get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle, const char *name, char **dir); | 83 | get_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 | */ |
93 | const struct GNUNET_ShortHashCode* | 96 | const struct GNUNET_ShortHashCode* |
94 | get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); | 97 | get_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 | */ |
107 | int | 111 | int |
108 | change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, | 112 | change_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 | */ |
117 | void | 122 | void |
118 | set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_MESSENGER_Ego *ego); | 123 | set_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 | */ |
135 | void | 141 | void |
136 | setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, const char *name); | 142 | setup_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 | */ |
156 | void | 163 | void |
157 | set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, const char *name); | 164 | set_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 | */ |
167 | int | 175 | int |
168 | open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); | 176 | open_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 | */ |
179 | int | 188 | int |
180 | entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_PeerIdentity *door, | 189 | entry_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 | */ |
191 | int | 201 | int |
192 | close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key); | 202 | close_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 | */ |
202 | int | 213 | int |
203 | send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, | 214 | send_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 | */ |
215 | void | 227 | void |
216 | notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, const struct GNUNET_HashCode *key, | 228 | notify_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 |