From 35e3ee46594914fd651d82120772d051a8f5535a Mon Sep 17 00:00:00 2001 From: Jacki Date: Sat, 17 Feb 2024 17:16:48 +0100 Subject: Adjust blocking code for generic tagging of contacts Signed-off-by: Jacki --- include/gnunet/gnunet_chat_lib.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'include') diff --git a/include/gnunet/gnunet_chat_lib.h b/include/gnunet/gnunet_chat_lib.h index 0348579..35f9ec6 100644 --- a/include/gnunet/gnunet_chat_lib.h +++ b/include/gnunet/gnunet_chat_lib.h @@ -809,6 +809,40 @@ GNUNET_CHAT_contact_set_blocked (struct GNUNET_CHAT_Contact *contact, enum GNUNET_GenericReturnValue GNUNET_CHAT_contact_is_blocked (const struct GNUNET_CHAT_Contact *contact); +/** + * Tags a given contact by the current account with a specific + * tag. + * + * @param[in,out] contact Contact + * @param[in] tag Tag + */ +void +GNUNET_CHAT_contact_tag (struct GNUNET_CHAT_Contact *contact, + const char *tag); + +/** + * Untags a given contact by the current account with a specific + * tag. + * + * @param[in,out] contact Contact + * @param[in] tag Tag + */ +void +GNUNET_CHAT_contact_untag (struct GNUNET_CHAT_Contact *contact, + const char *tag); + +/** + * Returns if a given contact is tagged by the current account with + * a specific tag. + * + * @param[in] contact Contact + * @return #GNUNET_YES if the contact is tagged, #GNUNET_SYSERR on failure and + * #GNUNET_NO otherwise + */ +enum GNUNET_GenericReturnValue +GNUNET_CHAT_contact_is_tagged (const struct GNUNET_CHAT_Contact *contact, + const char *tag); + /** * Iterates through the tickets of a given contact with a selected * callback and custom closure. -- cgit v1.2.3