diff options
author | Jacki <jacki@thejackimonster.de> | 2024-04-10 02:14:28 +0200 |
---|---|---|
committer | Jacki <jacki@thejackimonster.de> | 2024-04-10 02:14:28 +0200 |
commit | 77bbded42c50c6d18b4389b0f3672b36e30f86fa (patch) | |
tree | 704dc1e4cc33ed63637ce8c78570832a16a3b03e /include | |
parent | 7ef674b52c2bdf9f65abdcc738be8cbd588cf4aa (diff) | |
download | libgnunetchat-77bbded42c50c6d18b4389b0f3672b36e30f86fa.tar.gz libgnunetchat-77bbded42c50c6d18b4389b0f3672b36e30f86fa.zip |
Implement functionality for attribute and ticket usage
Signed-off-by: Jacki <jacki@thejackimonster.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/gnunet/gnunet_chat_lib.h | 49 |
1 files changed, 45 insertions, 4 deletions
diff --git a/include/gnunet/gnunet_chat_lib.h b/include/gnunet/gnunet_chat_lib.h index 574f661..3958dba 100644 --- a/include/gnunet/gnunet_chat_lib.h +++ b/include/gnunet/gnunet_chat_lib.h | |||
@@ -195,7 +195,7 @@ typedef enum GNUNET_GenericReturnValue | |||
195 | * Iterator over attributes of a specific chat handle. | 195 | * Iterator over attributes of a specific chat handle. |
196 | * | 196 | * |
197 | * @param[in,out] cls Closure from #GNUNET_CHAT_get_attributes | 197 | * @param[in,out] cls Closure from #GNUNET_CHAT_get_attributes |
198 | * @param[in] handle Chat handle | 198 | * @param[in,out] handle Chat handle |
199 | * @param[in] name Attribute name | 199 | * @param[in] name Attribute name |
200 | * @param[in] value Attribute value | 200 | * @param[in] value Attribute value |
201 | * @return #GNUNET_YES if we should continue to iterate, #GNUNET_NO otherwise. | 201 | * @return #GNUNET_YES if we should continue to iterate, #GNUNET_NO otherwise. |
@@ -516,11 +516,11 @@ void | |||
516 | GNUNET_CHAT_set_attribute (struct GNUNET_CHAT_Handle *handle, | 516 | GNUNET_CHAT_set_attribute (struct GNUNET_CHAT_Handle *handle, |
517 | const char *name, | 517 | const char *name, |
518 | const char *value, | 518 | const char *value, |
519 | const struct GNUNET_TIME_Relative *expires); | 519 | struct GNUNET_TIME_Relative expires); |
520 | 520 | ||
521 | /** | 521 | /** |
522 | * Deletes an attribute of a chat handle for related communication under a given | 522 | * Deletes an attribute of a chat <i>handle</i> for related communication |
523 | * <i>name</i>. | 523 | * under a given <i>name</i>. |
524 | * | 524 | * |
525 | * @param[in,out] handle Chat handle | 525 | * @param[in,out] handle Chat handle |
526 | * @param[in] name Attribute name | 526 | * @param[in] name Attribute name |
@@ -543,6 +543,47 @@ GNUNET_CHAT_get_attributes (struct GNUNET_CHAT_Handle *handle, | |||
543 | void *cls); | 543 | void *cls); |
544 | 544 | ||
545 | /** | 545 | /** |
546 | * Share an attribute of a chat <i>handle</i> under a given <i>name</i> | ||
547 | * with a specific chat <i>contact</i>. | ||
548 | * | ||
549 | * @param[in,out] handle Chat handle | ||
550 | * @param[in,out] contact Chat contact | ||
551 | * @param[in] name Attribute name | ||
552 | */ | ||
553 | void | ||
554 | GNUNET_CHAT_share_attribute_with (struct GNUNET_CHAT_Handle *handle, | ||
555 | struct GNUNET_CHAT_Contact *contact, | ||
556 | const char *name); | ||
557 | |||
558 | /** | ||
559 | * Unshare an attribute of a chat <i>handle</i> under a given <i>name</i> | ||
560 | * from a specific chat <i>contact</i>. | ||
561 | * | ||
562 | * @param[in,out] handle Chat handle | ||
563 | * @param[in,out] contact Chat contact | ||
564 | * @param[in] name Attribute name | ||
565 | */ | ||
566 | void | ||
567 | GNUNET_CHAT_unshare_attribute_from (struct GNUNET_CHAT_Handle *handle, | ||
568 | struct GNUNET_CHAT_Contact *contact, | ||
569 | const char *name); | ||
570 | |||
571 | /** | ||
572 | * Calls an optional <i>callback</i> for each attribute of a given chat | ||
573 | * <i>handle</i> shared with a specific chat <i>contact</i>. | ||
574 | * | ||
575 | * @param[in,out] handle Chat handle | ||
576 | * @param[in] contact Chat contact | ||
577 | * @param[in] callback Callback for attribute iteration (optional) | ||
578 | * @param[in,out] cls Closure for attribute iteration (optional) | ||
579 | */ | ||
580 | void | ||
581 | GNUNET_CHAT_get_shared_attributes (struct GNUNET_CHAT_Handle *handle, | ||
582 | const struct GNUNET_CHAT_Contact *contact, | ||
583 | GNUNET_CHAT_ContactAttributeCallback callback, | ||
584 | void *cls); | ||
585 | |||
586 | /** | ||
546 | * Convert an UTF-8 String to a chat URI which will be newly allocated. | 587 | * Convert an UTF-8 String to a chat URI which will be newly allocated. |
547 | * | 588 | * |
548 | * @param[in] uri UTF-8 string to parse | 589 | * @param[in] uri UTF-8 string to parse |