aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorOmar Tarabai <tarabai@devegypt.com>2014-07-25 18:02:46 +0000
committerOmar Tarabai <tarabai@devegypt.com>2014-07-25 18:02:46 +0000
commit29f73bb496a579a5a7600b3e3b2ab88b859bee65 (patch)
tree8752fcdd559c54c31b84cd0ba7dddd09cad37a5e /src/include
parent30752e6cb73b6c71ad5aab392c40ac482257e410 (diff)
downloadgnunet-29f73bb496a579a5a7600b3e3b2ab88b859bee65.tar.gz
gnunet-29f73bb496a579a5a7600b3e3b2ab88b859bee65.zip
sensor: towards update functionality
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_protocols.h10
-rw-r--r--src/include/gnunet_sensor_util_lib.h46
2 files changed, 56 insertions, 0 deletions
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h
index a95c0107a..4063b2efd 100644
--- a/src/include/gnunet_protocols.h
+++ b/src/include/gnunet_protocols.h
@@ -2438,6 +2438,16 @@ extern "C"
2438 */ 2438 */
2439#define GNUNET_MESSAGE_TYPE_SENSOR_BRIEF 806 2439#define GNUNET_MESSAGE_TYPE_SENSOR_BRIEF 806
2440 2440
2441/**
2442 * Request for full sensor information
2443 */
2444#define GNUNET_MESSAGE_TYPE_SENSOR_FULL_REQ 807
2445
2446/**
2447 * Full sensor information
2448 */
2449#define GNUNET_MESSAGE_TYPE_SENSOR_FULL 808
2450
2441 2451
2442/******************************************************************************* 2452/*******************************************************************************
2443 * PEERSTORE message types 2453 * PEERSTORE message types
diff --git a/src/include/gnunet_sensor_util_lib.h b/src/include/gnunet_sensor_util_lib.h
index 1e5108d29..a9651bc1b 100644
--- a/src/include/gnunet_sensor_util_lib.h
+++ b/src/include/gnunet_sensor_util_lib.h
@@ -258,10 +258,56 @@ struct GNUNET_SENSOR_SensorBriefMessage
258 258
259}; 259};
260 260
261/**
262 * Used to communicate full information about a sensor.
263 */
264struct GNUNET_SENSOR_SensorFullMessage
265{
266
267 /**
268 * GNUNET general message header.
269 */
270 struct GNUNET_MessageHeader header;
271
272 /**
273 * Size of the config file carrying full sensor information.
274 * Allocated at position 0 after this struct.
275 */
276 uint16_t cfg_size;
277
278 /**
279 * Name of the file (usually script) associated with this sensor.
280 * At the moment we only support having one file since that's all our sensors
281 * need at the moment.
282 * The file name is allocated at position 1 after this struct.
283 */
284 uint16_t scriptname_size;
285
286 /**
287 * Size of the file (usually script) associated with this sensor.
288 * The file binary is allocated at position 2 after this struct.
289 */
290 uint16_t script_size;
291
292};
293
261GNUNET_NETWORK_STRUCT_END 294GNUNET_NETWORK_STRUCT_END
262 295
263 296
264/** 297/**
298 * Given two version numbers as major and minor, compare them.
299 *
300 * @param v1_major First part of first version number
301 * @param v1_minor Second part of first version number
302 * @param v2_major First part of second version number
303 * @param v2_minor Second part of second version number
304 */
305int
306GNUNET_SENSOR_version_compare (uint16_t v1_major, uint16_t v1_minor,
307 uint16_t v2_major, uint16_t v2_minor);
308
309
310/**
265 * Reads sensor definitions from local data files 311 * Reads sensor definitions from local data files
266 * 312 *
267 * @return a multihashmap of loaded sensors 313 * @return a multihashmap of loaded sensors