diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2021-05-24 01:30:17 +0200 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2021-06-11 13:47:57 +0200 |
commit | d0eec6097f79c7fb3ea8b5d8bb0dcca1da1f85a6 (patch) | |
tree | c0cc57a0f066bc1d3c528323c33903038747eca8 /src/include/gnunet_messenger_service.h | |
parent | 2549225b825f34b0dfbe9f4a13f134963f3ba58d (diff) | |
download | gnunet-d0eec6097f79c7fb3ea8b5d8bb0dcca1da1f85a6.tar.gz gnunet-d0eec6097f79c7fb3ea8b5d8bb0dcca1da1f85a6.zip |
-moved messenger service out of experimental
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
-moved out of experimental, included protocol versions into ports and fixed byte-order of 32bit integers in messages
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/include/gnunet_messenger_service.h')
-rw-r--r-- | src/include/gnunet_messenger_service.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/include/gnunet_messenger_service.h b/src/include/gnunet_messenger_service.h index 0576e239f..ad5cc4f12 100644 --- a/src/include/gnunet_messenger_service.h +++ b/src/include/gnunet_messenger_service.h | |||
@@ -50,6 +50,8 @@ extern "C" { | |||
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Version number of GNUnet Messenger API. | 52 | * Version number of GNUnet Messenger API. |
53 | * | ||
54 | * Current version of the Messenger: 0.1 | ||
53 | */ | 55 | */ |
54 | #define GNUNET_MESSENGER_VERSION 0x00000001 | 56 | #define GNUNET_MESSENGER_VERSION 0x00000001 |
55 | 57 | ||
@@ -219,6 +221,10 @@ struct GNUNET_MESSENGER_MessageInfo | |||
219 | 221 | ||
220 | /** | 222 | /** |
221 | * The version of GNUnet Messenger API. | 223 | * The version of GNUnet Messenger API. |
224 | * | ||
225 | * The sixteen lower bits represent the lower version number while the sixteen higher bits | ||
226 | * represent the higher version number. A different higher version number implies imcompatibility | ||
227 | * to lower versions while differences in the lower version can still be supported potentially. | ||
222 | */ | 228 | */ |
223 | uint32_t messenger_version; | 229 | uint32_t messenger_version; |
224 | }; | 230 | }; |
@@ -672,6 +678,21 @@ void | |||
672 | GNUNET_MESSENGER_close_room (struct GNUNET_MESSENGER_Room *room); | 678 | GNUNET_MESSENGER_close_room (struct GNUNET_MESSENGER_Room *room); |
673 | 679 | ||
674 | /** | 680 | /** |
681 | * Searches for a specific <i>contact</i> in a given <i>room</i> and calls a selected <i>callback</i> with a given | ||
682 | * closure for each of them containing the contact as a member. The callback will receive a room matching the condition | ||
683 | * and the given contact. The function returns the amount of rooms iterated with the given callback. | ||
684 | * | ||
685 | * @param[in] handle Messenger handle to use | ||
686 | * @param[in] contact Contact handle | ||
687 | * @param[in] callback Function called for each room | ||
688 | * @param[in] cls Closure for the <i>callback</i> handler | ||
689 | * @return Amount of rooms iterated | ||
690 | */ | ||
691 | int | ||
692 | GNUNET_MESSENGER_find_rooms (const struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_MESSENGER_Contact *contact, | ||
693 | GNUNET_MESSENGER_MemberCallback callback, void *cls); | ||
694 | |||
695 | /** | ||
675 | * Get the contact of a member in a <i>room</i> which sent a specific message identified with a given <i>hash</i>. | 696 | * Get the contact of a member in a <i>room</i> which sent a specific message identified with a given <i>hash</i>. |
676 | * | 697 | * |
677 | * Notice that contacts are independent of rooms but will be removed if all rooms containing these contacts get closed. | 698 | * Notice that contacts are independent of rooms but will be removed if all rooms containing these contacts get closed. |