From 10c13b88b24238edc5d30c5b84d4b4e9965204aa Mon Sep 17 00:00:00 2001 From: Joseph Morrow Date: Thu, 30 Apr 2015 18:09:53 -0400 Subject: [PATCH] Added an IoTivity 'octypes' header file. This removes the C++ SDK's documentation dependency on the full C SDK's API. Now, Doxygen generated documentation will not include the full C SDK's API in its documentation. Change-Id: Iaedf8ff1ef832b6f32466f9d978fda703d1f3f53 Signed-off-by: Joseph Morrow Reviewed-on: https://gerrit.iotivity.org/gerrit/878 Tested-by: jenkins-iotivity Reviewed-by: Shilpa Sodani Reviewed-by: Erich Keane --- resource/csdk/stack/include/ocstack.h | 412 +------------------------------ resource/csdk/stack/include/octypes.h | 445 ++++++++++++++++++++++++++++++++++ resource/docs/Doxyfile | 1 + resource/include/OCApi.h | 2 +- 4 files changed, 448 insertions(+), 412 deletions(-) create mode 100644 resource/csdk/stack/include/octypes.h diff --git a/resource/csdk/stack/include/ocstack.h b/resource/csdk/stack/include/ocstack.h index 1d28c3c..6fbe555 100644 --- a/resource/csdk/stack/include/ocstack.h +++ b/resource/csdk/stack/include/ocstack.h @@ -22,422 +22,12 @@ #define OCSTACK_H_ #include -#include "ocstackconfig.h" +#include "octypes.h" #ifdef __cplusplus extern "C" { #endif // __cplusplus #define WITH_PRESENCE -//----------------------------------------------------------------------------- -// Defines -//----------------------------------------------------------------------------- - -//TODO: May want to refactor this in upcoming sprints. -//Don't want to expose to application layer that lower level stack is using CoAP. - -/// Authority + URI string to prefix well known queries -#define OC_WELL_KNOWN_QUERY "224.0.1.187:5683/oc/core" -#define OC_EXPLICIT_DEVICE_DISCOVERY_URI "224.0.1.187:5683/oc/core/d?rt=core.led" -/// Multicast address and port string to prefix multicast queries -#define OC_MULTICAST_PREFIX "224.0.1.187:5683" -/// IP Multicast address to use for multicast requests -#define OC_MULTICAST_IP "224.0.1.187" -/// IP Multicast port to use for multicast requests -#define OC_MULTICAST_PORT 5683 - -#ifdef WITH_PRESENCE -#define OC_DEFAULT_PRESENCE_TTL_SECONDS (60) -/// OC_MAX_PRESENCE_TTL_SECONDS sets the maximum time to live (TTL) for presence. -/// NOTE: Changing the setting to a longer duration may lead to unsupported and untested -/// operation. -#define OC_MAX_PRESENCE_TTL_SECONDS (60 * 60 * 24) // 60 sec/min * 60 min/hr * 24 hr/day -#define OC_PRESENCE_URI "/oc/presence" -#endif - -//----------------------------------------------------------------------------- -// Typedefs -//----------------------------------------------------------------------------- - -/** - * Data structure to encapsulate IPv4/IPv6/Contiki/lwIP device addresses. - */ -typedef struct OCDevAddr -{ - uint32_t size; ///< length of the address stored in addr field. - uint8_t addr[DEV_ADDR_SIZE_MAX]; ///< device address. -} OCDevAddr; - -/** - * OC Virtual resources supported by every OC device. - */ -typedef enum -{ - OC_WELL_KNOWN_URI= 0, ///< "/oc/core" - OC_DEVICE_URI, ///< "/oc/core/d" - OC_RESOURCE_TYPES_URI, ///< "/oc/core/d/type" - #ifdef WITH_PRESENCE - OC_PRESENCE, ///< "/oc/presence" - #endif - OC_MAX_VIRTUAL_RESOURCES /// #include -#include "ocstack.h" +#include "octypes.h" #include "OCHeaderOption.h" #include #include "StringConstants.h" -- 2.7.4