GNUnet  0.11.x
Data Structures | Macros | Typedefs | Enumerations | Functions
gnunet_messenger_service.h File Reference
#include "platform.h"
#include "gnunet_configuration_lib.h"
#include "gnunet_crypto_lib.h"
#include "gnunet_identity_service.h"
#include "gnunet_mq_lib.h"
#include "gnunet_protocols.h"
#include "gnunet_scheduler_lib.h"
#include "gnunet_time_lib.h"
Include dependency graph for gnunet_messenger_service.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_MESSENGER_MessageHeader
 The header of a GNUNET_MESSENGER_Message. More...
 
struct  GNUNET_MESSENGER_MessageInfo
 An info message body. More...
 
struct  GNUNET_MESSENGER_MessageJoin
 A join message body. More...
 
struct  GNUNET_MESSENGER_MessageLeave
 A leave message body. More...
 
struct  GNUNET_MESSENGER_MessageName
 A name message body. More...
 
struct  GNUNET_MESSENGER_MessageKey
 A key message body. More...
 
struct  GNUNET_MESSENGER_MessagePeer
 A peer message body. More...
 
struct  GNUNET_MESSENGER_MessageId
 An id message body. More...
 
struct  GNUNET_MESSENGER_MessageMiss
 A miss message body. More...
 
struct  GNUNET_MESSENGER_MessageMerge
 A merge message body. More...
 
struct  GNUNET_MESSENGER_MessageRequest
 A request message body. More...
 
struct  GNUNET_MESSENGER_MessageInvite
 An invite message body. More...
 
struct  GNUNET_MESSENGER_MessageText
 A text message body. More...
 
struct  GNUNET_MESSENGER_MessageFile
 A file message body. More...
 
struct  GNUNET_MESSENGER_MessagePrivate
 A private message body. More...
 
struct  GNUNET_MESSENGER_MessageBody
 The unified body of a GNUNET_MESSENGER_Message. More...
 
struct  GNUNET_MESSENGER_Message
 Struct to a message. More...
 

Macros

#define GNUNET_MESSENGER_SERVICE_NAME   "messenger"
 

Typedefs

typedef void(* GNUNET_MESSENGER_IdentityCallback) (void *cls, struct GNUNET_MESSENGER_Handle *handle)
 Method called whenever the EGO of a handle changes or if the first connection fails to load a valid EGO and the anonymous key pair will be used instead. More...
 
typedef void(* GNUNET_MESSENGER_MessageCallback) (void *cls, const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
 Method called whenever a message is sent or received from a room. More...
 

Enumerations

enum  GNUNET_MESSENGER_MessageKind {
  GNUNET_MESSENGER_KIND_INFO = 1, GNUNET_MESSENGER_KIND_JOIN = 2, GNUNET_MESSENGER_KIND_LEAVE = 3, GNUNET_MESSENGER_KIND_NAME = 4,
  GNUNET_MESSENGER_KIND_KEY = 5, GNUNET_MESSENGER_KIND_PEER = 6, GNUNET_MESSENGER_KIND_ID = 7, GNUNET_MESSENGER_KIND_MISS = 8,
  GNUNET_MESSENGER_KIND_MERGE = 9, GNUNET_MESSENGER_KIND_REQUEST = 10, GNUNET_MESSENGER_KIND_INVITE = 11, GNUNET_MESSENGER_KIND_TEXT = 12,
  GNUNET_MESSENGER_KIND_FILE = 13, GNUNET_MESSENGER_KIND_PRIVATE = 14, GNUNET_MESSENGER_KIND_UNKNOWN = 0
}
 Enum for the different supported kinds of messages. More...
 

Functions

const char * GNUNET_MESSENGER_name_of_kind (enum GNUNET_MESSENGER_MessageKind kind)
 Get the name of a message kind. More...
 
struct GNUNET_MESSENGER_HandleGNUNET_MESSENGER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *name, GNUNET_MESSENGER_IdentityCallback identity_callback, void *identity_cls, GNUNET_MESSENGER_MessageCallback msg_callback, void *msg_cls)
 Set up a handle for the messenger related functions and connects to all necessary services. More...
 
int GNUNET_MESSENGER_update (struct GNUNET_MESSENGER_Handle *handle)
 Update a handle of the messenger to use a different ego key and replace the old one with a newly generated one. More...
 
void GNUNET_MESSENGER_disconnect (struct GNUNET_MESSENGER_Handle *handle)
 Disconnect all of the messengers used services and clears up its used memory. More...
 
const char * GNUNET_MESSENGER_get_name (const struct GNUNET_MESSENGER_Handle *handle)
 Get the name (if specified, otherwise NULL) used by the messenger. More...
 
int GNUNET_MESSENGER_set_name (struct GNUNET_MESSENGER_Handle *handle, const char *name)
 Set the name for the messenger. More...
 
const struct GNUNET_IDENTITY_PublicKeyGNUNET_MESSENGER_get_key (const struct GNUNET_MESSENGER_Handle *handle)
 Get the public key used by the messenger. More...
 
struct GNUNET_MESSENGER_RoomGNUNET_MESSENGER_open_room (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_HashCode *key)
 Open a room to send and receive messages. More...
 
struct GNUNET_MESSENGER_RoomGNUNET_MESSENGER_entry_room (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key)
 Enter a room to send and receive messages through a door opened using GNUNET_MESSENGER_open_room(...). More...
 
void GNUNET_MESSENGER_close_room (struct GNUNET_MESSENGER_Room *room)
 Close a room which was entered, opened or both in various order and variety. More...
 
struct GNUNET_MESSENGER_ContactGNUNET_MESSENGER_get_member (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_ShortHashCode *id)
 Get the contact of a member in a room identified by their id. More...
 
const char * GNUNET_MESSENGER_contact_get_name (const struct GNUNET_MESSENGER_Contact *contact)
 Get the name used by the contact. More...
 
const struct GNUNET_IDENTITY_PublicKeyGNUNET_MESSENGER_contact_get_key (const struct GNUNET_MESSENGER_Contact *contact)
 Get the public key used by the contact. More...
 
void GNUNET_MESSENGER_send_message (struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Message *message)
 Send a message into a room. More...
 
const struct GNUNET_MESSENGER_MessageGNUNET_MESSENGER_get_message (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
 Get the message in a room identified by its hash. More...
 

Detailed Description

Author
Tobias Frisch

MESSENGER service; manages decentralized chat groups

Definition in file gnunet_messenger_service.h.