2 This file is part of GNUnet
5 GNUnet is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published
7 by the Free Software Foundation; either version 3, or (at your
8 option) any later version.
10 GNUnet is distributed in the hope that it will be useful, but
11 WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with GNUnet; see the file COPYING. If not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
22 * @file include/gnunet_sensor_service.h
23 * @brief API to the sensor service
24 * @author Omar Tarabai
26 #ifndef GNUNET_SENSOR_SERVICE_H
27 #define GNUNET_SENSOR_SERVICE_H
29 #include <gnunet/platform.h>
30 #include <gnunet/gnunet_util_lib.h>
31 #include "gnunet_protocols_mi.h"
36 #if 0 /* keep Emacsens' auto-indent happy */
43 * Handle to the sensor service.
45 struct GNUNET_SENSOR_Handle;
48 * Structure containing brief info about sensor
50 struct SensorInfoShort
59 * First part of version number
61 uint16_t version_major;
64 * Second part of version number
66 uint16_t version_minor;
76 * Type of an iterator over sensor definitions.
79 * @param hello hello message for the peer (can be NULL)
80 * @param error message
82 typedef void (*GNUNET_SENSOR_SensorIteratorCB) (void *cls,
83 const struct SensorInfoShort *sensor,
87 * Continuation called with a status result.
90 * @param emsg error message, NULL on success
92 typedef void (*GNUNET_SENSOR_Continuation)(void *cls,
96 * Connect to the sensor service.
98 * @return NULL on error
100 struct GNUNET_SENSOR_Handle *
101 GNUNET_SENSOR_connect (const struct GNUNET_CONFIGURATION_Handle *cfg);
104 #if 0 /* keep Emacsens' auto-indent happy */