GNUnet  0.11.x
gnunet-service-messenger_message_kind.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2020--2021 GNUnet e.V.
4 
5  GNUnet is free software: you can redistribute it and/or modify it
6  under the terms of the GNU Affero General Public License as published
7  by the Free Software Foundation, either version 3 of the License,
8  or (at your option) any later version.
9 
10  GNUnet is distributed in the hope that it will be useful, but
11  WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Affero General Public License for more details.
14 
15  You should have received a copy of the GNU Affero General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 
18  SPDX-License-Identifier: AGPL3.0-or-later
19  */
26 #ifndef GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H
27 #define GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H
28 
29 #include "platform.h"
30 #include "gnunet_container_lib.h"
31 #include "gnunet_crypto_lib.h"
33 #include "gnunet_time_lib.h"
34 
35 #include "messenger_api_message.h"
37 #include "messenger_api_ego.h"
38 
48 create_message_info (const struct GNUNET_MESSENGER_Ego *ego);
49 
58 create_message_join (const struct GNUNET_MESSENGER_Ego *ego);
59 
67 
76 create_message_name (const char *name);
77 
87 
97 
106 create_message_id (const struct GNUNET_ShortHashCode *unique_id);
107 
117 
127 create_message_merge (const struct GNUNET_HashCode *previous);
128 
137 create_message_request (const struct GNUNET_HashCode *hash);
138 
149 create_message_invite (const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key);
150 
159 create_message_text (const char *text);
160 
170 create_message_delete (const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay);
171 
172 #endif //GNUNET_SERVICE_MESSENGER_MESSAGE_KIND_H
static struct GNUNET_SERVICE_Handle * service
Handle to our service instance.
struct GNUNET_MESSENGER_Message * create_message_key(const struct GNUNET_IDENTITY_PrivateKey *key)
Creates and allocates a new key message containing the public key to change to derived from its priva...
struct GNUNET_MESSENGER_Message * create_message_request(const struct GNUNET_HashCode *hash)
Creates and allocates a new request message containing the hash of a missing message.
A private key for an identity as per LSD0001.
A 256-bit hashcode.
cryptographic primitives for GNUnet
struct GNUNET_MESSENGER_Message * create_message_miss(const struct GNUNET_PeerIdentity *peer)
Creates and allocates a new miss message containing the missing peer identity.
struct GNUNET_MESSENGER_Message * create_message_info(const struct GNUNET_MESSENGER_Ego *ego)
Creates and allocates a new info message containing the hosts EGO public key and a newly generated un...
A 512-bit hashcode.
GNUnet MESSENGER service.
struct GNUNET_MESSENGER_Message * create_message_name(const char *name)
Creates and allocates a new name message containing the name to change to.
struct GNUNET_MESSENGER_Message * create_message_join(const struct GNUNET_MESSENGER_Ego *ego)
Creates and allocates a new join message containing the clients EGO public key.
struct GNUNET_TESTBED_Peer * peer
The peer associated with this model.
struct GNUNET_HashCode key
The key used in the DHT.
struct GNUNET_MESSENGER_Message * create_message_text(const char *text)
Creates and allocates a new text message containing a string representing text.
static struct GNUNET_TIME_Relative delay
When should dkg communication start?
struct GNUNET_MESSENGER_Message * create_message_peer(const struct GNUNET_MESSENGER_Service *service)
Creates and allocates a new peer message containing a services peer identity.
The identity of the host (wraps the signing key of the peer).
const char * name
struct GNUNET_MESSENGER_Message * create_message_leave()
Creates and allocates a new leave message.
struct GNUNET_MESSENGER_Message * create_message_delete(const struct GNUNET_HashCode *hash, const struct GNUNET_TIME_Relative delay)
Creates and allocates a new delete message containing the hash of a message to delete after a specifi...
struct GNUNET_MESSENGER_Message * create_message_invite(const struct GNUNET_PeerIdentity *door, const struct GNUNET_HashCode *key)
Creates and allocates a new invite message containing the peer identity of an entrance peer to a room...
struct GNUNET_MESSENGER_Message * create_message_merge(const struct GNUNET_HashCode *previous)
Creates and allocates a new merge message containing the hash of a second previous message besides th...
struct GNUNET_MESSENGER_Message * create_message_id(const struct GNUNET_ShortHashCode *unique_id)
Creates and allocates a new id message containing the unique member id to change to.
GNUnet MESSENGER service.
messenger api: client and service implementation of GNUnet MESSENGER service
Time for relative time used by GNUnet, in microseconds.