aboutsummaryrefslogtreecommitdiff
path: root/src/gnunet_chat_contact.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gnunet_chat_contact.h')
-rw-r--r--src/gnunet_chat_contact.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/src/gnunet_chat_contact.h b/src/gnunet_chat_contact.h
index cf0dded..54918cc 100644
--- a/src/gnunet_chat_contact.h
+++ b/src/gnunet_chat_contact.h
@@ -1,6 +1,6 @@
1/* 1/*
2 This file is part of GNUnet. 2 This file is part of GNUnet.
3 Copyright (C) 2021 GNUnet e.V. 3 Copyright (C) 2021--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
@@ -46,16 +46,42 @@ struct GNUNET_CHAT_Contact
46 int is_owned; 46 int is_owned;
47}; 47};
48 48
49/**
50 * Creates a chat contact using a given messenger <i>contact</i>
51 * with a selected chat <i>handle</i>.
52 *
53 * @param[in,out] handle Chat handle
54 * @param[in] member Messenger contact
55 * @return New chat contact
56 */
49struct GNUNET_CHAT_Contact* 57struct GNUNET_CHAT_Contact*
50contact_create_from_member (struct GNUNET_CHAT_Handle *handle, 58contact_create_from_member (struct GNUNET_CHAT_Handle *handle,
51 const struct GNUNET_MESSENGER_Contact *member); 59 const struct GNUNET_MESSENGER_Contact *member);
52 60
61/**
62 * Updates the string representation of the public key from
63 * a given chat <i>contact</i>.
64 *
65 * @param[in,out] contact Chat contact
66 */
53void 67void
54contact_update_key (struct GNUNET_CHAT_Contact *contact); 68contact_update_key (struct GNUNET_CHAT_Contact *contact);
55 69
70/**
71 * Searches for a chat context containing a given chat
72 * <i>contact</i> and the least amount of other members.
73 *
74 * @param[in] contact Chat contact
75 * @return Chat context or NULL
76 */
56struct GNUNET_CHAT_Context* 77struct GNUNET_CHAT_Context*
57contact_find_context (struct GNUNET_CHAT_Contact *contact); 78contact_find_context (const struct GNUNET_CHAT_Contact *contact);
58 79
80/**
81 * Destroys a chat <i>contact</i> and frees its memory.
82 *
83 * @param[in,out] contact Chat contact
84 */
59void 85void
60contact_destroy (struct GNUNET_CHAT_Contact* contact); 86contact_destroy (struct GNUNET_CHAT_Contact* contact);
61 87