aboutsummaryrefslogtreecommitdiff
path: root/src/include/gnunet_statistics_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/gnunet_statistics_service.h')
-rw-r--r--src/include/gnunet_statistics_service.h53
1 files changed, 23 insertions, 30 deletions
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h
index 90cc612df..c246e7cda 100644
--- a/src/include/gnunet_statistics_service.h
+++ b/src/include/gnunet_statistics_service.h
@@ -72,11 +72,9 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, const char *subsystem,
72 * @param cfg services configuration in use 72 * @param cfg services configuration in use
73 * @return handle to use 73 * @return handle to use
74 */ 74 */
75struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char 75struct GNUNET_STATISTICS_Handle *
76 *subsystem, 76GNUNET_STATISTICS_create (const char *subsystem,
77 const struct 77 const struct GNUNET_CONFIGURATION_Handle *cfg);
78 GNUNET_CONFIGURATION_Handle
79 *cfg);
80 78
81 79
82/** 80/**
@@ -87,8 +85,8 @@ struct GNUNET_STATISTICS_Handle *GNUNET_STATISTICS_create (const char
87 * @param sync_first set to GNUNET_YES if pending SET requests should 85 * @param sync_first set to GNUNET_YES if pending SET requests should
88 * be completed 86 * be completed
89 */ 87 */
90void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, 88void
91 int sync_first); 89GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, int sync_first);
92 90
93 91
94/** 92/**
@@ -103,9 +101,10 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h,
103 * @param proc_cls closure for proc 101 * @param proc_cls closure for proc
104 * @return GNUNET_OK on success, GNUNET_SYSERR on error 102 * @return GNUNET_OK on success, GNUNET_SYSERR on error
105 */ 103 */
106int GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, 104int
107 const char *subsystem, const char *name, 105GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle,
108 GNUNET_STATISTICS_Iterator proc, void *proc_cls); 106 const char *subsystem, const char *name,
107 GNUNET_STATISTICS_Iterator proc, void *proc_cls);
109 108
110 109
111/** 110/**
@@ -135,19 +134,12 @@ struct GNUNET_STATISTICS_GetHandle;
135 * @param cls closure for proc and cont 134 * @param cls closure for proc and cont
136 * @return NULL on error 135 * @return NULL on error
137 */ 136 */
138struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct 137struct GNUNET_STATISTICS_GetHandle *
139 GNUNET_STATISTICS_Handle 138GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle,
140 *handle, 139 const char *subsystem, const char *name,
141 const char 140 struct GNUNET_TIME_Relative timeout,
142 *subsystem, 141 GNUNET_STATISTICS_Callback cont,
143 const char *name, 142 GNUNET_STATISTICS_Iterator proc, void *cls);
144 struct
145 GNUNET_TIME_Relative
146 timeout,
147 GNUNET_STATISTICS_Callback
148 cont,
149 GNUNET_STATISTICS_Iterator
150 proc, void *cls);
151 143
152 144
153/** 145/**
@@ -156,7 +148,8 @@ struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct
156 * 148 *
157 * @param gh handle of the request to cancel 149 * @param gh handle of the request to cancel
158 */ 150 */
159void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh); 151void
152GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
160 153
161 154
162/** 155/**
@@ -168,9 +161,9 @@ void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh);
168 * @param value new value to set 161 * @param value new value to set
169 * @param make_persistent should the value be kept across restarts? 162 * @param make_persistent should the value be kept across restarts?
170 */ 163 */
171void GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, 164void
172 const char *name, uint64_t value, 165GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
173 int make_persistent); 166 const char *name, uint64_t value, int make_persistent);
174 167
175/** 168/**
176 * Set statistic value for the peer. Will always use our 169 * Set statistic value for the peer. Will always use our
@@ -181,9 +174,9 @@ void GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle,
181 * @param delta change in value (added to existing value) 174 * @param delta change in value (added to existing value)
182 * @param make_persistent should the value be kept across restarts? 175 * @param make_persistent should the value be kept across restarts?
183 */ 176 */
184void GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, 177void
185 const char *name, int64_t delta, 178GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle,
186 int make_persistent); 179 const char *name, int64_t delta, int make_persistent);
187 180
188 181
189 182