26#ifndef GNUNET_SERVICE_MESSENGER_MEMBER_SESSION_H
27#define GNUNET_SERVICE_MESSENGER_MEMBER_SESSION_H
271 const char *directory);
283 const char *directory);
294 const char *directory);
static struct GNUNET_CRYPTO_PublicKey pubkey
Public key of the zone to look in.
void clear_member_session_history(struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_HashCode *hash)
Removes a message from the history of a session using the messages hash.
void destroy_member_session(struct GNUNET_MESSENGER_MemberSession *session)
Destroys a member session and frees its memory fully.
const struct GNUNET_CRYPTO_PublicKey * get_member_session_public_key(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the public key of a given member session.
void load_member_session_next(struct GNUNET_MESSENGER_MemberSession *session, const char *directory)
Loads the connection from one session to another through the next attribute.
void close_member_session(struct GNUNET_MESSENGER_MemberSession *session)
Closes a given member session which opens the request for completion of the given member session.
struct GNUNET_TIME_Absolute get_member_session_start(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the timestamp of the member session's start.
void update_member_session_history(struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Adds a given message to the history of a session using the messages hash.
const struct GNUNET_ShortHashCode * get_member_session_id(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the member id of a given member session.
enum GNUNET_GenericReturnValue check_member_session_history(const struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_HashCode *hash, enum GNUNET_GenericReturnValue ownership)
Checks the history of a session for a specific message which is identified by its hash and if the own...
enum GNUNET_GenericReturnValue reset_member_session(struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_HashCode *hash)
Resets a given member session which re-opens a member session for new usage.
const struct GNUNET_HashCode * get_member_session_key(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the key of the room a given member session belongs to.
struct GNUNET_MESSENGER_Contact * get_member_session_contact(struct GNUNET_MESSENGER_MemberSession *session)
Returns the contact which is connected to a given member session.
struct GNUNET_MESSENGER_MemberSession * switch_member_session(struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Creates and allocates a new member session closing and replacing a given other session of the same me...
void load_member_session(struct GNUNET_MESSENGER_Member *member, const char *directory)
Loads data from a directory into a new allocated and created member session of a member if the requir...
void save_member_session(struct GNUNET_MESSENGER_MemberSession *session, const char *directory)
Saves data from a member session into a directory which can be load to restore the member session com...
struct GNUNET_MESSENGER_MemberSession * create_member_session(struct GNUNET_MESSENGER_Member *member, const struct GNUNET_CRYPTO_PublicKey *pubkey)
Creates and allocates a new member session of a member with a given public key.
enum GNUNET_GenericReturnValue verify_member_session_as_sender(const struct GNUNET_MESSENGER_MemberSession *session, const struct GNUNET_MESSENGER_Message *message, const struct GNUNET_HashCode *hash)
Verifies a given member session as sender of a selected message and its hash.
enum GNUNET_GenericReturnValue is_member_session_completed(const struct GNUNET_MESSENGER_MemberSession *session)
Returns if the given member session has been completed.
enum GNUNET_GenericReturnValue is_member_session_closed(const struct GNUNET_MESSENGER_MemberSession *session)
Returns if the given member session has been closed.
const struct GNUNET_HashCode * get_member_session_context(const struct GNUNET_MESSENGER_MemberSession *session)
Returns the member context of a given member session.
Functions related to time.
GNUNET_GenericReturnValue
Named constants for return values.
Internal representation of the hash map.
An identity key as per LSD0001.
struct GNUNET_HashCode context
struct GNUNET_CRYPTO_PublicKey public_key
enum GNUNET_GenericReturnValue completed
struct GNUNET_CONTAINER_MultiHashMap * history
struct GNUNET_MESSENGER_Contact * contact
struct GNUNET_MESSENGER_Member * member
struct GNUNET_MESSENGER_MemberSession * prev
struct GNUNET_MESSENGER_MemberSession * next
struct GNUNET_TIME_Absolute start
struct GNUNET_MESSENGER_ListMessages messages
enum GNUNET_GenericReturnValue closed
Time for absolute times used by GNUnet, in microseconds.