diff options
author | TheJackiMonster <thejackimonster@gmail.com> | 2022-02-13 20:49:26 +0100 |
---|---|---|
committer | TheJackiMonster <thejackimonster@gmail.com> | 2022-02-13 20:49:26 +0100 |
commit | 005133f48187c05fa5c91e0424df8017347daf25 (patch) | |
tree | dc8d638670986be863ebc3ea64c5fa07c0885e7f /include | |
parent | a0d9fe355a8b12109d15c9a82f01a3d2b0dc1119 (diff) | |
download | libgnunetchat-005133f48187c05fa5c91e0424df8017347daf25.tar.gz libgnunetchat-005133f48187c05fa5c91e0424df8017347daf25.zip |
Added function to create an account
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/gnunet_chat_lib.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/include/gnunet_chat_lib.h b/include/gnunet_chat_lib.h index a0d57d9..6eb5c70 100644 --- a/include/gnunet_chat_lib.h +++ b/include/gnunet_chat_lib.h | |||
@@ -311,6 +311,21 @@ void | |||
311 | GNUNET_CHAT_stop (struct GNUNET_CHAT_Handle *handle); | 311 | GNUNET_CHAT_stop (struct GNUNET_CHAT_Handle *handle); |
312 | 312 | ||
313 | /** | 313 | /** |
314 | * Creates a new chat account to use with a given chat <i>handle</i> under a | ||
315 | * unique <i>name</i>. | ||
316 | * | ||
317 | * If a specific name is already in use of another chat accounts, the function | ||
318 | * will fail and return #GNUNET_NO. | ||
319 | * | ||
320 | * @param[in,out] handle Chat handle | ||
321 | * @param[in] name Account name | ||
322 | * @return #GNUNET_OK on success, #GNUNET_NO on failure and otherwise #GNUNET_SYSERR | ||
323 | */ | ||
324 | int | ||
325 | GNUNET_CHAT_account_create (struct GNUNET_CHAT_Handle *handle, | ||
326 | const char* name); | ||
327 | |||
328 | /** | ||
314 | * Iterates through the accounts of a given chat <i>handle</i> with a selected | 329 | * Iterates through the accounts of a given chat <i>handle</i> with a selected |
315 | * callback and custom closure. | 330 | * callback and custom closure. |
316 | * | 331 | * |
@@ -448,9 +463,10 @@ GNUNET_CHAT_account_get_user_pointer (const struct GNUNET_CHAT_Account *account) | |||
448 | * join the chat via a private invitation. | 463 | * join the chat via a private invitation. |
449 | * | 464 | * |
450 | * @param[in,out] handle Chat handle | 465 | * @param[in,out] handle Chat handle |
466 | * @param[in] topic Public topic (optional) | ||
451 | * @return New group chat | 467 | * @return New group chat |
452 | */ | 468 | */ |
453 | struct GNUNET_CHAT_Group * | 469 | struct GNUNET_CHAT_Group* |
454 | GNUNET_CHAT_group_create (struct GNUNET_CHAT_Handle *handle, | 470 | GNUNET_CHAT_group_create (struct GNUNET_CHAT_Handle *handle, |
455 | const char* topic); | 471 | const char* topic); |
456 | 472 | ||