aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_statistics_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2010-03-12 12:36:50 +0000
committerChristian Grothoff <christian@grothoff.org>2010-03-12 12:36:50 +0000
commit61cfd3340e67672f351ab92dab7da72dca058c79 (patch)
tree7144d056b877397aff501ec7f36e42f659350be8 /src/include/gnunet_statistics_service.h
parent6324d68ac07d6cc498c934727ba5970909741c85 (diff)
downloadgnunet-61cfd3340e67672f351ab92dab7da72dca058c79.tar.gz
gnunet-61cfd3340e67672f351ab92dab7da72dca058c79.zip
enable stats get cancellation
Diffstat (limited to 'src/include/gnunet_statistics_service.h')
-rw-r--r--src/include/gnunet_statistics_service.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index 0fc84cfc3..5c166d43d 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -103,6 +103,11 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
103typedef void (*GNUNET_STATISTICS_Callback) (void *cls, int success); 103typedef void (*GNUNET_STATISTICS_Callback) (void *cls, int success);
104 104
105/** 105/**
106 * Handle that can be used to cancel a statistics 'get' operation.
107 */
108struct GNUNET_STATISTICS_GetHandle;
109
110/**
106 * Get statistic from the peer. 111 * Get statistic from the peer.
107 * 112 *
108 * @param handle identification of the statistics service 113 * @param handle identification of the statistics service
@@ -113,8 +118,9 @@ typedef void (*GNUNET_STATISTICS_Callback) (void *cls, int success);
113 * @param cont continuation to call when done (can be NULL) 118 * @param cont continuation to call when done (can be NULL)
114 * @param proc function to call on each value 119 * @param proc function to call on each value
115 * @param cls closure for proc and cont 120 * @param cls closure for proc and cont
121 * @return NULL on error
116 */ 122 */
117void 123struct GNUNET_STATISTICS_GetHandle *
118GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, 124GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
119 const char *subsystem, 125 const char *subsystem,
120 const char *name, 126 const char *name,
@@ -122,6 +128,17 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
122 GNUNET_STATISTICS_Callback cont, 128 GNUNET_STATISTICS_Callback cont,
123 GNUNET_STATISTICS_Iterator proc, void *cls); 129 GNUNET_STATISTICS_Iterator proc, void *cls);
124 130
131
132/**
133 * Cancel a 'get' request. Must be called before the 'cont'
134 * function is called.
135 *
136 * @param gh handle of the request to cancel
137 */
138void
139GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
140
141
125/** 142/**
126 * Set statistic value for the peer. Will always use our 143 * Set statistic value for the peer. Will always use our
127 * subsystem (the argument used when "handle" was created). 144 * subsystem (the argument used when "handle" was created).