GNUnet debian-0.24.3-23-g589b01d60
gnunet_messenger_service.h File Reference
#include "gnunet_util_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_RoomKeyCode
 A room key code specifies an identifier of a room and its individual properties. More...
 
union  GNUNET_MESSENGER_RoomKey
 A room key unifies a room key code and its 512bit hash representation. More...
 
struct  GNUNET_MESSENGER_RoomEntryRecord
 A room entry record specifies which peer is hosting a given room and may also specify the key to enter it. More...
 
struct  GNUNET_MESSENGER_RoomDetailsRecord
 A room details record specifies a custom name for a given room and some additional space for flags. More...
 
struct  GNUNET_MESSENGER_EpochIdentifierCode
 An epoch identifier code specifies an epoch or group key inside a room and it provides the information about its group size. More...
 
union  GNUNET_MESSENGER_EpochIdentifier
 An epoch identifier unifies an epoch identifier code and its 256bit hash representation. More...
 
struct  GNUNET_MESSENGER_RoomEpochKeyRecord
 A room epoch key record specifies an epoch key for a given room that can be identified via a given key to enter it and an epoch identifier. More...
 
struct  GNUNET_MESSENGER_EpochNonceData
 Struct to store a unique epoch nonce for message data encryption. More...
 
union  GNUNET_MESSENGER_EpochNonce
 An epoch nonce unifies the epoch nonce data and its 256bit hash representation. More...
 
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_MessageDeletion
 A deletion message body This allows deletion of an own previous message with any custom automatic delay. More...
 
struct  GNUNET_MESSENGER_MessageConnection
 A connection message body This allows to tell others about connection information about a peer. More...
 
struct  GNUNET_MESSENGER_MessageTicket
 A ticket message body This allows to exchange ticket identifiers with an audience. More...
 
struct  GNUNET_MESSENGER_MessageTranscript
 A transcript message body This allows reading the content of a sent private message. More...
 
struct  GNUNET_MESSENGER_MessageTag
 A tag message body This allows tagging a message with a custom tag. More...
 
struct  GNUNET_MESSENGER_MessageSubscribtion
 A subscribtion message body This allows subscribing to a discourse. More...
 
struct  GNUNET_MESSENGER_MessageTalk
 A talk message body This allows talking in a discourse. More...
 
struct  GNUNET_MESSENGER_MessageAnnouncement
 An announcement message body This allows announcing group and epoch keys. More...
 
struct  GNUNET_MESSENGER_MessageSecret
 A secret message body This allows exchanging encrypted messages. More...
 
struct  GNUNET_MESSENGER_MessageAppeal
 An appeal message body This allows appealing to receive an epoch key. More...
 
struct  GNUNET_MESSENGER_MessageAccess
 An access message body This allows providing access to a group or an epoch key using a public key. More...
 
struct  GNUNET_MESSENGER_MessageRevolution
 A revolution message body This allows revolutionizing a group or epoch. More...
 
struct  GNUNET_MESSENGER_MessageGroup
 A group message body This allows forming an epoch group. More...
 
struct  GNUNET_MESSENGER_MessageAuthorization
 An authorization message body This allows providing access to a group or an epoch key using an established shared key. 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_VERSION   0x00000006
 Version number of GNUnet Messenger API. More...
 
#define GNUNET_MESSENGER_SERVICE_NAME   "messenger"
 Identifier of GNUnet MESSENGER Service. More...
 
#define GNUNET_MESSENGER_EPOCH_NONCE_BYTES    sizeof (struct GNUNET_ShortHashCode)
 
#define GNUNET_MESSENGER_KIND_MAX   (GNUNET_MESSENGER_KIND_TALK)
 
#define GNUNET_MESSENGER_SECRET_IV_BYTES    sizeof (struct GNUNET_CRYPTO_SymmetricInitializationVector)
 
#define GNUNET_MESSENGER_ACCESS_KEY_BYTES
 
#define GNUNET_MESSENGER_AUTHORIZATION_KEY_BYTES    sizeof (struct GNUNET_CRYPTO_SymmetricSessionKey)
 

Typedefs

typedef void(* GNUNET_MESSENGER_MessageCallback) (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *sender, const struct GNUNET_MESSENGER_Contact *recipient, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash, enum GNUNET_MESSENGER_MessageFlags flags)
 Method called whenever a message is sent or received from a room. More...
 
typedef enum GNUNET_GenericReturnValue(* GNUNET_MESSENGER_MemberCallback) (void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *contact)
 Method called for each member in a room during iteration. 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_DELETION = 15 , GNUNET_MESSENGER_KIND_CONNECTION = 16 ,
  GNUNET_MESSENGER_KIND_TICKET = 17 , GNUNET_MESSENGER_KIND_TRANSCRIPT = 18 , GNUNET_MESSENGER_KIND_TAG = 19 , GNUNET_MESSENGER_KIND_SUBSCRIBTION = 20 ,
  GNUNET_MESSENGER_KIND_TALK = 21 , GNUNET_MESSENGER_KIND_ANNOUNCEMENT = 22 , GNUNET_MESSENGER_KIND_SECRET = 23 , GNUNET_MESSENGER_KIND_APPEAL = 24 ,
  GNUNET_MESSENGER_KIND_ACCESS = 25 , GNUNET_MESSENGER_KIND_REVOLUTION = 26 , GNUNET_MESSENGER_KIND_GROUP = 27 , GNUNET_MESSENGER_KIND_AUTHORIZATION = 28 ,
  GNUNET_MESSENGER_KIND_UNKNOWN = 0
}
 Enum for the different supported kinds of messages. More...
 
