sensor: merged reporting module
[oweals/gnunet.git] / src / sensor / sensor.h
index 633f18e0331f52a471e410a3b665b2778a56b97b..5d75ee42780a7dd9ead3c50d2695ef3d82c5a51b 100644 (file)
@@ -61,7 +61,6 @@ GNUNET_NETWORK_STRUCT_BEGIN
 };
 
 GNUNET_NETWORK_STRUCT_END
-
 /**
  * Stop the sensor analysis module
  */
@@ -82,22 +81,33 @@ SENSOR_analysis_start (const struct GNUNET_CONFIGURATION_Handle *c,
 
 
 /**
- * Stop sensor reporting module
+ * Stop sensor anomaly reporting module
  */
 void
 SENSOR_reporting_stop ();
 
+/**
+ * Used by the analysis module to tell the reporting module about a change in
+ * the anomaly status of a sensor.
+ *
+ * @param sensor Related sensor
+ * @param anomalous The new sensor anomalous status
+ */
+void
+SENSOR_reporting_anomaly_update (struct GNUNET_SENSOR_SensorInfo *sensor,
+                                 int anomalous);
+
 
 /**
- * Start the sensor reporting module
+ * Start the sensor anomaly reporting module
  *
  * @param c our service configuration
- * @param sensors multihashmap of loaded sensors
+ * @param s multihashmap of loaded sensors
  * @return #GNUNET_OK if started successfully, #GNUNET_SYSERR otherwise
  */
 int
 SENSOR_reporting_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                        struct GNUNET_CONTAINER_MultiHashMap *sensors);
+                                struct GNUNET_CONTAINER_MultiHashMap *s);
 
 
 /**
@@ -117,5 +127,4 @@ SENSOR_update_stop ();
  */
 int
 SENSOR_update_start (const struct GNUNET_CONFIGURATION_Handle *c,
-                     struct GNUNET_CONTAINER_MultiHashMap *s,
-                     void (*cb) ());
+                     struct GNUNET_CONTAINER_MultiHashMap *s, void (*cb) ());