commit 15c924179c32a3294478c3be119d534294bbac37 parent 8811964aaf9b12ef9703d064b9509dfa4414a591 Author: TheJackiMonster <thejackimonster@gmail.com> Date: Fri, 8 Dec 2023 18:26:50 +0100 MESSENGER: Types adjusted Signed-off-by: TheJackiMonster <thejackimonster@gmail.com> Diffstat:
18 files changed, 34 insertions(+), 34 deletions(-)
diff --git a/src/include/gnunet_messenger_service.h b/src/include/gnunet_messenger_service.h @@ -595,7 +595,7 @@ typedef void * @param[in] room Room handle * @param[in] contact Contact handle */ -typedef int +typedef enum GNUNET_GenericReturnValue (*GNUNET_MESSENGER_MemberCallback) (void *cls, struct GNUNET_MESSENGER_Room *room, const struct @@ -644,7 +644,7 @@ GNUNET_MESSENGER_get_name (const struct GNUNET_MESSENGER_Handle *handle); * @param[in] name Name for the messenger to change to * @return #GNUNET_YES on success, #GNUNET_NO on failure and #GNUNET_SYSERR if <i>handle</i> is NULL */ -int +enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_name (struct GNUNET_MESSENGER_Handle *handle, const char *name); @@ -666,7 +666,7 @@ GNUNET_MESSENGER_get_key (const struct GNUNET_MESSENGER_Handle *handle); * @param[in] key Private key to change to or NULL * @return #GNUNET_YES on success, #GNUNET_NO on failure and #GNUNET_SYSERR if <i>handle</i> is NULL */ -int +enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_key (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_CRYPTO_PrivateKey *key); diff --git a/src/service/messenger/gnunet-service-messenger.c b/src/service/messenger/gnunet-service-messenger.c @@ -63,7 +63,7 @@ handle_destroy (void *cls, } -static int +static enum GNUNET_GenericReturnValue check_room_initial_key (const struct GNUNET_MESSENGER_RoomMessage *msg) { const uint16_t full_length = ntohs (msg->header.size); @@ -118,7 +118,7 @@ initialize_handle_via_key (struct GNUNET_MESSENGER_SrvHandle *handle, } -static int +static enum GNUNET_GenericReturnValue check_room_open (void *cls, const struct GNUNET_MESSENGER_RoomMessage *msg) { @@ -165,7 +165,7 @@ handle_room_open (void *cls, } -static int +static enum GNUNET_GenericReturnValue check_room_entry (void *cls, const struct GNUNET_MESSENGER_RoomMessage *msg) { @@ -271,7 +271,7 @@ handle_room_sync (void *cls, } -static int +static enum GNUNET_GenericReturnValue check_send_message (void *cls, const struct GNUNET_MESSENGER_SendMessage *msg) { diff --git a/src/service/messenger/gnunet-service-messenger_message_send.c b/src/service/messenger/gnunet-service-messenger_message_send.c @@ -85,7 +85,7 @@ notify_about_members (struct GNUNET_MESSENGER_MemberNotify *notify, } -static int +static enum GNUNET_GenericReturnValue iterate_notify_about_members (void *cls, const struct GNUNET_CRYPTO_PublicKey *public_key, diff --git a/src/service/messenger/gnunet-service-messenger_operation_store.c b/src/service/messenger/gnunet-service-messenger_operation_store.c @@ -40,7 +40,7 @@ init_operation_store (struct GNUNET_MESSENGER_OperationStore *store, } -static int +static enum GNUNET_GenericReturnValue iterate_destroy_operations (void *cls, const struct GNUNET_HashCode *key, void *value) diff --git a/src/service/messenger/gnunet-service-messenger_room.c b/src/service/messenger/gnunet-service-messenger_room.c @@ -85,7 +85,7 @@ create_srv_room (struct GNUNET_MESSENGER_SrvHandle *handle, } -static int +static enum GNUNET_GenericReturnValue iterate_destroy_tunnels (void *cls, const struct GNUNET_PeerIdentity *key, void *value) @@ -179,7 +179,7 @@ get_srv_room_operation_store (struct GNUNET_MESSENGER_SrvRoom *room) } -static int +static enum GNUNET_GenericReturnValue send_room_info (struct GNUNET_MESSENGER_SrvRoom *room, struct GNUNET_MESSENGER_SrvHandle *handle, struct GNUNET_MESSENGER_SrvTunnel *tunnel) diff --git a/src/service/messenger/messenger_api.c b/src/service/messenger/messenger_api.c @@ -213,7 +213,7 @@ handle_member_id (void *cls, } -static int +static enum GNUNET_GenericReturnValue check_recv_message (void *cls, const struct GNUNET_MESSENGER_RecvMessage *msg) { @@ -471,7 +471,7 @@ send_sync_room (struct GNUNET_MESSENGER_Handle *handle, } -static int +static enum GNUNET_GenericReturnValue iterate_reset_room (void *cls, const struct GNUNET_HashCode *key, void *value) @@ -516,7 +516,7 @@ callback_reconnect (void *cls) } -static int +static enum GNUNET_GenericReturnValue iterate_close_room (void *cls, const struct GNUNET_HashCode *key, void *value) @@ -758,7 +758,7 @@ GNUNET_MESSENGER_get_name (const struct GNUNET_MESSENGER_Handle *handle) } -static int +static enum GNUNET_GenericReturnValue iterate_send_name_to_room (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact) @@ -784,7 +784,7 @@ iterate_send_name_to_room (void *cls, } -int +enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_name (struct GNUNET_MESSENGER_Handle *handle, const char *name) { @@ -817,7 +817,7 @@ GNUNET_MESSENGER_get_key (const struct GNUNET_MESSENGER_Handle *handle) } -static int +static enum GNUNET_GenericReturnValue iterate_send_key_to_room (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact) @@ -835,7 +835,7 @@ iterate_send_key_to_room (void *cls, } -int +enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_key (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_CRYPTO_PrivateKey *key) { @@ -942,7 +942,7 @@ struct GNUNET_MESSENGER_RoomFind void *cls; }; -static int +static enum GNUNET_GenericReturnValue iterate_find_room (void *cls, const struct GNUNET_HashCode *key, void *value) diff --git a/src/service/messenger/messenger_api_cmd_start_service.c b/src/service/messenger/messenger_api_cmd_start_service.c @@ -115,7 +115,7 @@ start_service_cleanup (void *cls) GNUNET_free (sss); } -static int +static enum GNUNET_GenericReturnValue start_service_traits (void *cls, const void **ret, const char *trait, diff --git a/src/service/messenger/messenger_api_cmd_stop_service.c b/src/service/messenger/messenger_api_cmd_stop_service.c @@ -34,7 +34,7 @@ struct GNUNET_MESSENGER_StopServiceState char *service_label; }; -static int +static enum GNUNET_GenericReturnValue cleanup_rooms_cb (void *cls, const struct GNUNET_HashCode *key, void *value) diff --git a/src/service/messenger/messenger_api_contact.c b/src/service/messenger/messenger_api_contact.c @@ -97,7 +97,7 @@ increase_contact_rc (struct GNUNET_MESSENGER_Contact *contact) } -int +enum GNUNET_GenericReturnValue decrease_contact_rc (struct GNUNET_MESSENGER_Contact *contact) { GNUNET_assert (contact); diff --git a/src/service/messenger/messenger_api_contact.h b/src/service/messenger/messenger_api_contact.h @@ -101,7 +101,7 @@ increase_contact_rc (struct GNUNET_MESSENGER_Contact *contact); * @param[in,out] contact Contact * @return #GNUNET_YES or #GNUNET_NO depending on the reference counter */ -int +enum GNUNET_GenericReturnValue decrease_contact_rc (struct GNUNET_MESSENGER_Contact *contact); /** diff --git a/src/service/messenger/messenger_api_contact_store.c b/src/service/messenger/messenger_api_contact_store.c @@ -41,7 +41,7 @@ init_contact_store (struct GNUNET_MESSENGER_ContactStore *store) } -static int +static enum GNUNET_GenericReturnValue iterate_destroy_contacts (void *cls, const struct GNUNET_HashCode *key, void *value) diff --git a/src/service/messenger/messenger_api_handle.c b/src/service/messenger/messenger_api_handle.c @@ -60,7 +60,7 @@ create_handle (const struct GNUNET_CONFIGURATION_Handle *cfg, } -static int +static enum GNUNET_GenericReturnValue iterate_destroy_room (void *cls, const struct GNUNET_HashCode *key, void *value) diff --git a/src/service/messenger/messenger_api_list_tunnels.c b/src/service/messenger/messenger_api_list_tunnels.c @@ -135,7 +135,7 @@ update_to_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, } -int +enum GNUNET_GenericReturnValue contains_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct GNUNET_PeerIdentity *peer) { diff --git a/src/service/messenger/messenger_api_list_tunnels.h b/src/service/messenger/messenger_api_list_tunnels.h @@ -118,7 +118,7 @@ update_to_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, * @param[in] peer Peer identity of tunnel * @return #GNUNET_YES on success, otherwise #GNUNET_NO */ -int +enum GNUNET_GenericReturnValue contains_list_tunnels (struct GNUNET_MESSENGER_ListTunnels *tunnels, const struct GNUNET_PeerIdentity *peer); diff --git a/src/service/messenger/messenger_api_room.c b/src/service/messenger/messenger_api_room.c @@ -59,7 +59,7 @@ create_room (struct GNUNET_MESSENGER_Handle *handle, } -static int +static enum GNUNET_GenericReturnValue iterate_destroy_message (void *cls, const struct GNUNET_HashCode *key, void *value) @@ -420,7 +420,7 @@ struct GNUNET_MESSENGER_MemberCall void *cls; }; -static int +static enum GNUNET_GenericReturnValue iterate_local_members (void *cls, const struct GNUNET_ShortHashCode *key, void *value) @@ -462,7 +462,7 @@ struct GNUNET_MESSENGER_MemberFind enum GNUNET_GenericReturnValue result; }; -static int +static enum GNUNET_GenericReturnValue iterate_find_member (void *cls, const struct GNUNET_ShortHashCode *key, void *value) @@ -480,7 +480,7 @@ iterate_find_member (void *cls, } -int +enum GNUNET_GenericReturnValue find_room_member (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact) { diff --git a/src/service/messenger/messenger_api_room.h b/src/service/messenger/messenger_api_room.h @@ -177,7 +177,7 @@ iterate_room_members (struct GNUNET_MESSENGER_Room *room, * @param[in] contact * @return #GNUNET_YES if found, otherwise #GNUNET_NO */ -int +enum GNUNET_GenericReturnValue find_room_member (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact); diff --git a/src/service/messenger/messenger_api_util.c b/src/service/messenger/messenger_api_util.c @@ -47,7 +47,7 @@ delayed_disconnect_channel (struct GNUNET_CADET_Channel *channel) } -int +enum GNUNET_GenericReturnValue generate_free_member_id (struct GNUNET_ShortHashCode *id, const struct GNUNET_CONTAINER_MultiShortmap *members) { diff --git a/src/service/messenger/messenger_api_util.h b/src/service/messenger/messenger_api_util.h @@ -48,7 +48,7 @@ delayed_disconnect_channel (struct GNUNET_CADET_Channel *channel); * @param[in] members Map of member ids * @return #GNUNET_YES on success, #GNUNET_NO on failure */ -int +enum GNUNET_GenericReturnValue generate_free_member_id (struct GNUNET_ShortHashCode *id, const struct GNUNET_CONTAINER_MultiShortmap *members);