enum  GNUNET_MESSENGER_MessageFlags {
  GNUNET_MESSENGER_FLAG_NONE = 0 , GNUNET_MESSENGER_FLAG_SENT = 1 , GNUNET_MESSENGER_FLAG_PRIVATE = 2 , GNUNET_MESSENGER_FLAG_PEER = 4 ,
  GNUNET_MESSENGER_FLAG_RECENT = 8 , GNUNET_MESSENGER_FLAG_UPDATE = 16 , GNUNET_MESSENGER_FLAG_DELETE = 32 , GNUNET_MESSENGER_FLAG_SECRET = 64 ,
  GNUNET_MESSENGER_FLAG_MEMBER = 128
}
 Enum for the different supported flags used by message handling. More...
 
enum  GNUNET_MESSENGER_ConnectionFlags { GNUNET_MESSENGER_FLAG_CONNECTION_NONE = 0 , GNUNET_MESSENGER_FLAG_CONNECTION_AUTO = 1 }
 Enum for the different supported flags used to specify connection handling. More...
 
enum  GNUNET_MESSENGER_SubscriptionFlags { GNUNET_MESSENGER_FLAG_SUBSCRIPTION_NONE = 0 , GNUNET_MESSENGER_FLAG_SUBSCRIPTION_UNSUBSCRIBE = 1 , GNUNET_MESSENGER_FLAG_SUBSCRIPTION_KEEP_ALIVE = 2 }
 Enum for the different supported flags used to specify subscription handling. More...
 
enum  GNUNET_MESSENGER_EpochFlags { GNUNET_MESSENGER_FLAG_EPOCH_NONE = 0 , GNUNET_MESSENGER_FLAG_EPOCH_VALID = 1 }
 

Functions

const char * GNUNET_MESSENGER_name_of_kind (enum GNUNET_MESSENGER_MessageKind kind)
 Get the name of a message kind. More...
 
void GNUNET_MESSENGER_create_room_key (union GNUNET_MESSENGER_RoomKey *key, const char *input, enum GNUNET_GenericReturnValue is_public, enum GNUNET_GenericReturnValue is_group, enum GNUNET_GenericReturnValue is_feed)
 Creates a room key from given optional input string using certain properties for this targeted room. More...
 
struct GNUNET_MESSENGER_HandleGNUNET_MESSENGER_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, const char *name, const struct GNUNET_CRYPTO_PrivateKey *key, GNUNET_MESSENGER_MessageCallback msg_callback, void *msg_cls)
 Set up a handle for the messenger related functions and connects to all necessary services. 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...
 
enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_name (struct GNUNET_MESSENGER_Handle *handle, const char *name)
 Set the name for the messenger handle and sends messages renaming your contact in currently open rooms. More...
 
const struct GNUNET_CRYPTO_PublicKeyGNUNET_MESSENGER_get_key (const struct GNUNET_MESSENGER_Handle *handle)
 Get the public key used by the messenger or NULL if the anonymous key was used. More...
 
enum GNUNET_GenericReturnValue GNUNET_MESSENGER_set_key (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_CRYPTO_PrivateKey *key)
 Set the private key used by the messenger or NULL if the anonymous key should be used instead. More...
 
struct GNUNET_MESSENGER_RoomGNUNET_MESSENGER_open_room (struct GNUNET_MESSENGER_Handle *handle, const union GNUNET_MESSENGER_RoomKey *key)
 Open a room to send and receive messages. More...
 
struct GNUNET_MESSENGER_RoomGNUNET_MESSENGER_enter_room (struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_PeerIdentity *door, const union GNUNET_MESSENGER_RoomKey *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...
 
int GNUNET_MESSENGER_find_rooms (const struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_MESSENGER_Contact *contact, GNUNET_MESSENGER_MemberCallback callback, void *cls)
 Searches for a specific contact in a given room and calls a selected callback with a given closure for each of them containing the contact as a member. More...
 
const struct GNUNET_HashCodeGNUNET_MESSENGER_room_get_key (const struct GNUNET_MESSENGER_Room *room)
 Get the key of a given room. More...
 
const struct GNUNET_MESSENGER_ContactGNUNET_MESSENGER_get_sender (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
 Get the contact of a member in a room which sent a specific message identified with a given hash. More...
 
const struct GNUNET_MESSENGER_ContactGNUNET_MESSENGER_get_recipient (const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
 Get the contact of a member in a room which has been targeted as recipient of a specific message identified with a given hash. 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_CRYPTO_PublicKeyGNUNET_MESSENGER_contact_get_key (const struct GNUNET_MESSENGER_Contact *contact)
 Get the public key used by the contact or NULL if the anonymous key was used. More...
 
size_t GNUNET_MESSENGER_contact_get_id (const struct GNUNET_MESSENGER_Contact *contact)
 Get the locally unique id of the contact. More...
 
void GNUNET_MESSENGER_send_message (struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_MESSENGER_Contact *contact)
 Send a message into a room. More...
 
void GNUNET_MESSENGER_delete_message (struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
 Delete a message identified by its hash from a room. More...
 
const struct GNUNET_MESSENGER_MessageGNUNET_MESSENGER_get_message (struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
 Get the message in a room identified by its hash and requests it if necessary. More...
 
int GNUNET_MESSENGER_iterate_members (struct GNUNET_MESSENGER_Room *room, GNUNET_MESSENGER_MemberCallback callback, void *cls)
 Iterates through all members of a given room and calls a selected callback for each of them with a provided closure. More...
 

Detailed Description

Author
Tobias Frisch

MESSENGER service; manages decentralized chat groups

Definition in file gnunet_messenger_service.h.