diff options
Diffstat (limited to 'src/dv/gnunet_dv_service.h')
-rw-r--r-- | src/dv/gnunet_dv_service.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dv/gnunet_dv_service.h b/src/dv/gnunet_dv_service.h index 7bdb17858..ebb84c2e2 100644 --- a/src/dv/gnunet_dv_service.h +++ b/src/dv/gnunet_dv_service.h | |||
@@ -40,6 +40,15 @@ typedef void (*GNUNET_DV_ConnectCallback)(void *cls, | |||
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Signature of a function to be called if DV | 42 | * Signature of a function to be called if DV |
43 | * distance to a peer is changed. | ||
44 | */ | ||
45 | typedef void (*GNUNET_DV_DistanceChangedCallback)(void *cls, | ||
46 | const struct GNUNET_PeerIdentity *peer, | ||
47 | uint32_t distance); | ||
48 | |||
49 | |||
50 | /** | ||
51 | * Signature of a function to be called if DV | ||
43 | * is no longer able to talk to a peer. | 52 | * is no longer able to talk to a peer. |
44 | */ | 53 | */ |
45 | typedef void (*GNUNET_DV_DisconnectCallback)(void *cls, | 54 | typedef void (*GNUNET_DV_DisconnectCallback)(void *cls, |
@@ -84,6 +93,7 @@ struct GNUNET_DV_ServiceHandle; | |||
84 | * @param cfg configuration | 93 | * @param cfg configuration |
85 | * @param cls closure for callbacks | 94 | * @param cls closure for callbacks |
86 | * @param connect_cb function to call on connects | 95 | * @param connect_cb function to call on connects |
96 | * @param distance_cb function to call if distances change | ||
87 | * @param disconnect_cb function to call on disconnects | 97 | * @param disconnect_cb function to call on disconnects |
88 | * @param message_cb function to call if we receive messages | 98 | * @param message_cb function to call if we receive messages |
89 | * @return handle to access the service | 99 | * @return handle to access the service |
@@ -92,6 +102,7 @@ struct GNUNET_DV_ServiceHandle * | |||
92 | GNUNET_DV_service_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, | 102 | GNUNET_DV_service_connect (const struct GNUNET_CONFIGURATION_Handle *cfg, |
93 | void *cls, | 103 | void *cls, |
94 | GNUNET_DV_ConnectCallback connect_cb, | 104 | GNUNET_DV_ConnectCallback connect_cb, |
105 | GNUNET_DV_DistanceChangedCallback distance_cb, | ||
95 | GNUNET_DV_DisconnectCallback disconnect_cb, | 106 | GNUNET_DV_DisconnectCallback disconnect_cb, |
96 | GNUNET_DV_MessageReceivedCallback message_cb); | 107 | GNUNET_DV_MessageReceivedCallback message_cb); |
97 | 108 | ||