aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_peerinfo_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_peerinfo_service.h')
-rw-r--r--src/include/gnunet_peerinfo_service.h53
1 files changed, 31 insertions, 22 deletions
diff --git a/src/include/gnunet_peerinfo_service.h b/src/include/gnunet_peerinfo_service.h
index 1411168c0..04c63cbb1 100644
--- a/src/include/gnunet_peerinfo_service.h
+++ b/src/include/gnunet_peerinfo_service.h
@@ -54,9 +54,10 @@ struct GNUNET_PEERINFO_Handle;
54 * @return NULL on error (configuration related, actual connection 54 * @return NULL on error (configuration related, actual connection
55 * etablishment may happen asynchronously). 55 * etablishment may happen asynchronously).
56 */ 56 */
57struct GNUNET_PEERINFO_Handle * 57struct GNUNET_PEERINFO_Handle *GNUNET_PEERINFO_connect (const struct
58GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg); 58 GNUNET_CONFIGURATION_Handle
59 59 *cfg);
60
60 61
61 62
62/** 63/**
@@ -68,8 +69,7 @@ GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
68 * 69 *
69 * @param h handle to disconnect 70 * @param h handle to disconnect
70 */ 71 */
71void 72void GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
72GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
73 73
74 74
75/** 75/**
@@ -85,7 +85,7 @@ GNUNET_PEERINFO_disconnect (struct GNUNET_PEERINFO_Handle *h);
85 */ 85 */
86void 86void
87GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h, 87GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
88 const struct GNUNET_HELLO_Message *hello); 88 const struct GNUNET_HELLO_Message *hello);
89 89
90 90
91/** 91/**
@@ -98,10 +98,10 @@ GNUNET_PEERINFO_add_peer (struct GNUNET_PEERINFO_Handle *h,
98 * @param error message 98 * @param error message
99 */ 99 */
100typedef void 100typedef void
101 (*GNUNET_PEERINFO_Processor) (void *cls, 101 (*GNUNET_PEERINFO_Processor) (void *cls,
102 const struct GNUNET_PeerIdentity * peer, 102 const struct GNUNET_PeerIdentity * peer,
103 const struct GNUNET_HELLO_Message * hello, 103 const struct GNUNET_HELLO_Message * hello,
104 const char * err_msg); 104 const char *err_msg);
105 105
106 106
107/** 107/**
@@ -127,12 +127,19 @@ struct GNUNET_PEERINFO_IteratorContext;
127 * @return NULL on error (in this case, 'callback' is never called!), 127 * @return NULL on error (in this case, 'callback' is never called!),
128 * otherwise an iterator context 128 * otherwise an iterator context
129 */ 129 */
130struct GNUNET_PEERINFO_IteratorContext * 130struct GNUNET_PEERINFO_IteratorContext *GNUNET_PEERINFO_iterate (struct
131GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, 131 GNUNET_PEERINFO_Handle
132 const struct GNUNET_PeerIdentity *peer, 132 *h,
133 struct GNUNET_TIME_Relative timeout, 133 const struct
134 GNUNET_PEERINFO_Processor callback, 134 GNUNET_PeerIdentity
135 void *callback_cls); 135 *peer,
136 struct
137 GNUNET_TIME_Relative
138 timeout,
139 GNUNET_PEERINFO_Processor
140 callback,
141 void
142 *callback_cls);
136 143
137 144
138 145
@@ -164,10 +171,13 @@ struct GNUNET_PEERINFO_NotifyContext;
164 * @param callback_cls closure for callback 171 * @param callback_cls closure for callback
165 * @return NULL on error 172 * @return NULL on error
166 */ 173 */
167struct GNUNET_PEERINFO_NotifyContext * 174struct GNUNET_PEERINFO_NotifyContext *GNUNET_PEERINFO_notify (const struct
168GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg, 175 GNUNET_CONFIGURATION_Handle
169 GNUNET_PEERINFO_Processor callback, 176 *cfg,
170 void *callback_cls); 177 GNUNET_PEERINFO_Processor
178 callback,
179 void
180 *callback_cls);
171 181
172 182
173/** 183/**
@@ -175,8 +185,7 @@ GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg,
175 * 185 *
176 * @param nc context to stop notifying 186 * @param nc context to stop notifying
177 */ 187 */
178void 188void GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
179GNUNET_PEERINFO_notify_cancel (struct GNUNET_PEERINFO_NotifyContext *nc);
180 189
181 190
182#if 0 /* keep Emacsens' auto-indent happy */ 191#if 0 /* keep Emacsens' auto-indent happy */