convert fs publish to MQ
[oweals/gnunet.git] / src / include / gnunet_sensor_service.h
index 59e4248ab22c652d891ff882ebc842e01d7bff3a..06aecd24816ae38c7e0eaaeb0454214c9453e759 100644 (file)
@@ -1,6 +1,6 @@
 /*
       This file is part of GNUnet
-      (C) 
+      Copyright (C)
 
       GNUnet is free software; you can redistribute it and/or modify
       it under the terms of the GNU General Public License as published
 
       You should have received a copy of the GNU General Public License
       along with GNUnet; see the file COPYING.  If not, write to the
-      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-      Boston, MA 02111-1307, USA.
+      Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+      Boston, MA 02110-1301, USA.
  */
 
 /**
- * @file include/gnunet_sensor_service.h
- * @brief API to the sensor service
  * @author Omar Tarabai
+ *
+ * @file
+ * API to the sensor service
+ *
+ * @defgroup sensor  Sensor service
+ *
+ * @{
  */
+
 #ifndef GNUNET_SENSOR_SERVICE_H
 #define GNUNET_SENSOR_SERVICE_H
 
-#include "platform.h"
+#include "gnunet_common.h"
 #include "gnunet_util_lib.h"
 
 #ifdef __cplusplus
@@ -48,6 +54,11 @@ struct GNUNET_SENSOR_Handle;
  */
 struct GNUNET_SENSOR_IterateContext;
 
+/**
+ * Context of a force anomaly request
+ */
+struct GNUNET_SENSOR_ForceAnomalyContext;
+
 /**
  * Structure containing brief info about sensor
  */
@@ -146,6 +157,16 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h,
                                void *callback_cls);
 
 
+/**
+ * Cancel a force anomaly request.
+ *
+ * @param fa Force anomaly context returned by GNUNET_SENSOR_force_anomaly()
+ */
+void
+GNUNET_SENSOR_force_anomaly_cancel (struct GNUNET_SENSOR_ForceAnomalyContext
+                                    *fa);
+
+
 /**
  * Force an anomaly status change on a given sensor. If the sensor reporting
  * module is running, this will trigger the usual reporting logic, therefore,
@@ -157,10 +178,14 @@ GNUNET_SENSOR_iterate (struct GNUNET_SENSOR_Handle *h,
  * @param h Service handle
  * @param sensor_name Sensor name to set the anomaly status
  * @param anomalous The desired status: #GNUNET_YES / #GNUNET_NO
+ * @param cont Continuation function to be called after the request is sent
+ * @param cont_cls Closure for cont
  */
-void
+struct GNUNET_SENSOR_ForceAnomalyContext *
 GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name,
-                             int anomalous);
+                             int anomalous, GNUNET_SENSOR_Continuation cont,
+                             void *cont_cls);
+
 
 #if 0                           /* keep Emacsens' auto-indent happy */
 {
@@ -170,3 +195,5 @@ GNUNET_SENSOR_force_anomaly (struct GNUNET_SENSOR_Handle *h, char *sensor_name,
 #endif
 
 #endif
+
+/** @} */  /* end of group */