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.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/messenger/gnunet-service-messenger_handle.h b/src/messenger/gnunet-service-messenger_handle.h
index 4438570b9..8754716e9 100644
--- a/src/messenger/gnunet-service-messenger_handle.h
+++ b/src/messenger/gnunet-service-messenger_handle.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2020--2021 GNUnet e.V. 3 Copyright (C) 2020--2022 GNUnet e.V.
4 4
5 GNUnet is free software: you can redistribute it and/or modify it 5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published 6 under the terms of the GNU Affero General Public License as published
@@ -60,8 +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, 63create_srv_handle (struct GNUNET_MESSENGER_Service *service,
64 struct GNUNET_MQ_Handle *mq); 64 struct GNUNET_MQ_Handle *mq);
65 65
66/** 66/**
67 * Destroys a handle and frees its memory fully. 67 * Destroys a handle and frees its memory fully.
@@ -69,7 +69,7 @@ create_handle (struct GNUNET_MESSENGER_Service *service,
69 * @param[in/out] handle Handle 69 * @param[in/out] handle Handle
70 */ 70 */
71void 71void
72destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle); 72destroy_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
73 73
74/** 74/**
75 * Writes the path of the directory for a given <i>handle</i> using a specific <i>name</i> to the parameter 75 * Writes the path of the directory for a given <i>handle</i> using a specific <i>name</i> to the parameter
@@ -80,7 +80,7 @@ destroy_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
80 * @param[out] dir Path to store data 80 * @param[out] dir Path to store data
81 */ 81 */
82void 82void
83get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle, 83get_srv_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
84 const char *name, 84 const char *name,
85 char **dir); 85 char **dir);
86 86
@@ -94,8 +94,8 @@ get_handle_data_subdir (const struct GNUNET_MESSENGER_SrvHandle *handle,
94 * @return Member id or NULL 94 * @return Member id or NULL
95 */ 95 */
96const struct GNUNET_ShortHashCode* 96const struct GNUNET_ShortHashCode*
97get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle, 97get_srv_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
98 const struct GNUNET_HashCode *key); 98 const struct GNUNET_HashCode *key);
99 99
100/** 100/**
101 * 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>
@@ -109,9 +109,9 @@ get_handle_member_id (const struct GNUNET_MESSENGER_SrvHandle *handle,
109 * @return GNUNET_OK on success, otherwise GNUNET_SYSERR 109 * @return GNUNET_OK on success, otherwise GNUNET_SYSERR
110 */ 110 */
111int 111int
112change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle, 112change_srv_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
113 const struct GNUNET_HashCode *key, 113 const struct GNUNET_HashCode *key,
114 const struct GNUNET_ShortHashCode *unique_id); 114 const struct GNUNET_ShortHashCode *unique_id);
115 115
116/** 116/**
117 * Sets the EGO used by a given <i>handle</i>. 117 * Sets the EGO used by a given <i>handle</i>.
@@ -120,8 +120,8 @@ change_handle_member_id (struct GNUNET_MESSENGER_SrvHandle *handle,
120 * @param[in] ego EGO key pair 120 * @param[in] ego EGO key pair
121 */ 121 */
122void 122void
123set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle, 123set_srv_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
124 const struct GNUNET_MESSENGER_Ego *ego); 124 const struct GNUNET_MESSENGER_Ego *ego);
125 125
126/** 126/**
127 * Returns the EGO used by a given <i>handle</i>. 127 * Returns the EGO used by a given <i>handle</i>.
@@ -130,7 +130,7 @@ set_handle_ego (struct GNUNET_MESSENGER_SrvHandle *handle,
130 * @return EGO key pair 130 * @return EGO key pair
131 */ 131 */
132const struct GNUNET_MESSENGER_Ego* 132const struct GNUNET_MESSENGER_Ego*
133get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle); 133get_srv_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle);
134 134
135/** 135/**
136 * Tries to set the name and EGO key of a <i>handle</i> initially by looking up a specific <i>name</i>. 136 * Tries to set the name and EGO key of a <i>handle</i> initially by looking up a specific <i>name</i>.
@@ -139,8 +139,8 @@ get_handle_ego (const struct GNUNET_MESSENGER_SrvHandle *handle);
139 * @param[in] name Name (optionally: valid EGO name) 139 * @param[in] name Name (optionally: valid EGO name)
140 */ 140 */
141void 141void
142setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, 142setup_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
143 const char *name); 143 const char *name);
144 144
145/** 145/**
146 * 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
@@ -149,7 +149,7 @@ setup_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
149 * @param[in/out] handle Handle 149 * @param[in/out] handle Handle
150 */ 150 */
151void 151void
152update_handle (struct GNUNET_MESSENGER_SrvHandle *handle); 152update_srv_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
153 153
154/** 154/**
155 * Tries to rename the handle which implies renaming the EGO its using and moving all related data into 155 * Tries to rename the handle which implies renaming the EGO its using and moving all related data into
@@ -161,8 +161,8 @@ update_handle (struct GNUNET_MESSENGER_SrvHandle *handle);
161 * @param[in] name New name 161 * @param[in] name New name
162 */ 162 */
163void 163void
164set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle, 164set_srv_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
165 const char *name); 165 const char *name);
166 166
167/** 167/**
168 * 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
@@ -173,8 +173,8 @@ set_handle_name (struct GNUNET_MESSENGER_SrvHandle *handle,
173 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 173 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
174 */ 174 */
175int 175int
176open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, 176open_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
177 const struct GNUNET_HashCode *key); 177 const struct GNUNET_HashCode *key);
178 178
179/** 179/**
180 * 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
@@ -186,9 +186,9 @@ open_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
186 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 186 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
187 */ 187 */
188int 188int
189entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, 189entry_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
190 const struct GNUNET_PeerIdentity *door, 190 const struct GNUNET_PeerIdentity *door,
191 const struct GNUNET_HashCode *key); 191 const struct GNUNET_HashCode *key);
192 192
193/** 193/**
194 * Removes the membership of the room using a specific <i>key</i> and closes it if no other handle 194 * Removes the membership of the room using a specific <i>key</i> and closes it if no other handle
@@ -199,8 +199,8 @@ entry_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
199 * @return #GNUNET_YES on success, otherwise #GNUNET_NO 199 * @return #GNUNET_YES on success, otherwise #GNUNET_NO
200 */ 200 */
201int 201int
202close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle, 202close_srv_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
203 const struct GNUNET_HashCode *key); 203 const struct GNUNET_HashCode *key);
204 204
205/** 205/**
206 * 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>.
@@ -211,9 +211,9 @@ close_handle_room (struct GNUNET_MESSENGER_SrvHandle *handle,
211 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise. 211 * @return #GNUNET_YES on success, #GNUNET_NO or #GNUNET_SYSERR otherwise.
212 */ 212 */
213int 213int
214send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, 214send_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
215 const struct GNUNET_HashCode *key, 215 const struct GNUNET_HashCode *key,
216 const struct GNUNET_MESSENGER_Message *message); 216 const struct GNUNET_MESSENGER_Message *message);
217 217
218/** 218/**
219 * Notifies the handle that a new message was received or sent. 219 * Notifies the handle that a new message was received or sent.
@@ -225,11 +225,11 @@ send_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
225 * @param[in] hash Hash of message 225 * @param[in] hash Hash of message
226 */ 226 */
227void 227void
228notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle, 228notify_srv_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
229 struct GNUNET_MESSENGER_SrvRoom *room, 229 struct GNUNET_MESSENGER_SrvRoom *room,
230 const struct GNUNET_MESSENGER_MemberSession *session, 230 const struct GNUNET_MESSENGER_MemberSession *session,
231 const struct GNUNET_MESSENGER_Message *message, 231 const struct GNUNET_MESSENGER_Message *message,
232 const struct GNUNET_HashCode *hash); 232 const struct GNUNET_HashCode *hash);
233 233
234/** 234/**
235 * 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
@@ -238,7 +238,7 @@ notify_handle_message (struct GNUNET_MESSENGER_SrvHandle *handle,
238 * @param[out] handle Handle 238 * @param[out] handle Handle
239 */ 239 */
240void 240void
241load_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle); 241load_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
242 242
243/** 243/**
244 * Saves member ids and other potential configuration from a given <i>handle</i> which 244 * Saves member ids and other potential configuration from a given <i>handle</i> which
@@ -247,6 +247,6 @@ load_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
247 * @param[in] handle Handle 247 * @param[in] handle Handle
248 */ 248 */
249void 249void
250save_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle); 250save_srv_handle_configuration (struct GNUNET_MESSENGER_SrvHandle *handle);
251 251
252#endif //GNUNET_SERVICE_MESSENGER_HANDLE_H 252#endif //GNUNET_SERVICE_MESSENGER_HANDLE_H