aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/gnunet-service-messenger_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/messenger/gnunet-service-messenger_service.c')
-rw-r--r--src/messenger/gnunet-service-messenger_service.c37
1 files changed, 25 insertions, 12 deletions
diff --git a/src/messenger/gnunet-service-messenger_service.c b/src/messenger/gnunet-service-messenger_service.c
index 8c63e9bf4..91165cf63 100644
--- a/src/messenger/gnunet-service-messenger_service.c
+++ b/src/messenger/gnunet-service-messenger_service.c
@@ -41,7 +41,8 @@ callback_shutdown_service (void *cls)
41} 41}
42 42
43struct GNUNET_MESSENGER_Service* 43struct GNUNET_MESSENGER_Service*
44create_service (const struct GNUNET_CONFIGURATION_Handle *config, struct GNUNET_SERVICE_Handle *service_handle) 44create_service (const struct GNUNET_CONFIGURATION_Handle *config,
45 struct GNUNET_SERVICE_Handle *service_handle)
45{ 46{
46 GNUNET_assert((config) && (service_handle)); 47 GNUNET_assert((config) && (service_handle));
47 48
@@ -88,7 +89,9 @@ create_service (const struct GNUNET_CONFIGURATION_Handle *config, struct GNUNET_
88} 89}
89 90
90static int 91static int
91iterate_destroy_rooms (void *cls, const struct GNUNET_HashCode *key, void *value) 92iterate_destroy_rooms (void *cls,
93 const struct GNUNET_HashCode *key,
94 void *value)
92{ 95{
93 struct GNUNET_MESSENGER_SrvRoom *room = value; 96 struct GNUNET_MESSENGER_SrvRoom *room = value;
94 destroy_room (room); 97 destroy_room (room);
@@ -151,7 +154,8 @@ get_service_contact_store (struct GNUNET_MESSENGER_Service *service)
151} 154}
152 155
153struct GNUNET_MESSENGER_SrvHandle* 156struct GNUNET_MESSENGER_SrvHandle*
154add_service_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MQ_Handle *mq) 157add_service_handle (struct GNUNET_MESSENGER_Service *service,
158 struct GNUNET_MQ_Handle *mq)
155{ 159{
156 GNUNET_assert((service) && (mq)); 160 GNUNET_assert((service) && (mq));
157 161
@@ -166,7 +170,8 @@ add_service_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MQ_H
166} 170}
167 171
168void 172void
169remove_service_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSENGER_SrvHandle *handle) 173remove_service_handle (struct GNUNET_MESSENGER_Service *service,
174 struct GNUNET_MESSENGER_SrvHandle *handle)
170{ 175{
171 GNUNET_assert((service) && (handle)); 176 GNUNET_assert((service) && (handle));
172 177
@@ -178,7 +183,8 @@ remove_service_handle (struct GNUNET_MESSENGER_Service *service, struct GNUNET_M
178} 183}
179 184
180int 185int
181get_service_peer_identity (const struct GNUNET_MESSENGER_Service *service, struct GNUNET_PeerIdentity *peer) 186get_service_peer_identity (const struct GNUNET_MESSENGER_Service *service,
187 struct GNUNET_PeerIdentity *peer)
182{ 188{
183 GNUNET_assert((service) && (peer)); 189 GNUNET_assert((service) && (peer));
184 190
@@ -186,7 +192,8 @@ get_service_peer_identity (const struct GNUNET_MESSENGER_Service *service, struc
186} 192}
187 193
188struct GNUNET_MESSENGER_SrvRoom* 194struct GNUNET_MESSENGER_SrvRoom*
189get_service_room (const struct GNUNET_MESSENGER_Service *service, const struct GNUNET_HashCode *key) 195get_service_room (const struct GNUNET_MESSENGER_Service *service,
196 const struct GNUNET_HashCode *key)
190{ 197{
191 GNUNET_assert((service) && (key)); 198 GNUNET_assert((service) && (key));
192 199
@@ -194,7 +201,8 @@ get_service_room (const struct GNUNET_MESSENGER_Service *service, const struct G
194} 201}
195 202
196int 203int
197open_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSENGER_SrvHandle *handle, 204open_service_room (struct GNUNET_MESSENGER_Service *service,
205 struct GNUNET_MESSENGER_SrvHandle *handle,
198 const struct GNUNET_HashCode *key) 206 const struct GNUNET_HashCode *key)
199{ 207{
200 GNUNET_assert((service) && (handle) && (key)); 208 GNUNET_assert((service) && (handle) && (key));
@@ -217,8 +225,10 @@ open_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSE
217} 225}
218 226
219int 227int
220entry_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSENGER_SrvHandle *handle, 228entry_service_room (struct GNUNET_MESSENGER_Service *service,
221 const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key) 229 struct GNUNET_MESSENGER_SrvHandle *handle,
230 const struct GNUNET_PeerIdentity *door,
231 const struct GNUNET_HashCode *key)
222{ 232{
223 GNUNET_assert((service) && (handle) && (door) && (key)); 233 GNUNET_assert((service) && (handle) && (door) && (key));
224 234
@@ -250,7 +260,8 @@ entry_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESS
250} 260}
251 261
252int 262int
253close_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSENGER_SrvHandle *handle, 263close_service_room (struct GNUNET_MESSENGER_Service *service,
264 struct GNUNET_MESSENGER_SrvHandle *handle,
254 const struct GNUNET_HashCode *key) 265 const struct GNUNET_HashCode *key)
255{ 266{
256 GNUNET_assert((service) && (handle) && (key)); 267 GNUNET_assert((service) && (handle) && (key));
@@ -290,9 +301,11 @@ close_service_room (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESS
290} 301}
291 302
292void 303void
293handle_service_message (struct GNUNET_MESSENGER_Service *service, struct GNUNET_MESSENGER_SrvRoom *room, 304handle_service_message (struct GNUNET_MESSENGER_Service *service,
305 struct GNUNET_MESSENGER_SrvRoom *room,
294 const struct GNUNET_MESSENGER_MemberSession *session, 306 const struct GNUNET_MESSENGER_MemberSession *session,
295 const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash) 307 const struct GNUNET_MESSENGER_Message *message,
308 const struct GNUNET_HashCode *hash)
296{ 309{
297 GNUNET_assert((service) && (room) && (session) && (message) && (hash)); 310 GNUNET_assert((service) && (room) && (session) && (message) && (hash));
298 311