Change notification-service resource type
authorcc <ch79.cho@samsung.com>
Mon, 23 Jan 2017 01:43:30 +0000 (10:43 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 23 Jan 2017 09:39:53 +0000 (09:39 +0000)
It is required to change notification-service resource type to pass CTT as below.
x.org. naming scheme is accepted as vendor specific resource name
during OCF F2F meeting in Vegas.

oic.wk.xxx -> x.org.iotivity.xxx

Change-Id: I7e9d50c315ad7cd4beda6b4454e525dc03d3bfb5
Signed-off-by: cc <ch79.cho@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/16687
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
service/notification/cpp-wrapper/unittest/NSConsumerServiceSimulator.h
service/notification/cpp-wrapper/unittest/NSProviderServiceSimulator.h
service/notification/src/common/NSConstants.h
service/notification/src/consumer/NSConsumerCommon.h
service/notification/src/consumer/NSConsumerDiscovery.c
service/notification/src/consumer/NSConsumerNetworkEventListener.c
service/notification/unittest/NSConsumerSimulator.h
service/notification/unittest/NSProviderSimulator.h

index 054f76c..c34af54 100755 (executable)
@@ -53,7 +53,7 @@ class NSConsumerSimulator
 
         void findProvider()
         {
-            OC::OCPlatform::findResource("", std::string("/oic/res?rt=oic.wk.notification"),
+            OC::OCPlatform::findResource("", std::string("/oic/res?rt=x.org.iotivity.notification"),
                                          OCConnectivityType::CT_DEFAULT,
                                          std::bind(&NSConsumerSimulator::findResultCallback, this, std::placeholders::_1),
                                          OC::QualityOfService::LowQos);
@@ -121,7 +121,7 @@ class NSConsumerSimulator
             try
             {
 
-                std::vector<std::string> rts{"oic.wk.notification"};
+                std::vector<std::string> rts{"x.org.iotivity.notification"};
 
                 m_msgResource
                     = OC::OCPlatform::constructResourceObject(
index 4a7488c..229e24b 100755 (executable)
@@ -398,7 +398,7 @@ class NSProviderSimulator
             OC::OCPlatform::startPresence(30);
 
             std::string notificationUri = m_notificationUri;
-            std::string resourceTypeName = "oic.wk.notification.topic";
+            std::string resourceTypeName = "x.org.iotivity.notification.topic";
             std::string resourceInterface = OC::DEFAULT_INTERFACE;
 
             uint8_t resourceProperty = OC_OBSERVABLE;
@@ -418,7 +418,7 @@ class NSProviderSimulator
             }
 
             //resourceProperty |= OC_OBSERVABLE;
-            resourceTypeName = "oic.wk.notification.message";
+            resourceTypeName = "x.org.iotivity.notification.message";
             childUri = uri + m_messageUri;
             try
             {
@@ -434,7 +434,7 @@ class NSProviderSimulator
                 std::cout << e.what() << std::endl;
             }
 
-            resourceTypeName = "oic.wk.notification.sync";
+            resourceTypeName = "x.org.iotivity.notification.sync";
             childUri = uri + m_syncUri;
             try
             {
@@ -451,7 +451,7 @@ class NSProviderSimulator
             }
 
             resourceProperty |= OC_DISCOVERABLE;
-            resourceTypeName = "oic.wk.notification";
+            resourceTypeName = "x.org.iotivity.notification";
             try
             {
                 OC::OCPlatform::registerResource(
index 2eda9c6..df3dde1 100644 (file)
 #define RESOURCE_TAG               "NS_PROVIDER_RESOURCE"
 #define TOPIC_TAG                  "NS_PROVIDER_TOPIC"
 
-#define NS_ROOT_TYPE               "oic.wk.notification"
-#define NS_COLLECTION_MESSAGE_TYPE "oic.wk.notification.message"
-#define NS_COLLECTION_SYNC_TYPE    "oic.wk.notification.sync"
-#define NS_COLLECTION_TOPIC_TYPE   "oic.wk.notification.topic"
+#define NS_ROOT_TYPE               "x.org.iotivity.notification"
+#define NS_COLLECTION_MESSAGE_TYPE "x.org.iotivity.notification.message"
+#define NS_COLLECTION_SYNC_TYPE    "x.org.iotivity.notification.sync"
+#define NS_COLLECTION_TOPIC_TYPE   "x.org.iotivity.notification.topic"
 
 #define NS_INTERFACE_READ          "oic.if.r"
 #define NS_INTERFACE_READWRITE     "oic.if.rw"
index 9320625..2100b22 100644 (file)
@@ -33,12 +33,12 @@ extern "C" {
 #include "ocstack.h"
 
 #define NS_QOS OC_HIGH_QOS
-#define NS_RESOURCE_TYPE "oic.wk.notification"
+#define NS_RESOURCE_TYPE "x.org.iotivity.notification"
 #define NS_RESOURCE_URI "/notification"
 #define NS_INTERFACE_BASELINE "oic.if.baseline"
 #define NS_RESOURCE_QUERY "/oic/res"
 
-#define NS_DISCOVER_QUERY "/oic/res?rt=oic.wk.notification"
+#define NS_DISCOVER_QUERY "/oic/res?rt=x.org.iotivity.notification"
 #define NS_DEVICE_ID_LENGTH 37
 
 typedef enum
index 5b6a070..4d4f072 100644 (file)
@@ -29,8 +29,8 @@
 #include "oic_malloc.h"
 #include "oic_string.h"
 
-#define NS_DISCOVER_QUERY "/oic/res?rt=oic.wk.notification"
-#define NS_PRESENCE_SUBSCRIBE_QUERY_TCP "/oic/ad?rt=oic.wk.notification"
+#define NS_DISCOVER_QUERY "/oic/res?rt=x.org.iotivity.notification"
+#define NS_PRESENCE_SUBSCRIBE_QUERY_TCP "/oic/ad?rt=x.org.iotivity.notification"
 
 OCStackApplicationResult NSConsumerPresenceListener(
         void * ctx, OCDoHandle handle, OCClientResponse * clientResponse)
index 8e9e1e5..4e22d7b 100644 (file)
@@ -30,7 +30,7 @@
 #include "NSConsumerDiscovery.h"
 #include "NSConsumerNetworkEventListener.h"
 
-#define NS_PRESENCE_SUBSCRIBE_QUERY "/oic/ad?rt=oic.wk.notification"
+#define NS_PRESENCE_SUBSCRIBE_QUERY "/oic/ad?rt=x.org.iotivity.notification"
 
 void NSConnectionStateListener(const CAEndpoint_t * info, bool isConnected);
 
index 1a7a8ff..2bca595 100644 (file)
@@ -53,7 +53,7 @@ public:
 
     void findProvider()
     {
-        OC::OCPlatform::findResource("", std::string("/oic/res?rt=oic.wk.notification"),
+        OC::OCPlatform::findResource("", std::string("/oic/res?rt=x.org.iotivity.notification"),
                 OCConnectivityType::CT_DEFAULT,
                 std::bind(&NSConsumerSimulator::findResultCallback, this, std::placeholders::_1),
                 OC::QualityOfService::LowQos);
@@ -99,7 +99,7 @@ private:
     {
         if(resource->uri() == "/notification")
         {
-            resource->get(std::string("oic.wk.notification"), std::string("oic.if.baseline"),
+            resource->get(std::string("x.org.iotivity.notification"), std::string("oic.if.baseline"),
                     OC::QueryParamsMap(), std::bind(&NSConsumerSimulator::onGet, this,
                             std::placeholders::_1, std::placeholders::_2, std::placeholders::_3,
                             resource), OC::QualityOfService::LowQos);
@@ -115,7 +115,7 @@ private:
 
         try
         {
-            std::vector<std::string> rts{"oic.wk.notification"};
+            std::vector<std::string> rts{"x.org.iotivity.notification"};
 
             m_msgResource
                 = OC::OCPlatform::constructResourceObject(
@@ -165,7 +165,7 @@ private:
 
             if(rep.getValue<int>("messageid") == 3)
             {
-                m_topicResource->get(std::string("oic.wk.notification"),
+                m_topicResource->get(std::string("x.org.iotivity.notification"),
                         std::string("oic.if.baseline"), OC::QueryParamsMap(),
                         std::bind(&NSConsumerSimulator::onTopicGet, this, std::placeholders::_1,
                                 std::placeholders::_2, std::placeholders::_3, m_topicResource),
index 8874733..2798e5d 100644 (file)
@@ -398,7 +398,7 @@ public:
         OC::OCPlatform::startPresence(30);
 
         std::string notificationUri = m_notificationUri;
-        std::string resourceTypeName = "oic.wk.notification.topic";
+        std::string resourceTypeName = "x.org.iotivity.notification.topic";
         std::string resourceInterface = OC::DEFAULT_INTERFACE;
 
         uint8_t resourceProperty = OC_OBSERVABLE;
@@ -418,7 +418,7 @@ public:
         }
 
         //resourceProperty |= OC_OBSERVABLE;
-        resourceTypeName = "oic.wk.notification.message";
+        resourceTypeName = "x.org.iotivity.notification.message";
         childUri = uri + m_messageUri;
         try
         {
@@ -434,7 +434,7 @@ public:
             std::cout << e.what() << std::endl;
         }
 
-        resourceTypeName = "oic.wk.notification.sync";
+        resourceTypeName = "x.org.iotivity.notification.sync";
         childUri = uri + m_syncUri;
         try
         {
@@ -451,7 +451,7 @@ public:
         }
 
         resourceProperty |= OC_DISCOVERABLE;
-        resourceTypeName = "oic.wk.notification";
+        resourceTypeName = "x.org.iotivity.notification";
         try
         {
             OC::OCPlatform::registerResource(