aboutsummaryrefslogtreecommitdiff
path: root/src/event.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/event.h')
-rw-r--r--src/event.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/event.h b/src/event.h
index 505309c..d89e453 100644
--- a/src/event.h
+++ b/src/event.h
@@ -27,42 +27,114 @@
27 27
28#include "application.h" 28#include "application.h"
29 29
30/**
31 * Event for the UI to be called whenever the application
32 * causes any issue in back-end throwing a warning. This
33 * might be specific to a given context or none if its
34 * a general warning.
35 *
36 * @param app Messenger application
37 * @param context Chat context or NULL
38 * @param msg Warning message
39 */
30void 40void
31event_handle_warning(MESSENGER_Application *app, 41event_handle_warning(MESSENGER_Application *app,
32 struct GNUNET_CHAT_Context *context, 42 struct GNUNET_CHAT_Context *context,
33 const struct GNUNET_CHAT_Message *msg); 43 const struct GNUNET_CHAT_Message *msg);
34 44
45/**
46 * Event for the UI to be called whenever the accounts
47 * might add or remove an account from their list.
48 *
49 * @param app Messenger application
50 */
35void 51void
36event_refresh_accounts(MESSENGER_Application *app); 52event_refresh_accounts(MESSENGER_Application *app);
37 53
54/**
55 * Event for the UI to be called whenever the user
56 * updates their information.
57 *
58 * @param app Messenger application
59 */
38void 60void
39event_update_profile(MESSENGER_Application *app); 61event_update_profile(MESSENGER_Application *app);
40 62
63/**
64 * Event for the UI to be called whenever a the user
65 * joins or leaves a chat (context) via message.
66 *
67 * @param app Messenger application
68 * @param context Chat context
69 * @param msg Join/Leave message
70 */
41void 71void
42event_update_chats(MESSENGER_Application *app, 72event_update_chats(MESSENGER_Application *app,
43 struct GNUNET_CHAT_Context *context, 73 struct GNUNET_CHAT_Context *context,
44 const struct GNUNET_CHAT_Message *msg); 74 const struct GNUNET_CHAT_Message *msg);
45 75
76/**
77 * Event for the UI to be called whenever a contact
78 * joins or leaves a given context via message.
79 *
80 * @param app Messenger application
81 * @param context Chat context
82 * @param msg Join/Leave message
83 */
46void 84void
47event_presence_contact(MESSENGER_Application *app, 85event_presence_contact(MESSENGER_Application *app,
48 struct GNUNET_CHAT_Context *context, 86 struct GNUNET_CHAT_Context *context,
49 const struct GNUNET_CHAT_Message *msg); 87 const struct GNUNET_CHAT_Message *msg);
50 88
89/**
90 * Event for the UI to be called whenever a contact
91 * updates their information with a message in a
92 * given context.
93 *
94 * @param app Messenger application
95 * @param context Chat context
96 * @param msg Update message
97 */
51void 98void
52event_update_contacts(MESSENGER_Application *app, 99event_update_contacts(MESSENGER_Application *app,
53 struct GNUNET_CHAT_Context *context, 100 struct GNUNET_CHAT_Context *context,
54 const struct GNUNET_CHAT_Message *msg); 101 const struct GNUNET_CHAT_Message *msg);
55 102
103/**
104 * Event for the UI to be called whenever an invitation
105 * message gets received in a given context.
106 *
107 * @param app Messenger application
108 * @param context Chat context
109 * @param msg Invitation message
110 */
56void 111void
57event_invitation(MESSENGER_Application *app, 112event_invitation(MESSENGER_Application *app,
58 struct GNUNET_CHAT_Context *context, 113 struct GNUNET_CHAT_Context *context,
59 const struct GNUNET_CHAT_Message *msg); 114 const struct GNUNET_CHAT_Message *msg);
60 115
116/**
117 * Event for the UI to be called whenever a content
118 * message (text or file) gets received in a given
119 * context.
120 *
121 * @param app Messenger application
122 * @param context Chat context
123 * @param msg Message
124 */
61void 125void
62event_receive_message(MESSENGER_Application *app, 126event_receive_message(MESSENGER_Application *app,
63 struct GNUNET_CHAT_Context *context, 127 struct GNUNET_CHAT_Context *context,
64 const struct GNUNET_CHAT_Message *msg); 128 const struct GNUNET_CHAT_Message *msg);
65 129
130/**
131 * Event for the UI to be called whenever a message
132 * gets deleted in a given context.
133 *
134 * @param app Messenger application
135 * @param context Chat context
136 * @param msg Delete message
137 */
66void 138void
67event_delete_message(MESSENGER_Application *app, 139event_delete_message(MESSENGER_Application *app,
68 struct GNUNET_CHAT_Context *context, 140 struct GNUNET_CHAT_Context *context,