aboutsummaryrefslogtreecommitdiff
path: root/src/rps/gnunet-service-rps_peers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/rps/gnunet-service-rps_peers.h')
-rw-r--r--src/rps/gnunet-service-rps_peers.h37
1 files changed, 30 insertions, 7 deletions
diff --git a/src/rps/gnunet-service-rps_peers.h b/src/rps/gnunet-service-rps_peers.h
index bbac86003..15970a7ce 100644
--- a/src/rps/gnunet-service-rps_peers.h
+++ b/src/rps/gnunet-service-rps_peers.h
@@ -117,11 +117,15 @@ typedef int
117 * 117 *
118 * @param fn_valid_peers filename of the file used to store valid peer ids 118 * @param fn_valid_peers filename of the file used to store valid peer ids
119 * @param cadet_h cadet handle 119 * @param cadet_h cadet handle
120 * @param disconnect_handler Disconnect handler
121 * @param c_handlers cadet handlers
120 * @param own_id own peer identity 122 * @param own_id own peer identity
121 */ 123 */
122void 124void
123Peers_initialise (char* fn_valid_peers, 125Peers_initialise (char* fn_valid_peers,
124 struct GNUNET_CADET_Handle *cadet_h, 126 struct GNUNET_CADET_Handle *cadet_h,
127 GNUNET_CADET_DisconnectEventHandler disconnect_handler,
128 const struct GNUNET_MQ_MessageHandler *c_handlers,
125 const struct GNUNET_PeerIdentity *own_id); 129 const struct GNUNET_PeerIdentity *own_id);
126 130
127/** 131/**
@@ -259,6 +263,18 @@ int
259Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags); 263Peers_check_channel_flag (uint32_t *channel_flags, enum Peers_ChannelFlags flags);
260 264
261/** 265/**
266 * @brief Get the flags for the channel in @a role for @a peer.
267 *
268 * @param peer Peer to get the channel flags for.
269 * @param role Role of channel to get flags for
270 *
271 * @return The flags.
272 */
273uint32_t *
274Peers_get_channel_flag (const struct GNUNET_PeerIdentity *peer,
275 enum Peers_ChannelRole role);
276
277/**
262 * @brief Check whether we have information about the given peer. 278 * @brief Check whether we have information about the given peer.
263 * 279 *
264 * FIXME probably deprecated. Make this the new _online. 280 * FIXME probably deprecated. Make this the new _online.
@@ -312,8 +328,6 @@ Peers_check_peer_send_intention (const struct GNUNET_PeerIdentity *peer);
312 * @param cls The closure 328 * @param cls The closure
313 * @param channel The channel the peer wants to establish 329 * @param channel The channel the peer wants to establish
314 * @param initiator The peer's peer ID 330 * @param initiator The peer's peer ID
315 * @param port The port the channel is being established over
316 * @param options Further options
317 * 331 *
318 * @return initial channel context for the channel 332 * @return initial channel context for the channel
319 * (can be NULL -- that's not an error) 333 * (can be NULL -- that's not an error)
@@ -321,9 +335,7 @@ Peers_check_peer_send_intention (const struct GNUNET_PeerIdentity *peer);
321void * 335void *
322Peers_handle_inbound_channel (void *cls, 336Peers_handle_inbound_channel (void *cls,
323 struct GNUNET_CADET_Channel *channel, 337 struct GNUNET_CADET_Channel *channel,
324 const struct GNUNET_PeerIdentity *initiator, 338 const struct GNUNET_PeerIdentity *initiator);
325 const struct GNUNET_HashCode *port,
326 enum GNUNET_CADET_ChannelOption options);
327 339
328/** 340/**
329 * @brief Check whether a sending channel towards the given peer exists 341 * @brief Check whether a sending channel towards the given peer exists
@@ -379,8 +391,7 @@ Peers_destroy_sending_channel (const struct GNUNET_PeerIdentity *peer);
379 */ 391 */
380void 392void
381Peers_cleanup_destroyed_channel (void *cls, 393Peers_cleanup_destroyed_channel (void *cls,
382 const struct GNUNET_CADET_Channel *channel, 394 const struct GNUNET_CADET_Channel *channel);
383 void *channel_ctx);
384 395
385/** 396/**
386 * @brief Send a message to another peer. 397 * @brief Send a message to another peer.
@@ -411,4 +422,16 @@ int
411Peers_schedule_operation (const struct GNUNET_PeerIdentity *peer, 422Peers_schedule_operation (const struct GNUNET_PeerIdentity *peer,
412 const PeerOp peer_op); 423 const PeerOp peer_op);
413 424
425/**
426 * @brief Get the recv_channel of @a peer.
427 * Needed to correctly handle (call #GNUNET_CADET_receive_done()) incoming
428 * messages.
429 *
430 * @param peer The peer to get the recv_channel from.
431 *
432 * @return The recv_channel.
433 */
434struct GNUNET_CADET_Channel *
435Peers_get_recv_channel (const struct GNUNET_PeerIdentity *peer);
436
414/* end of gnunet-service-rps_peers.h */ 437/* end of gnunet-service-rps_peers.h */