aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_statistics_service.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2011-12-19 21:26:34 +0000
committerChristian Grothoff <christian@grothoff.org>2011-12-19 21:26:34 +0000
commit3d08414cb6729815c74c895ff6f7b36c4e954989 (patch)
tree09bb981ec10693fa16bd6d7fe46eae5f318740fa /src/include/gnunet_statistics_service.h
parent158c660519935bdec0a17310d79ea5a71eb6913e (diff)
downloadgnunet-3d08414cb6729815c74c895ff6f7b36c4e954989.tar.gz
gnunet-3d08414cb6729815c74c895ff6f7b36c4e954989.zip
implement watch_cancel function
Diffstat (limited to 'src/include/gnunet_statistics_service.h')
-rw-r--r--src/include/gnunet_statistics_service.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index 11796d781..bfd65f883 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -91,8 +91,6 @@ GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first);
91 91
92/** 92/**
93 * Watch statistics from the peer (be notified whenever they change). 93 * Watch statistics from the peer (be notified whenever they change).
94 * Note that the only way to cancel a "watch" request is to destroy
95 * the statistics handle given as the first argument to this call.
96 * 94 *
97 * @param handle identification of the statistics service 95 * @param handle identification of the statistics service
98 * @param subsystem limit to the specified subsystem, never NULL 96 * @param subsystem limit to the specified subsystem, never NULL
@@ -108,6 +106,22 @@ GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
108 106
109 107
110/** 108/**
109 * Stop watching statistics from the peer.
110 *
111 * @param handle identification of the statistics service
112 * @param subsystem limit to the specified subsystem, never NULL
113 * @param name name of the statistic value, never NULL
114 * @param proc function to call on each value
115 * @param proc_cls closure for proc
116 * @return GNUNET_OK on success, GNUNET_SYSERR on error (no such watch)
117 */
118int
119GNUNET_STATISTICS_watch_cancel (struct GNUNET_STATISTICS_Handle *handle,
120 const char *subsystem, const char *name,
121 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
122
123
124/**
111 * Continuation called by the "get_all" and "get" functions. 125 * Continuation called by the "get_all" and "get" functions.
112 * 126 *
113 * @param cls closure 127 * @param cls closure
@@ -116,6 +130,7 @@ GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
116 */ 130 */
117typedef void (*GNUNET_STATISTICS_Callback) (void *cls, int success); 131typedef void (*GNUNET_STATISTICS_Callback) (void *cls, int success);
118 132
133
119/** 134/**
120 * Handle that can be used to cancel a statistics 'get' operation. 135 * Handle that can be used to cancel a statistics 'get' operation.
121 */ 136 */