#include "gnunet_util_lib.h"
#include "gnunet-service-messenger.h"
#include "gnunet-service-messenger_handle.h"
#include "gnunet-service-messenger_room.h"
#include "gnunet-service-messenger_service.h"
#include "messenger_api_message.h"
Go to the source code of this file.
Data Structures | |
struct | GNUNET_MESSENGER_Client |
Variables | |
struct GNUNET_MESSENGER_Service * | messenger |
|
static |
Definition at line 42 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, and GNUNET_SERVICE_client_continue().
|
static |
Definition at line 58 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_log, and GNUNET_SERVICE_client_drop().
|
static |
Definition at line 74 of file gnunet-service-messenger.c.
References GNUNET_assert, GNUNET_CRYPTO_read_public_key_from_buffer(), GNUNET_NO, GNUNET_OK, key, msg, and GNUNET_MessageHeader::size.
Referenced by check_room_entry(), and check_room_open().
|
static |
Definition at line 108 of file gnunet-service-messenger.c.
References GNUNET_assert, GNUNET_CRYPTO_read_public_key_from_buffer(), GNUNET_ERROR_TYPE_ERROR, GNUNET_ERROR_TYPE_WARNING, GNUNET_log, GNUNET_OK, handle, key, msg, set_srv_handle_key(), and GNUNET_MessageHeader::size.
Referenced by handle_room_entry(), and handle_room_open().
|
static |
Definition at line 141 of file gnunet-service-messenger.c.
References check_room_initial_key(), and msg.
|
static |
Definition at line 149 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, env, get_srv_handle_member_id(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_OPEN, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_sh2s(), GNUNET_YES, GNUNET_MESSENGER_Client::handle, initialize_handle_via_key(), GNUNET_MESSENGER_SrvHandle::mq, msg, open_srv_handle_room(), GNUNET_MQ_Envelope::prev, response, and sync_srv_handle_messages().
|
static |
Definition at line 192 of file gnunet-service-messenger.c.
References check_room_initial_key(), and msg.
|
static |
Definition at line 200 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, entry_srv_handle_room(), env, get_srv_handle_member_id(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_i2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_ENTRY, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_sh2s(), GNUNET_YES, GNUNET_MESSENGER_Client::handle, initialize_handle_via_key(), GNUNET_MESSENGER_SrvHandle::mq, msg, GNUNET_MQ_Envelope::prev, response, and sync_srv_handle_messages().
|
static |
Definition at line 246 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, close_srv_handle_room(), env, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_CLOSE, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_YES, GNUNET_MESSENGER_Client::handle, GNUNET_MESSENGER_SrvHandle::mq, msg, and response.
|
static |
Definition at line 281 of file gnunet-service-messenger.c.
References GNUNET_MESSENGER_Client::client, env, GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_SYNC, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_SERVICE_client_continue(), GNUNET_MESSENGER_Client::handle, GNUNET_MESSENGER_SrvHandle::mq, msg, GNUNET_MQ_Envelope::prev, response, and sync_srv_handle_messages().
|
static |
Definition at line 312 of file gnunet-service-messenger.c.
References cleanup_message(), decode_message(), filter_message_sending(), get_message_kind_size(), GNUNET_assert, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_MESSENGER_KIND_UNKNOWN, GNUNET_MESSENGER_name_of_kind(), GNUNET_NO, GNUNET_OK, GNUNET_SYSERR, GNUNET_YES, GNUNET_MESSENGER_Message::header, GNUNET_MESSENGER_MessageHeader::kind, msg, and GNUNET_MessageHeader::size.
|
static |
Definition at line 365 of file gnunet-service-messenger.c.
References cleanup_message(), GNUNET_MESSENGER_Client::client, decode_message(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_MESSENGER_name_of_kind(), GNUNET_SERVICE_client_continue(), GNUNET_sh2s(), GNUNET_YES, GNUNET_MESSENGER_Client::handle, GNUNET_MESSENGER_Message::header, key, GNUNET_MESSENGER_MessageHeader::kind, msg, send_srv_handle_message(), GNUNET_MESSENGER_MessageHeader::sender_id, and GNUNET_MessageHeader::size.
|
static |
Definition at line 404 of file gnunet-service-messenger.c.
References env, get_member_session_of(), get_srv_room_member_store(), get_srv_room_peer_store(), get_store_member_of(), get_store_peer_of(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_memcpy, GNUNET_MESSAGE_TYPE_MESSENGER_ROOM_GET_MESSAGE, GNUNET_MQ_msg, GNUNET_MQ_send(), GNUNET_NO, GNUNET_YES, GNUNET_MESSENGER_Client::handle, is_peer_message(), GNUNET_MESSENGER_SrvRoom::key, GNUNET_MESSENGER_SenderSession::member, GNUNET_MESSENGER_SrvHandle::mq, notify_srv_handle_message(), GNUNET_MESSENGER_SenderSession::peer, response, and GNUNET_MESSENGER_Member::store.
Referenced by handle_get_message().
|
static |
Definition at line 480 of file gnunet-service-messenger.c.
References callback_found_message(), GNUNET_MESSENGER_Client::client, get_member_session(), get_service_room(), get_srv_handle_key(), get_srv_handle_member_id(), get_srv_room_member_store(), get_store_member(), GNUNET_assert, GNUNET_ERROR_TYPE_DEBUG, GNUNET_ERROR_TYPE_ERROR, GNUNET_h2s(), GNUNET_log, GNUNET_SERVICE_client_continue(), GNUNET_sh2s(), GNUNET_MESSENGER_Client::handle, messenger, msg, pubkey, request_srv_room_message(), and GNUNET_MESSENGER_MemberStore::room.
|
static |
Definition at line 556 of file gnunet-service-messenger.c.
References add_service_handle(), GNUNET_MESSENGER_Client::client, GNUNET_assert, GNUNET_new, GNUNET_MESSENGER_Client::handle, messenger, and mq.
|
static |
Definition at line 574 of file gnunet-service-messenger.c.
References GNUNET_assert, GNUNET_free, GNUNET_MESSENGER_Client::handle, messenger, and remove_service_handle().
|
static |
Setup MESSENGER internals.
[in/out] | cls closure | |
[in] | config | configuration to use |
[in/out] | service the initialized service |
Definition at line 598 of file gnunet-service-messenger.c.
References config, create_service(), GNUNET_assert, GNUNET_SCHEDULER_shutdown(), messenger, and service.
Define "main" method using service macro.
struct GNUNET_MESSENGER_Service* messenger |
Definition at line 39 of file gnunet-service-messenger.c.
Referenced by callback_client_connect(), callback_client_disconnect(), handle_get_message(), and run().