diff options
Diffstat (limited to 'src/event.h')
-rw-r--r-- | src/event.h | 72 |
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 | */ | ||
30 | void | 40 | void |
31 | event_handle_warning(MESSENGER_Application *app, | 41 | event_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 | */ | ||
35 | void | 51 | void |
36 | event_refresh_accounts(MESSENGER_Application *app); | 52 | event_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 | */ | ||
38 | void | 60 | void |
39 | event_update_profile(MESSENGER_Application *app); | 61 | event_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 | */ | ||
41 | void | 71 | void |
42 | event_update_chats(MESSENGER_Application *app, | 72 | event_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 | */ | ||
46 | void | 84 | void |
47 | event_presence_contact(MESSENGER_Application *app, | 85 | event_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 | */ | ||
51 | void | 98 | void |
52 | event_update_contacts(MESSENGER_Application *app, | 99 | event_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 | */ | ||
56 | void | 111 | void |
57 | event_invitation(MESSENGER_Application *app, | 112 | event_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 | */ | ||
61 | void | 125 | void |
62 | event_receive_message(MESSENGER_Application *app, | 126 | event_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 | */ | ||
66 | void | 138 | void |
67 | event_delete_message(MESSENGER_Application *app, | 139 | event_delete_message(MESSENGER_Application *app, |
68 | struct GNUNET_CHAT_Context *context, | 140 | struct GNUNET_CHAT_Context *context, |