aboutsummaryrefslogtreecommitdiff
path: root/include/gnunet_chat_lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/gnunet_chat_lib.h')
-rw-r--r--include/gnunet_chat_lib.h53
1 files changed, 25 insertions, 28 deletions
diff --git a/include/gnunet_chat_lib.h b/include/gnunet_chat_lib.h
index 665af3a..eca7a77 100644
--- a/include/gnunet_chat_lib.h
+++ b/include/gnunet_chat_lib.h
@@ -88,12 +88,24 @@ struct GNUNET_CHAT_File;
88 * 88 *
89 * @param cls 89 * @param cls
90 * @param handle 90 * @param handle
91 * @param context
92 * @param reason
93 */
94typedef void
95(*GNUNET_CHAT_WarningCallback) (void *cls, struct GNUNET_CHAT_Handle *handle,
96 struct GNUNET_CHAT_Context *context, int reason);
97
98/**
99 * TODO
100 *
101 * @param cls
102 * @param handle
91 * @param contact 103 * @param contact
92 * @return 104 * @return
93 */ 105 */
94typedef int 106typedef int
95(*GNUNET_CHAT_ContactCallback) (void *cls, struct GNUNET_CHAT_Handle *handle, 107(*GNUNET_CHAT_ContactCallback) (void *cls, struct GNUNET_CHAT_Handle *handle,
96 const struct GNUNET_CHAT_Contact *contact); 108 struct GNUNET_CHAT_Contact *contact);
97 109
98/** 110/**
99 * TODO 111 * TODO
@@ -105,7 +117,7 @@ typedef int
105 */ 117 */
106typedef int 118typedef int
107(*GNUNET_CHAT_GroupCallback) (void *cls, struct GNUNET_CHAT_Handle *handle, 119(*GNUNET_CHAT_GroupCallback) (void *cls, struct GNUNET_CHAT_Handle *handle,
108 const struct GNUNET_CHAT_Group *group); 120 struct GNUNET_CHAT_Group *group);
109 121
110/** 122/**
111 * TODO 123 * TODO
@@ -117,7 +129,7 @@ typedef int
117 */ 129 */
118typedef int 130typedef int
119(*GNUNET_CHAT_GroupContactCallback) (void *cls, struct GNUNET_CHAT_Group *group, 131(*GNUNET_CHAT_GroupContactCallback) (void *cls, struct GNUNET_CHAT_Group *group,
120 const struct GNUNET_CHAT_Contact *contact); 132 struct GNUNET_CHAT_Contact *contact);
121 133
122/** 134/**
123 * TODO 135 * TODO
@@ -129,7 +141,7 @@ typedef int
129 */ 141 */
130typedef int 142typedef int
131(*GNUNET_CHAT_ContextMessageCallback) (void *cls, struct GNUNET_CHAT_Context *context, 143(*GNUNET_CHAT_ContextMessageCallback) (void *cls, struct GNUNET_CHAT_Context *context,
132 const struct GNUNET_CHAT_Message *message); 144 struct GNUNET_CHAT_Message *message);
133 145
134/** 146/**
135 * TODO 147 * TODO
@@ -141,24 +153,26 @@ typedef int
141 * @return 153 * @return
142 */ 154 */
143typedef int 155typedef int
144(*GNUNET_CHAT_MessageReadReceiptCallback) (void *cls, const struct GNUNET_CHAT_Message *message, 156(*GNUNET_CHAT_MessageReadReceiptCallback) (void *cls, struct GNUNET_CHAT_Message *message,
145 const struct GNUNET_CHAT_Contact *contact, 157 struct GNUNET_CHAT_Contact *contact,
146 int read_receipt); 158 int read_receipt);
147 159
148typedef void 160typedef void
149(*GNUNET_CHAT_MessageFileDownloadCallback) (void *cls, const struct GNUNET_CHAT_File *file); 161(*GNUNET_CHAT_MessageFileDownloadCallback) (void *cls, struct GNUNET_CHAT_File *file);
150
151 162
152/** 163/**
153 * TODO 164 * TODO
154 * 165 *
155 * @param cfg 166 * @param cfg
156 * @param name 167 * @param name
168 * @param warn_cb
169 * @param warn_cls
157 * @return 170 * @return
158 */ 171 */
159struct GNUNET_CHAT_Handle* 172struct GNUNET_CHAT_Handle*
160GNUNET_CHAT_start (const struct GNUNET_CONFIGURATION_Handle *cfg, 173GNUNET_CHAT_start (const struct GNUNET_CONFIGURATION_Handle *cfg,
161 const char *name); 174 const char *name,
175 GNUNET_CHAT_WarningCallback warn_cb, void *warn_cls);
162 176
163/** 177/**
164 * TODO 178 * TODO
@@ -226,7 +240,8 @@ GNUNET_CHAT_iterate_contacts (struct GNUNET_CHAT_Handle *handle,
226 * @return 240 * @return
227 */ 241 */
228struct GNUNET_CHAT_Group * 242struct GNUNET_CHAT_Group *
229GNUNET_CHAT_group_create (struct GNUNET_CHAT_Handle *handle); 243GNUNET_CHAT_group_create (struct GNUNET_CHAT_Handle *handle,
244 const char* topic);
230 245
231/** 246/**
232 * TODO 247 * TODO
@@ -253,24 +268,6 @@ GNUNET_CHAT_contact_delete (struct GNUNET_CHAT_Contact *contact);
253/** 268/**
254 * TODO 269 * TODO
255 * 270 *
256 * @param contact
257 */
258void
259GNUNET_CHAT_contact_set_blocking (struct GNUNET_CHAT_Contact *contact,
260 int blocking);
261
262/**
263 * TODO
264 *
265 * @param contact
266 * @return
267 */
268int
269GNUNET_CHAT_contact_is_blocking (const struct GNUNET_CHAT_Contact *contact);
270
271/**
272 * TODO
273 *
274 * @param contact Contact 271 * @param contact Contact
275 * @param name Custom nick name 272 * @param name Custom nick name
276 */ 273 */