libgnunetchat

library for GNUnet Messenger
Log | Files | Refs | README | LICENSE

commit 694606209a5704063af6bc001c00ccd2ede09657
parent 6fb953df955b223cccd8feb3a322f61a377e44da
Author: Jacki <jacki@thejackimonster.de>
Date:   Sun, 22 Sep 2024 22:26:11 +0200

Adjust const modifier for tag iteration

Signed-off-by: Jacki <jacki@thejackimonster.de>

Diffstat:
Minclude/gnunet/gnunet_chat_lib.h | 8++++----
Msrc/gnunet_chat_contact.c | 4++--
Msrc/gnunet_chat_contact.h | 4++--
Msrc/gnunet_chat_contact_intern.c | 4++--
Msrc/gnunet_chat_lib.c | 2+-
5 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/include/gnunet/gnunet_chat_lib.h b/include/gnunet/gnunet_chat_lib.h @@ -330,13 +330,13 @@ typedef enum GNUNET_GenericReturnValue * Iterator over tags of a specific chat contact. * * @param[in,out] cls Closure - * @param[in,out] contact Chat contact + * @param[in] contact Chat contact * @param[in] tag Tag * @return #GNUNET_YES if we should continue to iterate, #GNUNET_NO otherwise. */ typedef enum GNUNET_GenericReturnValue (*GNUNET_CHAT_ContactTagCallback) (void *cls, - struct GNUNET_CHAT_Contact *contact, + const struct GNUNET_CHAT_Contact *contact, const char *tag); /** @@ -1095,12 +1095,12 @@ GNUNET_CHAT_contact_is_tagged (const struct GNUNET_CHAT_Contact *contact, * Calls an optional <i>callback</i> for each tag of a given chat * <i>contact</i>. * - * @param[in,out] contact Chat contact + * @param[in] contact Chat contact * @param[in] callback Callback for tag iteration (optional) * @param[in,out] cls Closure for tag iteration (optional) */ void -GNUNET_CHAT_contact_get_tags (struct GNUNET_CHAT_Contact *contact, +GNUNET_CHAT_contact_get_tags (const struct GNUNET_CHAT_Contact *contact, GNUNET_CHAT_ContactTagCallback callback, void *cls); diff --git a/src/gnunet_chat_contact.c b/src/gnunet_chat_contact.c @@ -389,8 +389,8 @@ skip_tag_search: } void -contact_iterate_tags (struct GNUNET_CHAT_Contact *contact, - struct GNUNET_CHAT_Context *context, +contact_iterate_tags (const struct GNUNET_CHAT_Contact *contact, + const struct GNUNET_CHAT_Context *context, GNUNET_CHAT_ContactTagCallback callback, void *cls) { diff --git a/src/gnunet_chat_contact.h b/src/gnunet_chat_contact.h @@ -169,8 +169,8 @@ contact_tag (struct GNUNET_CHAT_Contact *contact, * @param[in,out] cls Closure for tag iteration or NULL */ void -contact_iterate_tags (struct GNUNET_CHAT_Contact *contact, - struct GNUNET_CHAT_Context *context, +contact_iterate_tags (const struct GNUNET_CHAT_Contact *contact, + const struct GNUNET_CHAT_Context *context, GNUNET_CHAT_ContactTagCallback callback, void *cls); diff --git a/src/gnunet_chat_contact_intern.c b/src/gnunet_chat_contact_intern.c @@ -94,7 +94,7 @@ struct GNUNET_CHAT_ContactIterateUniqueTag enum GNUNET_GenericReturnValue it_contact_iterate_unique_tag (void *cls, - struct GNUNET_CHAT_Contact *contact, + const struct GNUNET_CHAT_Contact *contact, const char *tag) { GNUNET_assert((cls) && (contact) && (tag)); @@ -119,7 +119,7 @@ it_contact_iterate_unique_tag (void *cls, struct GNUNET_CHAT_ContactIterateTag { - struct GNUNET_CHAT_Contact *contact; + const struct GNUNET_CHAT_Contact *contact; GNUNET_CHAT_ContactTagCallback callback; void *cls; }; diff --git a/src/gnunet_chat_lib.c b/src/gnunet_chat_lib.c @@ -1321,7 +1321,7 @@ GNUNET_CHAT_contact_is_tagged (const struct GNUNET_CHAT_Contact *contact, void -GNUNET_CHAT_contact_get_tags (struct GNUNET_CHAT_Contact *contact, +GNUNET_CHAT_contact_get_tags (const struct GNUNET_CHAT_Contact *contact, GNUNET_CHAT_ContactTagCallback callback, void *cls) {