GNUnet  0.17.6
gnunet-service-messenger_ego_store.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2020--2022 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_EGO_STORE_H
27 #define GNUNET_SERVICE_MESSENGER_EGO_STORE_H
28 
29 #include "platform.h"
30 #include "gnunet_container_lib.h"
31 
32 #include "messenger_api_ego.h"
33 
36 
37 typedef void
39  const char *identifier,
40  const struct GNUNET_MESSENGER_Ego *ego);
41 
43 {
46 
48 
50 
52  void *cls;
53 
54  char *identifier;
55 };
56 
58 {
61 
63 
65 
66  void *cls;
67 
68  char *identifier;
69 };
70 
72 {
74 
78 
81 
84 };
85 
92 void
94  const struct GNUNET_CONFIGURATION_Handle *config);
95 
101 void
103 
111 void
113  const char *identifier);
114 
123 void
125  const char *identifier,
126  void *handle);
127 
136 void
138  const char *identifier,
139  void *handle);
140 
150 void
152  const char *identifier,
154  void *cls);
155 
165 struct GNUNET_MESSENGER_Ego*
167  const char *identifier,
168  const struct GNUNET_IDENTITY_PrivateKey *key);
169 
177 void
179  const char *identifier);
180 
190 void
192  const char *old_identifier,
193  const char *new_identifier);
194 
202 void
204  const char *identifier);
205 
206 #endif //GNUNET_SERVICE_MESSENGER_EGO_STORE_H
struct GNUNET_HashCode key
The key used in the DHT.
static struct GNUNET_DNS_Handle * handle
Handle to transport service.
void renew_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier)
Replaces the registered EGO in a store under a specific identifier with a newly created one.
void delete_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier)
Deletes the registration of an EGO in a store under a specific identifier.
void bind_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier, void *handle)
Binds an EGO which was registered to a store under a specific identifier to a given handle
struct GNUNET_MESSENGER_Ego * update_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier, const struct GNUNET_IDENTITY_PrivateKey *key)
Updates the registration of an EGO to a store under a specific identifier with a new key.
void lookup_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier, GNUNET_MESSENGER_EgoLookupCallback lookup, void *cls)
Lookups an EGO which was registered to a store under a specific identifier.
void clear_ego_store(struct GNUNET_MESSENGER_EgoStore *store)
Clears an EGO-store, wipes its content and deallocates its memory.
void create_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier)
Creates a new EGO which will be registered to a store under a specific identifier.
void unbind_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *identifier, void *handle)
Binds an EGO which was registered to a store under a specific identifier to a given handle
void(* GNUNET_MESSENGER_EgoLookupCallback)(void *cls, const char *identifier, const struct GNUNET_MESSENGER_Ego *ego)
void init_ego_store(struct GNUNET_MESSENGER_EgoStore *store, const struct GNUNET_CONFIGURATION_Handle *config)
Initializes an EGO-store as fully empty.
void rename_store_ego(struct GNUNET_MESSENGER_EgoStore *store, const char *old_identifier, const char *new_identifier)
Updates the location of a registered EGO in a store to a different one under a specific new_identifie...
static const struct GNUNET_CONFIGURATION_Handle * config
Container classes for GNUnet.
GNUnet MESSENGER service.
Internal representation of the hash map.
Handle for ego lookup.
Handle for the service.
Definition: identity_api.c:96
Handle for an operation with the identity service.
Definition: identity_api.c:40
A private key for an identity as per LSD0001.
struct GNUNET_IDENTITY_EgoLookup * lookup
struct GNUNET_MESSENGER_EgoStore * store
GNUNET_MESSENGER_EgoLookupCallback cb
struct GNUNET_MESSENGER_EgoLookup * prev
struct GNUNET_MESSENGER_EgoLookup * next
struct GNUNET_MESSENGER_EgoOperation * next
struct GNUNET_MESSENGER_EgoOperation * prev
struct GNUNET_MESSENGER_EgoStore * store
struct GNUNET_IDENTITY_Operation * operation
struct GNUNET_CONTAINER_MultiHashMap * handles
struct GNUNET_MESSENGER_EgoLookup * lu_end
const struct GNUNET_CONFIGURATION_Handle * cfg
struct GNUNET_MESSENGER_EgoLookup * lu_start
struct GNUNET_IDENTITY_Handle * identity
struct GNUNET_CONTAINER_MultiHashMap * egos
struct GNUNET_MESSENGER_EgoOperation * op_end
struct GNUNET_MESSENGER_EgoOperation * op_start