GNUnet  0.11.x
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_container_lib.h"
31 #include "gnunet_crypto_lib.h"
33 
35 
37 {
40 };
41 
47 void
49 
55 void
57 
72  const struct GNUNET_HashCode *key_hash);
73 
91  const struct GNUNET_IDENTITY_PublicKey *pubkey);
92 
105 void
107  const struct GNUNET_HashCode *context, const struct GNUNET_HashCode *next_context,
108  const struct GNUNET_IDENTITY_PublicKey *pubkey);
109 
118 void
120  const struct GNUNET_HashCode *context);
121 
122 #endif //GNUNET_MESSENGER_API_CONTACT_STORE_H
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.
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.
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.
static pa_context * context
Pulseaudio context.
cryptographic primitives for GNUnet
struct GNUNET_CONTAINER_MultiHashMap * anonymous
static struct GNUNET_IDENTITY_PublicKey pubkey
Public key of the zone to look in.
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...
A 512-bit hashcode.
An identity key as per LSD0001.
struct GNUNET_CONTAINER_MultiHashMap * contacts
void init_contact_store(struct GNUNET_MESSENGER_ContactStore *store)
Initializes a contact store as fully empty.