From 6a49412877aed68effcaee9e5d2210f1a173e570 Mon Sep 17 00:00:00 2001 From: Joseph Morrow Date: Wed, 13 May 2015 15:46:27 -0400 Subject: [PATCH] Properly defined URI & Resource Type values for Presence Advertisement. This changeset ensures that presence advertisments comply with section 11.3.2.4 of OIC Core Specification 0.9. This will ensure that any implementation of the OIC Core Spec Compliant Project A will be able to send/receive advertisements with IoTivity. Change-Id: Ie00347099cab67c03af6557157e64290c625d828 Signed-off-by: Joseph Morrow Reviewed-on: https://gerrit.iotivity.org/gerrit/981 Tested-by: jenkins-iotivity Reviewed-by: Sakthivel Samidurai Reviewed-by: Mandeep Shetty Reviewed-by: Erich Keane --- resource/csdk/stack/include/octypes.h | 6 +++--- resource/csdk/stack/src/ocresource.c | 2 +- resource/src/InProcClientWrapper.cpp | 2 +- service/notification-manager/NotificationManager/src/hosting.c | 1 - 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/resource/csdk/stack/include/octypes.h b/resource/csdk/stack/include/octypes.h index 53357a4..7868428 100644 --- a/resource/csdk/stack/include/octypes.h +++ b/resource/csdk/stack/include/octypes.h @@ -51,7 +51,7 @@ extern "C" { /// 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" +#define OC_PRESENCE_URI "/oic/ad" /** * Attributes used to form a proper OIC conforming JSON message. @@ -63,7 +63,7 @@ extern "C" { #define OC_RSRVD_REPRESENTATION "rep" #define OC_RSRVD_CONTENT_TYPE "ct" #define OC_RSRVD_RESOURCE_TYPE "rt" -#define OC_RSRVD_RESOURCE_TYPE_PRESENCE "core.presence" +#define OC_RSRVD_RESOURCE_TYPE_PRESENCE "oic.wk.ad" #define OC_RSRVD_INTERFACE "if" #define OC_RSRVD_DEVICE_ID "di" #define OC_RSRVD_DEVICE_NAME "dn" @@ -108,7 +108,7 @@ typedef enum OC_DEVICE_URI, ///< "/oc/core/d" OC_RESOURCE_TYPES_URI, ///< "/oc/core/d/type" #ifdef WITH_PRESENCE - OC_PRESENCE, ///< "/oc/presence" + OC_PRESENCE, ///< "/oic/ad" #endif OC_MAX_VIRTUAL_RESOURCES ///