GNUnet  0.20.0
gnunet_friends_lib.h
Go to the documentation of this file.
1 /*
2  This file is part of GNUnet.
3  Copyright (C) 2013 Christian Grothoff
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 
34 #ifndef GNUNET_FRIENDS_LIB_H
35 #define GNUNET_FRIENDS_LIB_H
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #if 0 /* keep Emacsens' auto-indent happy */
41 }
42 #endif
43 #endif
44 
45 
46 #include "gnunet_util_lib.h"
47 
48 
55 typedef void (*GNUNET_FRIENDS_Callback)(void *cls,
56  const struct
57  GNUNET_PeerIdentity *friend_id);
58 
59 
68 int
71  void *cb_cls);
72 
73 
78 
79 
87 struct GNUNET_FRIENDS_Writer *
89 
90 
97 int
99 
100 
108 int
110  const struct GNUNET_PeerIdentity *friend_id);
111 
112 
113 #if 0 /* keep Emacsens' auto-indent happy */
114 {
115 #endif
116 #ifdef __cplusplus
117 }
118 #endif
119 
120 #endif
121  /* end of group */
123  /* end of group addition to backbone */
static const struct GNUNET_CONFIGURATION_Handle * cfg
Configuration we are using.
Definition: gnunet-abd.c:36
int GNUNET_FRIENDS_write_stop(struct GNUNET_FRIENDS_Writer *w)
Finish writing out the friends file.
Definition: friends.c:202
void(* GNUNET_FRIENDS_Callback)(void *cls, const struct GNUNET_PeerIdentity *friend_id)
Signature of a function called on each friend found.
struct GNUNET_FRIENDS_Writer * GNUNET_FRIENDS_write_start(const struct GNUNET_CONFIGURATION_Handle *cfg)
Start writing a fresh FRIENDS file.
Definition: friends.c:156
int GNUNET_FRIENDS_parse(const struct GNUNET_CONFIGURATION_Handle *cfg, GNUNET_FRIENDS_Callback cb, void *cb_cls)
Parse the FRIENDS file.
Definition: friends.c:39
int GNUNET_FRIENDS_write(struct GNUNET_FRIENDS_Writer *w, const struct GNUNET_PeerIdentity *friend_id)
Add a friend to the friends file.
Definition: friends.c:220
Handle for writing a friends file.
Definition: friends.c:140
The identity of the host (wraps the signing key of the peer).