GNUnet  0.10.x
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 
31 #ifndef GNUNET_FRIENDS_LIB_H
32 #define GNUNET_FRIENDS_LIB_H
33 
34 #ifdef __cplusplus
35 extern "C"
36 {
37 #if 0 /* keep Emacsens' auto-indent happy */
38 }
39 #endif
40 #endif
41 
42 #include "gnunet_util_lib.h"
43 
44 
51 typedef void (*GNUNET_FRIENDS_Callback)(void *cls,
52  const struct GNUNET_PeerIdentity *friend_id);
53 
54 
63 int
66  void *cb_cls);
67 
68 
73 
74 
82 struct GNUNET_FRIENDS_Writer *
84 
85 
92 int
94 
95 
103 int
105  const struct GNUNET_PeerIdentity *friend_id);
106 
107 
108 #if 0 /* keep Emacsens' auto-indent happy */
109 {
110 #endif
111 #ifdef __cplusplus
112 }
113 #endif
114 
115 #endif
116  /* end of group */
void(* GNUNET_FRIENDS_Callback)(void *cls, const struct GNUNET_PeerIdentity *friend_id)
Signature of a function called on each friend found.
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
struct GNUNET_FRIENDS_Writer * GNUNET_FRIENDS_write_start(const struct GNUNET_CONFIGURATION_Handle *cfg)
Start writing a fresh FRIENDS file.
Definition: friends.c:163
void * cls
Closure for proc and ackp.
static struct GNUNET_CONFIGURATION_Handle * cfg
Our configuration.
Definition: gnunet-arm.c:104
Handle for writing a friends file.
Definition: friends.c:147
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:227
The identity of the host (wraps the signing key of the peer).
int GNUNET_FRIENDS_write_stop(struct GNUNET_FRIENDS_Writer *w)
Finish writing out the friends file.
Definition: friends.c:209
configuration data
Definition: configuration.c:83