Go to the source code of this file.
Functions | |
| void | init_list_handles (struct GNUNET_MESSENGER_ListHandles *handles) |
| Initializes list of handles as empty list. | |
| void | clear_list_handles (struct GNUNET_MESSENGER_ListHandles *handles) |
| Destroys remaining handles and clears the list. | |
| void | add_list_handle (struct GNUNET_MESSENGER_ListHandles *handles, struct GNUNET_MESSENGER_SrvHandle *handle) |
| Adds a specific handle to the end of the list. | |
| enum GNUNET_GenericReturnValue | remove_list_handle (struct GNUNET_MESSENGER_ListHandles *handles, struct GNUNET_MESSENGER_SrvHandle *handle) |
| Removes the first entry matching with a specific handle from the list of handles and returns GNUNET_YES on success or GNUNET_NO on failure. | |
| struct GNUNET_MESSENGER_SrvHandle * | find_list_handle_by_member (const struct GNUNET_MESSENGER_ListHandles *handles, const struct GNUNET_HashCode *key) |
| Searches linearly through the list of handles for members of a specific room which is identified by a given key. | |
| void init_list_handles | ( | struct GNUNET_MESSENGER_ListHandles * | handles | ) |
Initializes list of handles as empty list.
| [out] | handles | List of handles |
Definition at line 31 of file gnunet-service-messenger_list_handles.c.
References GNUNET_assert, GNUNET_MESSENGER_ListHandles::head, and GNUNET_MESSENGER_ListHandles::tail.
Referenced by create_service().
| void clear_list_handles | ( | struct GNUNET_MESSENGER_ListHandles * | handles | ) |
Destroys remaining handles and clears the list.
| [in,out] | handles | List of handles |
Definition at line 41 of file gnunet-service-messenger_list_handles.c.
References destroy_srv_handle(), GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_free, GNUNET_MESSENGER_ListHandle::handle, GNUNET_MESSENGER_ListHandles::head, and GNUNET_MESSENGER_ListHandles::tail.
Referenced by destroy_service().
| void add_list_handle | ( | struct GNUNET_MESSENGER_ListHandles * | handles, |
| struct GNUNET_MESSENGER_SrvHandle * | handle | ||
| ) |
Adds a specific handle to the end of the list.
| [in,out] | handles | List of handles |
| [in,out] | handle | Handle |
Definition at line 60 of file gnunet-service-messenger_list_handles.c.
References GNUNET_assert, GNUNET_CONTAINER_DLL_insert_tail, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, GNUNET_new, handle, GNUNET_MESSENGER_ListHandle::handle, GNUNET_MESSENGER_ListHandles::head, and GNUNET_MESSENGER_ListHandles::tail.
Referenced by add_service_handle().
| enum GNUNET_GenericReturnValue remove_list_handle | ( | struct GNUNET_MESSENGER_ListHandles * | handles, |
| struct GNUNET_MESSENGER_SrvHandle * | handle | ||
| ) |
Removes the first entry matching with a specific handle from the list of handles and returns GNUNET_YES on success or GNUNET_NO on failure.
| [in,out] | handles | List of handles |
| [in,out] | handle | Handle |
Definition at line 77 of file gnunet-service-messenger_list_handles.c.
References GNUNET_assert, GNUNET_CONTAINER_DLL_remove, GNUNET_ERROR_TYPE_DEBUG, GNUNET_free, GNUNET_log, GNUNET_NO, GNUNET_YES, handle, GNUNET_MESSENGER_ListHandle::handle, GNUNET_MESSENGER_ListHandles::head, GNUNET_MESSENGER_ListHandle::next, and GNUNET_MESSENGER_ListHandles::tail.
Referenced by remove_service_handle().
| struct GNUNET_MESSENGER_SrvHandle * find_list_handle_by_member | ( | const struct GNUNET_MESSENGER_ListHandles * | handles, |
| const struct GNUNET_HashCode * | key | ||
| ) |
Searches linearly through the list of handles for members of a specific room which is identified by a given key.
The handle returned will be one that has enabled routing for the room if possible.
If no handle is found which is a current member, NULL gets returned.
| [in] | handles | List of handles |
| [in] | key | Common key of a room |
Definition at line 101 of file gnunet-service-messenger_list_handles.c.
References get_srv_handle_member_id(), GNUNET_assert, GNUNET_YES, handle, GNUNET_MESSENGER_ListHandle::handle, GNUNET_MESSENGER_ListHandles::head, is_srv_handle_routing(), key, and GNUNET_MESSENGER_ListHandle::next.
Referenced by close_service_room().