32 #ifndef GNUNET_MESSENGER_SERVICE_H 33 #define GNUNET_MESSENGER_SERVICE_H 54 #define GNUNET_MESSENGER_VERSION 0x00000001 59 #define GNUNET_MESSENGER_SERVICE_NAME "messenger" 162 #define GNUNET_MESSENGER_KIND_MAX (GNUNET_MESSENGER_KIND_DELETE) 757 #endif //GNUNET_MESSENGER_SERVICE_H
const struct GNUNET_MESSENGER_Message * GNUNET_MESSENGER_get_message(const struct GNUNET_MESSENGER_Room *room, const struct GNUNET_HashCode *hash)
Get the message in a room identified by its hash.
const struct GNUNET_IDENTITY_PublicKey * GNUNET_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.
static struct GNUNET_VPN_RedirectionRequest * request
Opaque redirection request handle.
struct GNUNET_MESSENGER_Room * GNUNET_MESSENGER_open_room(struct GNUNET_MESSENGER_Handle *handle, const struct GNUNET_HashCode *key)
Open a room to send and receive messages.
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
void GNUNET_MESSENGER_close_room(struct GNUNET_MESSENGER_Room *room)
Close a room which was entered, opened or both in various order and variety.
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.
char * uri
The uri of the encrypted file.
struct GNUNET_MESSENGER_Room * GNUNET_MESSENGER_enter_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.
const char * GNUNET_MESSENGER_contact_get_name(const struct GNUNET_MESSENGER_Contact *contact)
Get the name used by the contact.
int GNUNET_MESSENGER_set_name(struct GNUNET_MESSENGER_Handle *handle, const char *name)
Set the name for the messenger.
uint32_t messenger_version
The version of GNUnet Messenger API.
static struct GNUNET_IDENTITY_Handle * id
Handle to identity service.
Time for relative time used by GNUnet, in microseconds and in network byte order. ...
char * text
The containing text.
Time for absolute time used by GNUnet, in microseconds and in network byte order. ...
GNUNET_MESSENGER_MessageFlags
Enum for the different supported flags used by message handling.
cryptographic primitives for GNUnet
The unified body of a GNUNET_MESSENGER_Message.
GNUNET_MESSENGER_MessageCallback msg_callback
An identity signature as per LSD0001.
const char * GNUNET_MESSENGER_name_of_kind(enum GNUNET_MESSENGER_MessageKind kind)
Get the name of a message kind.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
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 gene...
uint16_t length
The length of the encrypted message.
int(* 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.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_HashCode key
The key used in the DHT.
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 E...
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
void(* GNUNET_MESSENGER_MessageCallback)(void *cls, struct GNUNET_MESSENGER_Room *room, const struct GNUNET_MESSENGER_Contact *sender, 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.
The identity of the host (wraps the signing key of the peer).
struct GNUNET_MESSENGER_Handle * GNUNET_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...
An identity key as per LSD0001.
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 pr...
char * data
The data of the encrypted message.
void GNUNET_MESSENGER_disconnect(struct GNUNET_MESSENGER_Handle *handle)
Disconnect all of the messengers used services and clears up its used memory.
Public ECC key (always for Curve25519) encoded in a format suitable for network transmission and encr...
const char * GNUNET_MESSENGER_get_name(const struct GNUNET_MESSENGER_Handle *handle)
Get the name (if specified, otherwise NULL) used by the messenger.
const struct GNUNET_IDENTITY_PublicKey * GNUNET_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.
GNUNET_MESSENGER_MessageKind
Enum for the different supported kinds of messages.
char * name
The new name which replaces the current senders name.
static int delete
Set if we should delete configuration and temp directory on exit.
GNUNET_MESSENGER_IdentityCallback identity_callback
A delete message body This allows deletion of an own previous message with any custom automatic delay...
struct GNUNET_MESSENGER_Contact * GNUNET_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...