aboutsummaryrefslogtreecommitdiff
path: root/src/ui/chat.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/chat.h')
-rw-r--r--src/ui/chat.h55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/ui/chat.h b/src/ui/chat.h
index e28374c..626bd1d 100644
--- a/src/ui/chat.h
+++ b/src/ui/chat.h
@@ -130,31 +130,86 @@ typedef struct UI_CHAT_Handle
130 UI_PICKER_Handle *picker; 130 UI_PICKER_Handle *picker;
131} UI_CHAT_Handle; 131} UI_CHAT_Handle;
132 132
133/**
134 * Allocates and creates a new chat handle
135 * to manage a chat for a given messenger
136 * application.
137 *
138 * @param app Messenger application
139 * @return New chat handle
140 */
133UI_CHAT_Handle* 141UI_CHAT_Handle*
134ui_chat_new(MESSENGER_Application *app); 142ui_chat_new(MESSENGER_Application *app);
135 143
144/**
145 * Updates a given chat handle with the current
146 * state of a messenger application and the chat
147 * context the chat is representing.
148 *
149 * @param handle Chat handle
150 * @param app Messenger application
151 * @param context Chat context
152 */
136void 153void
137ui_chat_update(UI_CHAT_Handle *handle, 154ui_chat_update(UI_CHAT_Handle *handle,
138 MESSENGER_Application *app, 155 MESSENGER_Application *app,
139 struct GNUNET_CHAT_Context* context); 156 struct GNUNET_CHAT_Context* context);
140 157
158/**
159 * Frees its resources and destroys a given
160 * chat handle.
161 *
162 * @param handle Chat handle
163 */
141void 164void
142ui_chat_delete(UI_CHAT_Handle *handle); 165ui_chat_delete(UI_CHAT_Handle *handle);
143 166
167/**
168 * Add a message handle to a given chat handle
169 * to get listed by it for a messenger
170 * application.
171 *
172 * @param handle Chat handle
173 * @param app Messenger application
174 * @param message Message handle
175 */
144void 176void
145ui_chat_add_message(UI_CHAT_Handle *handle, 177ui_chat_add_message(UI_CHAT_Handle *handle,
146 MESSENGER_Application *app, 178 MESSENGER_Application *app,
147 UI_MESSAGE_Handle *message); 179 UI_MESSAGE_Handle *message);
148 180
181/**
182 * Removes a message handle from a given chat
183 * handle to remove it from its list for a
184 * messenger application.
185 *
186 * @param handle Chat handle
187 * @param app Messenger application
188 * @param message Message handle
189 */
149void 190void
150ui_chat_remove_message(UI_CHAT_Handle *handle, 191ui_chat_remove_message(UI_CHAT_Handle *handle,
151 MESSENGER_Application *app, 192 MESSENGER_Application *app,
152 UI_MESSAGE_Handle *message); 193 UI_MESSAGE_Handle *message);
153 194
195/**
196 * Add a file load entry handle to a given chat
197 * handle to get listed by it.
198 *
199 * @param handle Chat handle
200 * @param file_load File load entry handle
201 */
154void 202void
155ui_chat_add_file_load(UI_CHAT_Handle *handle, 203ui_chat_add_file_load(UI_CHAT_Handle *handle,
156 UI_FILE_LOAD_ENTRY_Handle *file_load); 204 UI_FILE_LOAD_ENTRY_Handle *file_load);
157 205
206/**
207 * Removes a file load entry handle from a given
208 * chat handle to remove it from its list.
209 *
210 * @param handle Chat handle
211 * @param file_load File load entry handle
212 */
158void 213void
159ui_chat_remove_file_load(UI_CHAT_Handle *handle, 214ui_chat_remove_file_load(UI_CHAT_Handle *handle,
160 UI_FILE_LOAD_ENTRY_Handle *file_load); 215 UI_FILE_LOAD_ENTRY_Handle *file_load);