aboutsummaryrefslogtreecommitdiff
path: root/src/messenger/messenger_api_contact.h
diff options
context:
space:
mode:
authorTheJackiMonster <thejackimonster@gmail.com>2020-11-12 17:32:32 +0100
committerTheJackiMonster <thejackimonster@gmail.com>2020-11-12 17:32:32 +0100
commite11d1e59e4ae5f7d89c33df3ae9ca8f1ece990cf (patch)
tree80c08d417bb0c862adcbcde7f55aa7e3a4646d27 /src/messenger/messenger_api_contact.h
parentfec34163a1f17729c190022a2bf747f48e34f07a (diff)
downloadgnunet-e11d1e59e4ae5f7d89c33df3ae9ca8f1ece990cf.tar.gz
gnunet-e11d1e59e4ae5f7d89c33df3ae9ca8f1ece990cf.zip
-revert "-merge branch 'jacki/messenger'"
This reverts commit fec34163a1f17729c190022a2bf747f48e34f07a, reversing changes made to 63fe195e40e55f13ab29e3ba578e97017fc4cc48.
Diffstat (limited to 'src/messenger/messenger_api_contact.h')
-rw-r--r--src/messenger/messenger_api_contact.h93
1 files changed, 0 insertions, 93 deletions
diff --git a/src/messenger/messenger_api_contact.h b/src/messenger/messenger_api_contact.h
deleted file mode 100644
index 0673b9b85..000000000
--- a/src/messenger/messenger_api_contact.h
+++ /dev/null
@@ -1,93 +0,0 @@
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2020 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 */
20/**
21 * @author Tobias Frisch
22 * @file src/messenger/messenger_api_contact.h
23 * @brief messenger api: client implementation of GNUnet MESSENGER service
24 */
25
26#ifndef GNUNET_MESSENGER_API_CONTACT_H
27#define GNUNET_MESSENGER_API_CONTACT_H
28
29#include "platform.h"
30#include "gnunet_crypto_lib.h"
31#include "gnunet_identity_service.h"
32
33struct GNUNET_MESSENGER_Contact
34{
35 char *name;
36
37 struct GNUNET_IDENTITY_PublicKey public_key;
38};
39
40/**
41 * Creates and allocates a new contact with a given public <i>key</i> from an EGO.
42 *
43 * @param key Public key
44 * @return New contact
45 */
46struct GNUNET_MESSENGER_Contact*
47create_contact (const struct GNUNET_IDENTITY_PublicKey *key);
48
49/**
50 * Destroys a contact and frees its memory fully.
51 *
52 * @param contact Contact
53 */
54void
55destroy_contact (struct GNUNET_MESSENGER_Contact *contact);
56
57/**
58 * Returns the current name of a given <i>contact</i> or NULL if no valid name was assigned yet.
59 *
60 * @param contact Contact
61 * @return Name of the contact or NULL
62 */
63const char*
64get_contact_name (const struct GNUNET_MESSENGER_Contact *contact);
65
66/**
67 * Changes the current name of a given <i>contact</i> by copying it from the parameter <i>name</i>.
68 *
69 * @param contact Contact
70 * @param name Valid name (may not be NULL!)
71 */
72void
73set_contact_name (struct GNUNET_MESSENGER_Contact *contact, const char *name);
74
75/**
76 * Returns the public key of a given <i>contact</i>.
77 *
78 * @param contact Contact
79 * @return Public key of the contact
80 */
81const struct GNUNET_IDENTITY_PublicKey*
82get_contact_key (const struct GNUNET_MESSENGER_Contact *contact);
83
84/**
85 * Returns the resulting hashcode of the public key from a given <i>contact</i>.
86 *
87 * @param contact Contact
88 * @return Hash of the contacts public key
89 */
90const struct GNUNET_HashCode*
91get_contact_id_from_key (const struct GNUNET_MESSENGER_Contact *contact);
92
93#endif //GNUNET_MESSENGER_API_CONTACT_H