aboutsummaryrefslogtreecommitdiff
path: root/src/contact.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/contact.h')
-rw-r--r--src/contact.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/contact.h b/src/contact.h
index 8a6dd4c..61d41e7 100644
--- a/src/contact.h
+++ b/src/contact.h
@@ -35,27 +35,73 @@ typedef struct MESSENGER_ContactInfo
35 GList *name_avatars; 35 GList *name_avatars;
36} MESSENGER_ContactInfo; 36} MESSENGER_ContactInfo;
37 37
38/**
39 * Creates a contact information struct to potentially
40 * update all GUI appearances of a specific contact at
41 * once.
42 *
43 * @param contact Chat contact
44 */
38void 45void
39contact_create_info(struct GNUNET_CHAT_Contact *contact); 46contact_create_info(struct GNUNET_CHAT_Contact *contact);
40 47
48/**
49 * Destroys and frees resources allocated for a given
50 * contact information struct.
51 *
52 * @param contact Chat contact
53 */
41void 54void
42contact_destroy_info(struct GNUNET_CHAT_Contact *contact); 55contact_destroy_info(struct GNUNET_CHAT_Contact *contact);
43 56
57/**
58 * Sets the latest join/leave UI message handle so that
59 * the application can check whether a contact is available.
60 *
61 * @param contact Chat contact
62 * @param message Pointer to UI message handle
63 */
44void 64void
45contact_set_last_message_to_info(const struct GNUNET_CHAT_Contact *contact, 65contact_set_last_message_to_info(const struct GNUNET_CHAT_Contact *contact,
46 void *message); 66 void *message);
47 67
68/**
69 * Returns the latest join/leave UI message handle of
70 * a specific contact.
71 *
72 * @param contact Chat contact
73 */
48void* 74void*
49contact_get_last_message_from_info(const struct GNUNET_CHAT_Contact *contact); 75contact_get_last_message_from_info(const struct GNUNET_CHAT_Contact *contact);
50 76
77/**
78 * Adds a GtkLabel to the list of labels
79 * which get updated by state changes.
80 *
81 * @param contact Chat contact
82 * @param label Label
83 */
51void 84void
52contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact, 85contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact,
53 GtkLabel *label); 86 GtkLabel *label);
54 87
88/**
89 * Adds a HdyAvatar to the list of avatars
90 * which get updated by state changes.
91 *
92 * @param contact Chat contact
93 * @param avatar Avatar
94 */
55void 95void
56contact_add_name_avatar_to_info(const struct GNUNET_CHAT_Contact *contact, 96contact_add_name_avatar_to_info(const struct GNUNET_CHAT_Contact *contact,
57 HdyAvatar *avatar); 97 HdyAvatar *avatar);
58 98
99/**
100 * Updates the connected UI elements for a given
101 * contact depending on the current state.
102 *
103 * @param contact Chat contact
104 */
59void 105void
60contact_update_info(const struct GNUNET_CHAT_Contact *contact); 106contact_update_info(const struct GNUNET_CHAT_Contact *contact);
61 107