diff options
Diffstat (limited to 'src/include/gnunet_statistics_service.h')
-rw-r--r-- | src/include/gnunet_statistics_service.h | 45 |
1 files changed, 23 insertions, 22 deletions
diff --git a/src/include/gnunet_statistics_service.h b/src/include/gnunet_statistics_service.h index e22fe16d4..1807d3de0 100644 --- a/src/include/gnunet_statistics_service.h +++ b/src/include/gnunet_statistics_service.h | |||
@@ -64,8 +64,7 @@ struct GNUNET_STATISTICS_Handle; | |||
64 | typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, | 64 | typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, |
65 | const char *subsystem, | 65 | const char *subsystem, |
66 | const char *name, | 66 | const char *name, |
67 | uint64_t value, | 67 | uint64_t value, int is_persistent); |
68 | int is_persistent); | ||
69 | 68 | ||
70 | /** | 69 | /** |
71 | * Get handle for the statistics service. | 70 | * Get handle for the statistics service. |
@@ -75,8 +74,8 @@ typedef int (*GNUNET_STATISTICS_Iterator) (void *cls, | |||
75 | * @return handle to use | 74 | * @return handle to use |
76 | */ | 75 | */ |
77 | struct GNUNET_STATISTICS_Handle | 76 | struct GNUNET_STATISTICS_Handle |
78 | *GNUNET_STATISTICS_create (const char *subsystem, | 77 | *GNUNET_STATISTICS_create (const char *subsystem, |
79 | const struct GNUNET_CONFIGURATION_Handle *cfg); | 78 | const struct GNUNET_CONFIGURATION_Handle *cfg); |
80 | 79 | ||
81 | 80 | ||
82 | /** | 81 | /** |
@@ -88,7 +87,7 @@ struct GNUNET_STATISTICS_Handle | |||
88 | * be completed | 87 | * be completed |
89 | */ | 88 | */ |
90 | void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, | 89 | void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, |
91 | int sync_first); | 90 | int sync_first); |
92 | 91 | ||
93 | 92 | ||
94 | /** | 93 | /** |
@@ -105,10 +104,9 @@ void GNUNET_STATISTICS_destroy (struct GNUNET_STATISTICS_Handle *h, | |||
105 | */ | 104 | */ |
106 | int | 105 | int |
107 | GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, | 106 | GNUNET_STATISTICS_watch (struct GNUNET_STATISTICS_Handle *handle, |
108 | const char *subsystem, | 107 | const char *subsystem, |
109 | const char *name, | 108 | const char *name, |
110 | GNUNET_STATISTICS_Iterator proc, | 109 | GNUNET_STATISTICS_Iterator proc, void *proc_cls); |
111 | void *proc_cls); | ||
112 | 110 | ||
113 | 111 | ||
114 | /** | 112 | /** |
@@ -138,13 +136,19 @@ struct GNUNET_STATISTICS_GetHandle; | |||
138 | * @param cls closure for proc and cont | 136 | * @param cls closure for proc and cont |
139 | * @return NULL on error | 137 | * @return NULL on error |
140 | */ | 138 | */ |
141 | struct GNUNET_STATISTICS_GetHandle * | 139 | struct GNUNET_STATISTICS_GetHandle *GNUNET_STATISTICS_get (struct |
142 | GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, | 140 | GNUNET_STATISTICS_Handle |
143 | const char *subsystem, | 141 | *handle, |
144 | const char *name, | 142 | const char |
145 | struct GNUNET_TIME_Relative timeout, | 143 | *subsystem, |
146 | GNUNET_STATISTICS_Callback cont, | 144 | const char *name, |
147 | GNUNET_STATISTICS_Iterator proc, void *cls); | 145 | struct |
146 | GNUNET_TIME_Relative | ||
147 | timeout, | ||
148 | GNUNET_STATISTICS_Callback | ||
149 | cont, | ||
150 | GNUNET_STATISTICS_Iterator | ||
151 | proc, void *cls); | ||
148 | 152 | ||
149 | 153 | ||
150 | /** | 154 | /** |
@@ -153,8 +157,7 @@ GNUNET_STATISTICS_get (struct GNUNET_STATISTICS_Handle *handle, | |||
153 | * | 157 | * |
154 | * @param gh handle of the request to cancel | 158 | * @param gh handle of the request to cancel |
155 | */ | 159 | */ |
156 | void | 160 | void GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh); |
157 | GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh); | ||
158 | 161 | ||
159 | 162 | ||
160 | /** | 163 | /** |
@@ -168,8 +171,7 @@ GNUNET_STATISTICS_get_cancel (struct GNUNET_STATISTICS_GetHandle *gh); | |||
168 | */ | 171 | */ |
169 | void | 172 | void |
170 | GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, | 173 | GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, |
171 | const char *name, | 174 | const char *name, uint64_t value, int make_persistent); |
172 | uint64_t value, int make_persistent); | ||
173 | 175 | ||
174 | /** | 176 | /** |
175 | * Set statistic value for the peer. Will always use our | 177 | * Set statistic value for the peer. Will always use our |
@@ -182,8 +184,7 @@ GNUNET_STATISTICS_set (struct GNUNET_STATISTICS_Handle *handle, | |||
182 | */ | 184 | */ |
183 | void | 185 | void |
184 | GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, | 186 | GNUNET_STATISTICS_update (struct GNUNET_STATISTICS_Handle *handle, |
185 | const char *name, | 187 | const char *name, int64_t delta, int make_persistent); |
186 | int64_t delta, int make_persistent); | ||
187 | 188 | ||
188 | 189 | ||
189 | 190 | ||