GNUnet  0.19.5
messenger_api_contact_store.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_MESSENGER_API_CONTACT_STORE_H
27 #define GNUNET_MESSENGER_API_CONTACT_STORE_H
28 
29 #include "platform.h"
30 #include "gnunet_util_lib.h"
32 
34 
36 {
39 };
40 
46 void
48 
54 void
56 
71  const struct GNUNET_HashCode *context,
72  const struct GNUNET_HashCode *key_hash);
73 
91  const struct GNUNET_HashCode *context,
92  const struct GNUNET_IDENTITY_PublicKey *pubkey);
93 
106 void
108  struct GNUNET_MESSENGER_Contact* contact,
109  const struct GNUNET_HashCode *context,
110  const struct GNUNET_HashCode *next_context,
111  const struct GNUNET_IDENTITY_PublicKey *pubkey);
112 
121 void
123  struct GNUNET_MESSENGER_Contact* contact,
124  const struct GNUNET_HashCode *context);
125 
126 #endif //GNUNET_MESSENGER_API_CONTACT_STORE_H
static pa_context * context
Pulseaudio context.
static struct GNUNET_IDENTITY_PublicKey pubkey
Public key of the zone to look in.
Identity service; implements identity management for GNUnet.
struct GNUNET_MESSENGER_Contact * get_store_contact(struct GNUNET_MESSENGER_ContactStore *store, const struct GNUNET_HashCode *context, const struct GNUNET_IDENTITY_PublicKey *pubkey)
Returns a contact using a specific public key.
void clear_contact_store(struct GNUNET_MESSENGER_ContactStore *store)
Clears a contact store, wipes its content and deallocates its memory.
void init_contact_store(struct GNUNET_MESSENGER_ContactStore *store)
Initializes a contact store as fully empty.
void remove_store_contact(struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET_MESSENGER_Contact *contact, const struct GNUNET_HashCode *context)
Removes a contact from the store which uses a given member context.
void update_store_contact(struct GNUNET_MESSENGER_ContactStore *store, struct GNUNET_MESSENGER_Contact *contact, const struct GNUNET_HashCode *context, const struct GNUNET_HashCode *next_context, const struct GNUNET_IDENTITY_PublicKey *pubkey)
Moves a contact from the store to another location matching a given public key and member context.
struct GNUNET_MESSENGER_Contact * get_store_contact_raw(struct GNUNET_MESSENGER_ContactStore *store, const struct GNUNET_HashCode *context, const struct GNUNET_HashCode *key_hash)
Returns a contact using the hash of a specific public key.
Internal representation of the hash map.
A 512-bit hashcode.
An identity key as per LSD0001.
struct GNUNET_CONTAINER_MultiHashMap * contacts
struct GNUNET_CONTAINER_MultiHashMap * anonymous