diff options
Diffstat (limited to 'src/service/messenger/messenger_api_room.h')
-rw-r--r-- | src/service/messenger/messenger_api_room.h | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/src/service/messenger/messenger_api_room.h b/src/service/messenger/messenger_api_room.h index 79571bc2e..7587fb256 100644 --- a/src/service/messenger/messenger_api_room.h +++ b/src/service/messenger/messenger_api_room.h | |||
@@ -40,7 +40,9 @@ struct GNUNET_MESSENGER_RoomMessageEntry | |||
40 | { | 40 | { |
41 | struct GNUNET_MESSENGER_Contact *sender; | 41 | struct GNUNET_MESSENGER_Contact *sender; |
42 | struct GNUNET_MESSENGER_Contact *recipient; | 42 | struct GNUNET_MESSENGER_Contact *recipient; |
43 | |||
43 | struct GNUNET_MESSENGER_Message *message; | 44 | struct GNUNET_MESSENGER_Message *message; |
45 | enum GNUNET_MESSENGER_MessageFlags flags; | ||
44 | }; | 46 | }; |
45 | 47 | ||
46 | struct GNUNET_MESSENGER_Room | 48 | struct GNUNET_MESSENGER_Room |
@@ -153,6 +155,16 @@ get_room_recipient (const struct GNUNET_MESSENGER_Room *room, | |||
153 | const struct GNUNET_HashCode *hash); | 155 | const struct GNUNET_HashCode *hash); |
154 | 156 | ||
155 | /** | 157 | /** |
158 | * Executes the message callback for a given <i>hash</i> in a <i>room</i>. | ||
159 | * | ||
160 | * @param[in,out] room Room | ||
161 | * @param[in] hash Hash of message | ||
162 | */ | ||
163 | void | ||
164 | callback_room_message (struct GNUNET_MESSENGER_Room *room, | ||
165 | const struct GNUNET_HashCode *hash); | ||
166 | |||
167 | /** | ||
156 | * Handles a <i>message</i> with a given <i>hash</i> in a <i>room</i> for the client API to update | 168 | * Handles a <i>message</i> with a given <i>hash</i> in a <i>room</i> for the client API to update |
157 | * members and its information. The function also stores the message in map locally for access afterwards. | 169 | * members and its information. The function also stores the message in map locally for access afterwards. |
158 | * | 170 | * |
@@ -161,21 +173,29 @@ get_room_recipient (const struct GNUNET_MESSENGER_Room *room, | |||
161 | * | 173 | * |
162 | * @param[in,out] room Room | 174 | * @param[in,out] room Room |
163 | * @param[in,out] sender Contact of sender | 175 | * @param[in,out] sender Contact of sender |
164 | * @param[in,out] recipient Contact of recipient | ||
165 | * @param[in] message Message | 176 | * @param[in] message Message |
166 | * @param[in] hash Hash of message | 177 | * @param[in] hash Hash of message |
167 | * @param[in] flags Flags of message | 178 | * @param[in] flags Flags of message |
168 | * @return Contact of sender | ||
169 | */ | 179 | */ |
170 | struct GNUNET_MESSENGER_Contact* | 180 | void |
171 | handle_room_message (struct GNUNET_MESSENGER_Room *room, | 181 | handle_room_message (struct GNUNET_MESSENGER_Room *room, |
172 | struct GNUNET_MESSENGER_Contact *sender, | 182 | struct GNUNET_MESSENGER_Contact *sender, |
173 | struct GNUNET_MESSENGER_Contact *recipient, | ||
174 | const struct GNUNET_MESSENGER_Message *message, | 183 | const struct GNUNET_MESSENGER_Message *message, |
175 | const struct GNUNET_HashCode *hash, | 184 | const struct GNUNET_HashCode *hash, |
176 | enum GNUNET_MESSENGER_MessageFlags flags); | 185 | enum GNUNET_MESSENGER_MessageFlags flags); |
177 | 186 | ||
178 | /** | 187 | /** |
188 | * Updates the last message <i>hash</i> of a <i>room</i> for the client API so that new messages can | ||
189 | * point to the latest message hash while sending. | ||
190 | * | ||
191 | * @param[in,out] room Room | ||
192 | * @param[in] hash Hash of message | ||
193 | */ | ||
194 | void | ||
195 | update_room_last_message (struct GNUNET_MESSENGER_Room *room, | ||
196 | const struct GNUNET_HashCode *hash); | ||
197 | |||
198 | /** | ||
179 | * Iterates through all members of a given <i>room</i> to forward each of them to a selected | 199 | * Iterates through all members of a given <i>room</i> to forward each of them to a selected |
180 | * <i>callback</i> with a custom closure. | 200 | * <i>callback</i> with a custom closure. |
181 | * | 201 | * |