aboutsummaryrefslogtreecommitdiff
path: root/src/service/messenger/messenger_api_contact.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/service/messenger/messenger_api_contact.h')
-rw-r--r--src/service/messenger/messenger_api_contact.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/service/messenger/messenger_api_contact.h b/src/service/messenger/messenger_api_contact.h
index 4463aa746..b2e3fc364 100644
--- a/src/service/messenger/messenger_api_contact.h
+++ b/src/service/messenger/messenger_api_contact.h
@@ -34,6 +34,7 @@ struct GNUNET_MESSENGER_Contact
34{ 34{
35 char *name; 35 char *name;
36 size_t rc; 36 size_t rc;
37 size_t id;
37 38
38 struct GNUNET_CRYPTO_PublicKey public_key; 39 struct GNUNET_CRYPTO_PublicKey public_key;
39}; 40};
@@ -42,10 +43,12 @@ struct GNUNET_MESSENGER_Contact
42 * Creates and allocates a new contact with a given public <i>key</i> from an EGO. 43 * Creates and allocates a new contact with a given public <i>key</i> from an EGO.
43 * 44 *
44 * @param[in] key Public key 45 * @param[in] key Public key
46 * @param[in] unique_id Locally unique identifier
45 * @return New contact 47 * @return New contact
46 */ 48 */
47struct GNUNET_MESSENGER_Contact* 49struct GNUNET_MESSENGER_Contact*
48create_contact (const struct GNUNET_CRYPTO_PublicKey *key); 50create_contact (const struct GNUNET_CRYPTO_PublicKey *key,
51 size_t unique_id);
49 52
50/** 53/**
51 * Destroys a contact and frees its memory fully. 54 * Destroys a contact and frees its memory fully.
@@ -102,6 +105,15 @@ int
102decrease_contact_rc (struct GNUNET_MESSENGER_Contact *contact); 105decrease_contact_rc (struct GNUNET_MESSENGER_Contact *contact);
103 106
104/** 107/**
108 * Returns the locally unique identifier of a given <i>contact</i>.
109 *
110 * @param[in] contact contact Contact
111 * @return Locally unique identifier of contact
112 */
113size_t
114get_contact_id (const struct GNUNET_MESSENGER_Contact *contact);
115
116/**
105 * Calculates the context <i>hash</i> of a member in a room and returns it. 117 * Calculates the context <i>hash</i> of a member in a room and returns it.
106 * 118 *
107 * @param[in] key Key of room 119 * @param[in] key Key of room