diff options
author | Jacki <jacki@thejackimonster.de> | 2024-01-05 03:24:31 +0100 |
---|---|---|
committer | Jacki <jacki@thejackimonster.de> | 2024-01-05 03:24:31 +0100 |
commit | 155016406d44a5a12a123a91a8eaf8aaa62e7430 (patch) | |
tree | ebc809005fbcaee9d15c9984f74a3e5487c21b6a /include | |
parent | 2825c2b3391e1f65d58b6754ea603b83fd6959f1 (diff) | |
download | libgnunetchat-155016406d44a5a12a123a91a8eaf8aaa62e7430.tar.gz libgnunetchat-155016406d44a5a12a123a91a8eaf8aaa62e7430.zip |
Implement setting and deleting attributes with handle
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/gnunet/gnunet_chat_lib.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/gnunet/gnunet_chat_lib.h b/include/gnunet/gnunet_chat_lib.h index 0a2fd7c..8026cf6 100644 --- a/include/gnunet/gnunet_chat_lib.h +++ b/include/gnunet/gnunet_chat_lib.h | |||
@@ -35,6 +35,7 @@ | |||
35 | /**@{*/ | 35 | /**@{*/ |
36 | 36 | ||
37 | #include <gnunet/gnunet_common.h> | 37 | #include <gnunet/gnunet_common.h> |
38 | #include <gnunet/gnunet_time_lib.h> | ||
38 | #include <gnunet/gnunet_util_lib.h> | 39 | #include <gnunet/gnunet_util_lib.h> |
39 | 40 | ||
40 | /** | 41 | /** |
@@ -488,6 +489,32 @@ const char* | |||
488 | GNUNET_CHAT_get_key (const struct GNUNET_CHAT_Handle *handle); | 489 | GNUNET_CHAT_get_key (const struct GNUNET_CHAT_Handle *handle); |
489 | 490 | ||
490 | /** | 491 | /** |
492 | * Updates an attribute of a chat handle for related communication under a given | ||
493 | * <i>name</i> and a custom <i>value</i>. | ||
494 | * | ||
495 | * @param[in,out] handle Chat handle | ||
496 | * @param[in] name Attribute name | ||
497 | * @param[in] value Attribute value | ||
498 | * @param[in] expires Expiration time or NULL | ||
499 | */ | ||
500 | void | ||
501 | GNUNET_CHAT_set_attribute (struct GNUNET_CHAT_Handle *handle, | ||
502 | const char *name, | ||
503 | const char *value, | ||
504 | const struct GNUNET_TIME_Relative *expires); | ||
505 | |||
506 | /** | ||
507 | * Deletes an attribute of a chat handle for related communication under a given | ||
508 | * <i>name</i>. | ||
509 | * | ||
510 | * @param[in,out] handle Chat handle | ||
511 | * @param[in] name Attribute name | ||
512 | */ | ||
513 | void | ||
514 | GNUNET_CHAT_delete_attribute (struct GNUNET_CHAT_Handle *handle, | ||
515 | const char *name); | ||
516 | |||
517 | /** | ||
491 | * Convert an UTF-8 String to a chat URI which will be newly allocated. | 518 | * Convert an UTF-8 String to a chat URI which will be newly allocated. |
492 | * | 519 | * |
493 | * @param[in] uri UTF-8 string to parse | 520 | * @param[in] uri UTF-8 string to parse |