aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_transport_service.h
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
committerng0 <ng0@n0.is>2019-09-08 12:33:09 +0000
commitd41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb (patch)
tree9efd18ea7d425652085ed0bd5e8e45604bc5f6b9 /src/include/gnunet_transport_service.h
parenta0fce305c565c0937d917a92712f15e9c5736260 (diff)
downloadgnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.tar.gz
gnunet-d41ed82a4ea0cc8e1674b6d5d2c49fd6462610bb.zip
uncrustify as demanded.
Diffstat (limited to 'src/include/gnunet_transport_service.h')
-rw-r--r--src/include/gnunet_transport_service.h72
1 files changed, 33 insertions, 39 deletions
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index 80949b417..735e216e8 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -16,7 +16,7 @@
16 along with this program. If not, see <http://www.gnu.org/licenses/>. 16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 17
18 SPDX-License-Identifier: AGPL3.0-or-later 18 SPDX-License-Identifier: AGPL3.0-or-later
19*/ 19 */
20 20
21/** 21/**
22 * @author Christian Grothoff 22 * @author Christian Grothoff
@@ -75,10 +75,10 @@ struct GNUNET_TRANSPORT_OfferHelloHandle;
75 * 75 *
76 */ 76 */
77struct GNUNET_TRANSPORT_OfferHelloHandle * 77struct GNUNET_TRANSPORT_OfferHelloHandle *
78GNUNET_TRANSPORT_offer_hello (const struct GNUNET_CONFIGURATION_Handle *cfg, 78GNUNET_TRANSPORT_offer_hello(const struct GNUNET_CONFIGURATION_Handle *cfg,
79 const struct GNUNET_MessageHeader *hello, 79 const struct GNUNET_MessageHeader *hello,
80 GNUNET_SCHEDULER_TaskCallback cont, 80 GNUNET_SCHEDULER_TaskCallback cont,
81 void *cont_cls); 81 void *cont_cls);
82 82
83 83
84/** 84/**
@@ -87,7 +87,7 @@ GNUNET_TRANSPORT_offer_hello (const struct GNUNET_CONFIGURATION_Handle *cfg,
87 * @param ohh the `struct GNUNET_TRANSPORT_OfferHelloHandle` to cancel 87 * @param ohh the `struct GNUNET_TRANSPORT_OfferHelloHandle` to cancel
88 */ 88 */
89void 89void
90GNUNET_TRANSPORT_offer_hello_cancel ( 90GNUNET_TRANSPORT_offer_hello_cancel(
91 struct GNUNET_TRANSPORT_OfferHelloHandle *ohh); 91 struct GNUNET_TRANSPORT_OfferHelloHandle *ohh);
92 92
93 93
@@ -133,7 +133,7 @@ typedef void (*GNUNET_TRANSPORT_AddressToStringCallback) (void *cls,
133 * @return handle to cancel the operation, NULL on error 133 * @return handle to cancel the operation, NULL on error
134 */ 134 */
135struct GNUNET_TRANSPORT_AddressToStringContext * 135struct GNUNET_TRANSPORT_AddressToStringContext *
136GNUNET_TRANSPORT_address_to_string ( 136GNUNET_TRANSPORT_address_to_string(
137 const struct GNUNET_CONFIGURATION_Handle *cfg, 137 const struct GNUNET_CONFIGURATION_Handle *cfg,
138 const struct GNUNET_HELLO_Address *address, 138 const struct GNUNET_HELLO_Address *address,
139 int numeric, 139 int numeric,
@@ -148,7 +148,7 @@ GNUNET_TRANSPORT_address_to_string (
148 * @param alc the context handle 148 * @param alc the context handle
149 */ 149 */
150void 150void
151GNUNET_TRANSPORT_address_to_string_cancel ( 151GNUNET_TRANSPORT_address_to_string_cancel(
152 struct GNUNET_TRANSPORT_AddressToStringContext *alc); 152 struct GNUNET_TRANSPORT_AddressToStringContext *alc);
153 153
154 154
@@ -211,8 +211,7 @@ GNUNET_TRANSPORT_address_to_string_cancel (
211 * to 0). 211 * to 0).
212 * 212 *
213 */ 213 */
214enum GNUNET_TRANSPORT_PeerState 214enum GNUNET_TRANSPORT_PeerState {
215{
216 /** 215 /**
217 * Fresh peer or completely disconnected 216 * Fresh peer or completely disconnected
218 */ 217 */
@@ -289,7 +288,7 @@ enum GNUNET_TRANSPORT_PeerState
289 * @param state the state 288 * @param state the state
290 */ 289 */
291const char * 290const char *
292GNUNET_TRANSPORT_ps2s (enum GNUNET_TRANSPORT_PeerState state); 291GNUNET_TRANSPORT_ps2s(enum GNUNET_TRANSPORT_PeerState state);
293 292
294 293
295/** 294/**
@@ -299,7 +298,7 @@ GNUNET_TRANSPORT_ps2s (enum GNUNET_TRANSPORT_PeerState state);
299 * @return #GNUNET_YES or #GNUNET_NO 298 * @return #GNUNET_YES or #GNUNET_NO
300 */ 299 */
301int 300int
302GNUNET_TRANSPORT_is_connected (enum GNUNET_TRANSPORT_PeerState state); 301GNUNET_TRANSPORT_is_connected(enum GNUNET_TRANSPORT_PeerState state);
303 302
304 303
305/** 304/**
@@ -361,7 +360,7 @@ typedef void (*GNUNET_TRANSPORT_PeerIterateCallback) (
361 * @param peer_callback_cls closure for @a peer_callback 360 * @param peer_callback_cls closure for @a peer_callback
362 */ 361 */
363struct GNUNET_TRANSPORT_PeerMonitoringContext * 362struct GNUNET_TRANSPORT_PeerMonitoringContext *
364GNUNET_TRANSPORT_monitor_peers ( 363GNUNET_TRANSPORT_monitor_peers(
365 const struct GNUNET_CONFIGURATION_Handle *cfg, 364 const struct GNUNET_CONFIGURATION_Handle *cfg,
366 const struct GNUNET_PeerIdentity *peer, 365 const struct GNUNET_PeerIdentity *peer,
367 int one_shot, 366 int one_shot,
@@ -375,7 +374,7 @@ GNUNET_TRANSPORT_monitor_peers (
375 * @param pic handle for the request to cancel 374 * @param pic handle for the request to cancel
376 */ 375 */
377void 376void
378GNUNET_TRANSPORT_monitor_peers_cancel ( 377GNUNET_TRANSPORT_monitor_peers_cancel(
379 struct GNUNET_TRANSPORT_PeerMonitoringContext *pic); 378 struct GNUNET_TRANSPORT_PeerMonitoringContext *pic);
380 379
381 380
@@ -414,9 +413,9 @@ typedef int (*GNUNET_TRANSPORT_BlacklistCallback) (
414 * @return NULL on error, otherwise handle for cancellation 413 * @return NULL on error, otherwise handle for cancellation
415 */ 414 */
416struct GNUNET_TRANSPORT_Blacklist * 415struct GNUNET_TRANSPORT_Blacklist *
417GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg, 416GNUNET_TRANSPORT_blacklist(const struct GNUNET_CONFIGURATION_Handle *cfg,
418 GNUNET_TRANSPORT_BlacklistCallback cb, 417 GNUNET_TRANSPORT_BlacklistCallback cb,
419 void *cb_cls); 418 void *cb_cls);
420 419
421 420
422/** 421/**
@@ -426,7 +425,7 @@ GNUNET_TRANSPORT_blacklist (const struct GNUNET_CONFIGURATION_Handle *cfg,
426 * @param br handle of the request that is to be cancelled 425 * @param br handle of the request that is to be cancelled
427 */ 426 */
428void 427void
429GNUNET_TRANSPORT_blacklist_cancel (struct GNUNET_TRANSPORT_Blacklist *br); 428GNUNET_TRANSPORT_blacklist_cancel(struct GNUNET_TRANSPORT_Blacklist *br);
430 429
431 430
432/** 431/**
@@ -444,9 +443,7 @@ struct GNUNET_TRANSPORT_PluginSession;
444/** 443/**
445 * Possible states of a session in a plugin. 444 * Possible states of a session in a plugin.
446 */ 445 */
447enum GNUNET_TRANSPORT_SessionState 446enum GNUNET_TRANSPORT_SessionState {
448{
449
450 /** 447 /**
451 * The session was created (first call for each session object). 448 * The session was created (first call for each session object).
452 */ 449 */
@@ -473,16 +470,13 @@ enum GNUNET_TRANSPORT_SessionState
473 * Last call for each session object. 470 * Last call for each session object.
474 */ 471 */
475 GNUNET_TRANSPORT_SS_DONE 472 GNUNET_TRANSPORT_SS_DONE
476
477}; 473};
478 474
479 475
480/** 476/**
481 * Information about a plugin's session. 477 * Information about a plugin's session.
482 */ 478 */
483struct GNUNET_TRANSPORT_SessionInfo 479struct GNUNET_TRANSPORT_SessionInfo {
484{
485
486 /** 480 /**
487 * New state of the session. 481 * New state of the session.
488 */ 482 */
@@ -561,9 +555,9 @@ typedef void (*GNUNET_TRANSPORT_SessionMonitorCallback) (
561 * @return NULL on error, otherwise handle for cancellation 555 * @return NULL on error, otherwise handle for cancellation
562 */ 556 */
563struct GNUNET_TRANSPORT_PluginMonitor * 557struct GNUNET_TRANSPORT_PluginMonitor *
564GNUNET_TRANSPORT_monitor_plugins (const struct GNUNET_CONFIGURATION_Handle *cfg, 558GNUNET_TRANSPORT_monitor_plugins(const struct GNUNET_CONFIGURATION_Handle *cfg,
565 GNUNET_TRANSPORT_SessionMonitorCallback cb, 559 GNUNET_TRANSPORT_SessionMonitorCallback cb,
566 void *cb_cls); 560 void *cb_cls);
567 561
568 562
569/** 563/**
@@ -574,7 +568,7 @@ GNUNET_TRANSPORT_monitor_plugins (const struct GNUNET_CONFIGURATION_Handle *cfg,
574 * @param pm handle of the request that is to be cancelled 568 * @param pm handle of the request that is to be cancelled
575 */ 569 */
576void 570void
577GNUNET_TRANSPORT_monitor_plugins_cancel ( 571GNUNET_TRANSPORT_monitor_plugins_cancel(
578 struct GNUNET_TRANSPORT_PluginMonitor *pm); 572 struct GNUNET_TRANSPORT_PluginMonitor *pm);
579 573
580 574
@@ -659,13 +653,13 @@ typedef void (*GNUNET_TRANSPORT_NotifyExcessBandwidth) (
659 * @return NULL on error 653 * @return NULL on error
660 */ 654 */
661struct GNUNET_TRANSPORT_CoreHandle * 655struct GNUNET_TRANSPORT_CoreHandle *
662GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, 656GNUNET_TRANSPORT_core_connect(const struct GNUNET_CONFIGURATION_Handle *cfg,
663 const struct GNUNET_PeerIdentity *self, 657 const struct GNUNET_PeerIdentity *self,
664 const struct GNUNET_MQ_MessageHandler *handlers, 658 const struct GNUNET_MQ_MessageHandler *handlers,
665 void *cls, 659 void *cls,
666 GNUNET_TRANSPORT_NotifyConnect nc, 660 GNUNET_TRANSPORT_NotifyConnect nc,
667 GNUNET_TRANSPORT_NotifyDisconnect nd, 661 GNUNET_TRANSPORT_NotifyDisconnect nd,
668 GNUNET_TRANSPORT_NotifyExcessBandwidth neb); 662 GNUNET_TRANSPORT_NotifyExcessBandwidth neb);
669 663
670 664
671/** 665/**
@@ -674,7 +668,7 @@ GNUNET_TRANSPORT_core_connect (const struct GNUNET_CONFIGURATION_Handle *cfg,
674 * @param handle handle returned from connect 668 * @param handle handle returned from connect
675 */ 669 */
676void 670void
677GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle); 671GNUNET_TRANSPORT_core_disconnect(struct GNUNET_TRANSPORT_CoreHandle *handle);
678 672
679 673
680/** 674/**
@@ -685,8 +679,8 @@ GNUNET_TRANSPORT_core_disconnect (struct GNUNET_TRANSPORT_CoreHandle *handle);
685 * @return NULL if disconnected, otherwise message queue for @a peer 679 * @return NULL if disconnected, otherwise message queue for @a peer
686 */ 680 */
687struct GNUNET_MQ_Handle * 681struct GNUNET_MQ_Handle *
688GNUNET_TRANSPORT_core_get_mq (struct GNUNET_TRANSPORT_CoreHandle *handle, 682GNUNET_TRANSPORT_core_get_mq(struct GNUNET_TRANSPORT_CoreHandle *handle,
689 const struct GNUNET_PeerIdentity *peer); 683 const struct GNUNET_PeerIdentity *peer);
690 684
691 685
692#if 0 /* keep Emacsens' auto-indent happy */ 686#if 0 /* keep Emacsens' auto-indent happy */