aboutsummaryrefslogtreecommitdiff
path: root/src/contact.c
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2022-04-10 18:52:36 +0200
committerTheJackiMonster <thejackimonster@gmail.com>2022-04-10 18:52:36 +0200
commit6e6a4f7f612c14fa0188eab6fc6e2906b717540b (patch)
treee1d4ccd620a9d6a25c72b4e56b2dd8530aa4f544 /src/contact.c
parent2533114fcc0fbfa3f3ee3c756892fec39fd547a4 (diff)
downloadmessenger-gtk-6e6a4f7f612c14fa0188eab6fc6e2906b717540b.tar.gz
messenger-gtk-6e6a4f7f612c14fa0188eab6fc6e2906b717540b.zip
Updated usage of member user pointers
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'src/contact.c')
-rw-r--r--src/contact.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/contact.c b/src/contact.c
index 0ebe9c6..9c590a3 100644
--- a/src/contact.c
+++ b/src/contact.c
@@ -60,6 +60,29 @@ contact_destroy_info(struct GNUNET_CHAT_Contact *contact)
60} 60}
61 61
62void 62void
63contact_set_last_message_to_info(const struct GNUNET_CHAT_Contact *contact,
64 void *message)
65{
66 MESSENGER_ContactInfo* info = GNUNET_CHAT_contact_get_user_pointer(contact);
67
68 if (!info)
69 return;
70
71 info->last_message = message;
72}
73
74void*
75contact_get_last_message_from_info(const struct GNUNET_CHAT_Contact *contact)
76{
77 MESSENGER_ContactInfo* info = GNUNET_CHAT_contact_get_user_pointer(contact);
78
79 if (!info)
80 return NULL;
81
82 return info->last_message;
83}
84
85void
63contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact, 86contact_add_name_label_to_info(const struct GNUNET_CHAT_Contact *contact,
64 GtkLabel *label) 87 GtkLabel *label)
65{ 88{