diff options
Diffstat (limited to 'src/include/gnunet_sensor_service.h')
-rw-r--r-- | src/include/gnunet_sensor_service.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/src/include/gnunet_sensor_service.h b/src/include/gnunet_sensor_service.h index 59e4248ab..250256cef 100644 --- a/src/include/gnunet_sensor_service.h +++ b/src/include/gnunet_sensor_service.h | |||
@@ -49,6 +49,11 @@ struct GNUNET_SENSOR_Handle; | |||
49 | struct GNUNET_SENSOR_IterateContext; | 49 | struct GNUNET_SENSOR_IterateContext; |
50 | 50 | ||
51 | /** | 51 | /** |
52 | * Context of a force anomaly request | ||
53 | */ | ||
54 | struct GNUNET_SENSOR_ForceAnomalyContext; | ||
55 | |||
56 | /** | ||
52 | * Structure containing brief info about sensor | 57 | * Structure containing brief info about sensor |
53 | */ | 58 | */ |
54 | struct SensorInfoShort | 59 | struct SensorInfoShort |
@@ -147,6 +152,16 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h, | |||
147 | 152 | ||
148 | 153 | ||
149 | /** | 154 | /** |
155 | * Cancel a force anomaly request. | ||
156 | * | ||
157 | * @param fa Force anomaly context returned by GNUNET_SENSOR_force_anomaly() | ||
158 | */ | ||
159 | void | ||
160 | GNUNET_SENSOR_force_anomaly_cancel (struct GNUNET_SENSOR_ForceAnomalyContext | ||
161 | *fa); | ||
162 | |||
163 | |||
164 | /** | ||
150 | * Force an anomaly status change on a given sensor. If the sensor reporting | 165 | * Force an anomaly status change on a given sensor. If the sensor reporting |
151 | * module is running, this will trigger the usual reporting logic, therefore, | 166 | * module is running, this will trigger the usual reporting logic, therefore, |
152 | * please only use this in a test environment. | 167 | * please only use this in a test environment. |
@@ -157,10 +172,13 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h, | |||
157 | * @param h Service handle | 172 | * @param h Service handle |
158 | * @param sensor_name Sensor name to set the anomaly status | 173 | * @param sensor_name Sensor name to set the anomaly status |
159 | * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO | 174 | * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO |
175 | * @param cont Continuation function to be called after the request is sent | ||
176 | * @param cont_cls Closure for cont | ||
160 | */ | 177 | */ |
161 | void | 178 | struct GNUNET_SENSOR_ForceAnomalyContext * |
162 | GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name, | 179 | GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name, |
163 | int anomalous); | 180 | int anomalous, GNUNET_SENSOR_Continuation cont, |
181 | void *cont_cls); | ||
164 | 182 | ||
165 | #if 0 /* keep Emacsens' auto-indent happy */ | 183 | #if 0 /* keep Emacsens' auto-indent happy */ |
166 | { | 184 | { |