Commit 6a494128 authored by Joseph Morrow's avatar Joseph Morrow Committed by Erich Keane

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: default avatarJoseph Morrow <joseph.l.morrow@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/981Tested-by: default avatarjenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: default avatarSakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: default avatarMandeep Shetty <mandeep.shetty@intel.com>
Reviewed-by: default avatarErich Keane <erich.keane@intel.com>
parent 802ddeaa
......@@ -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 ///<s Max items in the list
} OCVirtualResources;
......
......@@ -55,7 +55,7 @@ static const char * VIRTUAL_RSRCS[] =
"/oc/core/d",
"/oc/core/types/d",
#ifdef WITH_PRESENCE
"/oc/presence"
"/oic/ad"
#endif
};
......
......@@ -773,7 +773,7 @@ namespace OC
auto cLock = m_csdkLock.lock();
std::ostringstream os;
os << host << "/oc/presence";
os << host << OC_PRESENCE_URI;
if(!resourceType.empty())
{
......
......@@ -38,7 +38,6 @@ static RequestHandleList *s_requestHandleList = NULL;
#define OC_DEFAULT_ADDRESS "224.0.1.187"
#define OC_WELL_KNOWN_COORDINATING_QUERY "coap://224.0.1.187:5683/oc/core?rt=Resource.Hosting"
#define OC_COORDINATING_QUERY "/oc/core?rt=Resource.Hosting"
#define OC_PRESENCE_URI "/oc/presence"
#define DEFAULT_CONTEXT_VALUE 0x99
/*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment