Spec Compliance change in interface names
authorsanjaysh <sanjay1.sharma@intel.com>
Mon, 11 May 2015 23:48:07 +0000 (16:48 -0700)
committerErich Keane <erich.keane@intel.com>
Tue, 12 May 2015 23:47:30 +0000 (23:47 +0000)
Changes:oc.mi.def->oic.if.baseline, oc.mi.ll->oic.if.ll,
oc.mi.b->oic.mi.b

Change-Id: Ibf26901777628c2735d742b03878f368847597ed
Signed-off-by: sanjaysh <sanjay1.sharma@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/956
Reviewed-by: Sakthivel Samidurai <sakthivel.samidurai@intel.com>
Reviewed-by: Erich Keane <erich.keane@intel.com>
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
19 files changed:
resource/csdk/connectivity/samples/android/sample_service/jni/ResourceModel.c
resource/csdk/connectivity/samples/linux/sample_main.c
resource/csdk/connectivity/samples/tizen/casample.c
resource/csdk/connectivity/test/ca_api_unittest.cpp
resource/csdk/stack/include/internal/ocresourcehandler.h
resource/csdk/stack/include/octypes.h
resource/csdk/stack/samples/arduino/SimpleClientServer/ocserver/ocserver.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/occlientcoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserver.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverbasicops.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocservercoll.cpp
resource/csdk/stack/samples/linux/SimpleClientServer/ocserverslow.cpp
resource/csdk/stack/samples/linux/secure/ocserverbasicops.cpp
resource/csdk/stack/test/stacktests.cpp
resource/examples/lightserver.cpp
resource/examples/simpleserver.cpp
resource/examples/simpleserverHQ.cpp
resource/include/OCApi.h
resource/src/OCPlatform_impl.cpp

index 5fb2f2e..997feeb 100644 (file)
@@ -45,11 +45,14 @@ static CAToken_t g_lastRequestToken = NULL;
 static uint8_t g_lastRequestTokenLength;
 
 static const char SECURE_COAPS_PREFIX[] = "coaps://";
-static const char SECURE_INFO_DATA[] = "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                       "\"if\":[\"oc.mi.def\"],\"obs\":1,\"sec\":1,"
-                                       "\"port\":%d}}]}";
-static const char NORMAL_INFO_DATA[] = "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                       "\"if\":[\"oc.mi.def\"],\"obs\":1}}]}";
+
+static const char SECURE_INFO_DATA[]
+                                   = "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
+static const char NORMAL_INFO_DATA[]
+                                   = "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1}}]}";
+
 
 static jobject g_responseListenerObject = NULL;
 static JavaVM *g_jvm;
index 45b7595..ab6ef93 100644 (file)
@@ -88,10 +88,10 @@ static CAToken_t g_last_request_token = NULL;
 static const char SECURE_COAPS_PREFIX[] = "coaps://";
 static const char SECURE_INFO_DATA[] =
                                     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                     "\"if\":[\"oc.mi.def\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
 static const char NORMAL_INFO_DATA[] =
                                     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                     "\"if\":[\"oc.mi.def\"],\"obs\":1}}]}";
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1}}]}";
 
 #ifdef __WITH_DTLS__
 static CADtlsPskCredsBlob_t *pskCredsBlob = NULL;
index fda515e..3052feb 100644 (file)
@@ -103,10 +103,10 @@ static CAToken_t g_last_request_token = NULL;
 static const char SECURE_COAPS_PREFIX[] = "coaps://";
 static const char SECURE_INFO_DATA[] =
     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-    "\"if\":[\"oc.mi.def\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
+    "\"if\":[\"oic.if.baseline\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
 static const char NORMAL_INFO_DATA[] =
     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-    "\"if\":[\"oc.mi.def\"],\"obs\":1}}]}";
+    "\"if\":[\"oic.if.baseline\"],\"obs\":1}}]}";
 
 #ifdef __WITH_DTLS__
 static CADtlsPskCredsBlob_t *pskCredsBlob = NULL;
index b3acf37..e684abd 100755 (executable)
@@ -65,10 +65,10 @@ static const char RESOURCE_URI[] = "/a/light";
 
 static const char SECURE_INFO_DATA[] =
                                     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                     "\"if\":[\"oc.mi.def\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1,\"sec\":1,\"port\":%d}}]}";
 static const char NORMAL_INFO_DATA[] =
                                     "{\"oc\":[{\"href\":\"%s\",\"prop\":{\"rt\":[\"core.led\"],"
-                                     "\"if\":[\"oc.mi.def\"],\"obs\":1}}]}";
+                                     "\"if\":[\"oic.if.baseline\"],\"obs\":1}}]}";
 
 #ifdef __WITH_DTLS__
 
index a2fec0c..a42b4eb 100644 (file)
 #include "ocserverrequest.h"
 
 /**
- * Attributes used to form a proper OIC conforming JSON message.
- */
-#define OC_RSRVD_OC                     "oc"
-#define OC_RSRVD_PAYLOAD                "payload"
-#define OC_RSRVD_HREF                   "href"
-#define OC_RSRVD_PROPERTY               "prop"
-#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_INTERFACE              "if"
-#define OC_RSRVD_DEVICE_ID              "di"
-#define OC_RSRVD_DEVICE_NAME            "dn"
-#define OC_RSRVD_INTERFACE_DEFAULT      "oc.mi.def"
-#define OC_RSRVD_INTERFACE_LL           "oc.mi.ll"
-#define OC_RSRVD_INTERFACE_BATCH        "oc.mi.b"
-#define OC_RSRVD_INTERFACE_GROUP        "oc.mi.grp"
-#define OC_RSRVD_MFG_DATE               "mndt"
-#define OC_RSRVD_FW_VERSION             "mnfv"
-#define OC_RSRVD_HOST_NAME              "hn"
-#define OC_RSRVD_MFG_NAME               "mnmn"
-#define OC_RSRVD_MFG_URL                "mnml"
-#define OC_RSRVD_MODEL_NUM              "mnmo"
-#define OC_RSRVD_PLATFORM_VERSION       "mnpv"
-#define OC_RSRVD_SUPPORT_URL            "mnsl"
-#define OC_RSRVD_VERSION                "icv"
-#define OC_RSRVD_OBSERVABLE             "obs"
-#define OC_RSRVD_SECURE                 "sec"
-#define OC_RSRVD_HOSTING_PORT           "port"
-#define OC_RSRVD_SERVER_INSTANCE_ID     "sid"
-
-/**
  * Common JSON string components used by the stack to build JSON strings.
  * These details are exposed in ocstackconfig.h file in the form of documentation.
  * Remember to update the documentation there if these are changed.
index fceaafb..53357a4 100644 (file)
@@ -52,6 +52,38 @@ extern "C" {
 /// 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"
+
+/**
+ * Attributes used to form a proper OIC conforming JSON message.
+ */
+#define OC_RSRVD_OC                     "oic"
+#define OC_RSRVD_PAYLOAD                "payload"
+#define OC_RSRVD_HREF                   "href"
+#define OC_RSRVD_PROPERTY               "prop"
+#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_INTERFACE              "if"
+#define OC_RSRVD_DEVICE_ID              "di"
+#define OC_RSRVD_DEVICE_NAME            "dn"
+#define OC_RSRVD_INTERFACE_DEFAULT      "oic.if.baseline"
+#define OC_RSRVD_INTERFACE_LL           "oic.if.ll"
+#define OC_RSRVD_INTERFACE_BATCH        "oic.if.b"
+#define OC_RSRVD_INTERFACE_GROUP        "oc.mi.grp"
+#define OC_RSRVD_MFG_DATE               "mndt"
+#define OC_RSRVD_FW_VERSION             "mnfv"
+#define OC_RSRVD_HOST_NAME              "hn"
+#define OC_RSRVD_MFG_NAME               "mnmn"
+#define OC_RSRVD_MFG_URL                "mnml"
+#define OC_RSRVD_MODEL_NUM              "mnmo"
+#define OC_RSRVD_PLATFORM_VERSION       "mnpv"
+#define OC_RSRVD_SUPPORT_URL            "mnsl"
+#define OC_RSRVD_VERSION                "icv"
+#define OC_RSRVD_OBSERVABLE             "obs"
+#define OC_RSRVD_SECURE                 "sec"
+#define OC_RSRVD_HOSTING_PORT           "port"
+#define OC_RSRVD_SERVER_INSTANCE_ID     "sid"
 #endif
 
 //-----------------------------------------------------------------------------
index f6c62d6..fb1c61f 100644 (file)
@@ -298,7 +298,7 @@ void createLightResource()
     Light.state = false;
     OCStackResult res = OCCreateResource(&Light.handle,
             "core.light",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             "/a/light",
             OCEntityHandlerCb,
             OC_DISCOVERABLE|OC_OBSERVABLE);
index dcdac06..dddf827 100644 (file)
@@ -63,15 +63,15 @@ typedef struct
 
 testToTextMap queryInterface[] = {
         {"invalid", TEST_INVALID},
-        {"?if=oc.mi.def", TEST_GET_DEFAULT},
-        {"?if=oc.mi.b", TEST_GET_BATCH},
-        {"?if=oc.mi.ll", TEST_GET_LINK_LIST},
-        {"?if=oc.mi.def", TEST_UNKNOWN_RESOURCE_GET_DEFAULT},
-        {"?if=oc.mi.b", TEST_UNKNOWN_RESOURCE_GET_BATCH},
-        {"?if=oc.mi.ll", TEST_UNKNOWN_RESOURCE_GET_LINK_LIST},
-        {"?if=oc.mi.def", TEST_PUT_DEFAULT},
-        {"?if=oc.mi.b", TEST_PUT_BATCH},
-        {"?if=oc.mi.ll", TEST_PUT_LINK_LIST},
+        {"?if=oic.if.baseline", TEST_GET_DEFAULT},
+        {"?if=oic.if.b", TEST_GET_BATCH},
+        {"?if=oic.if.ll", TEST_GET_LINK_LIST},
+        {"?if=oic.if.baseline", TEST_UNKNOWN_RESOURCE_GET_DEFAULT},
+        {"?if=oic.if.b", TEST_UNKNOWN_RESOURCE_GET_BATCH},
+        {"?if=oic.if.ll", TEST_UNKNOWN_RESOURCE_GET_LINK_LIST},
+        {"?if=oic.if.baseline", TEST_PUT_DEFAULT},
+        {"?if=oic.if.b", TEST_PUT_BATCH},
+        {"?if=oic.if.ll", TEST_PUT_LINK_LIST},
 };
 
 static std::string putPayload = "{\"state\":\"off\",\"power\":\"0\"}";
index f4eb589..a3d1f29 100644 (file)
@@ -83,7 +83,7 @@ const char *version = "myVersion";
 // Entity handler should check for resourceTypeName and ResourceInterface in order to GET
 // the existence of a known resource
 const char *resourceTypeName = "core.light";
-const char *resourceInterface = "oc.mi.def";
+const char *resourceInterface = OC_RSRVD_INTERFACE_DEFAULT;
 
 OCDeviceInfo deviceInfo;
 
index d5167ca..83bd46b 100644 (file)
@@ -39,7 +39,7 @@ static LEDResource LED;
 // This variable determines instance number of the LED resource.
 // Used by POST method to create a new instance of LED resource.
 static int gCurrLedInstance = 0;
-#define SAMPLE_MAX_NUM_POST_INSTANCE  2
+#define SAMPLE_MAX_NUM_POST_INSTANCE 2
 static LEDResource gLedInstance[SAMPLE_MAX_NUM_POST_INSTANCE];
 
 char *gResourceUri= (char *)"/a/led";
@@ -388,7 +388,7 @@ int createLEDResource (char *uri, LEDResource *ledResource, bool resourceState,
     ledResource->power= resourcePower;
     OCStackResult res = OCCreateResource(&(ledResource->handle),
             "core.led",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             uri,
             OCEntityHandlerCb,
             OC_DISCOVERABLE|OC_OBSERVABLE);
index 5f65d4d..344723f 100644 (file)
@@ -159,7 +159,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
 
         if(OC_REST_GET == ehRequest->method)
         {
-            if(query.find("oc.mi.def") != std::string::npos)
+            if(query.find(OC_RSRVD_INTERFACE_DEFAULT) != std::string::npos)
             {
                 ret = HandleCallback(ehRequest,
                         rspGetRoomDefault, rspFailureRoom, payload, sizeof(payload));
@@ -176,7 +176,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
                             rspGetFanCollection, rspFailureFan, payload, sizeof(payload));
                 }
             }
-            else if(query.find("oc.mi.ll") != std::string::npos)
+            else if(query.find(OC_RSRVD_INTERFACE_LL) != std::string::npos)
             {
                 ret = HandleCallback(ehRequest,
                         rspGetRoomCollection, rspFailureRoom, payload, sizeof(payload));
@@ -193,7 +193,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
                             rspGetFanCollection, rspFailureFan, payload, sizeof(payload));
                 }
             }
-            else if(query.find("oc.mi.b") != std::string::npos)
+            else if(query.find(OC_RSRVD_INTERFACE_BATCH) != std::string::npos)
             {
                 ret = HandleCallback(ehRequest,
                         rspGetRoomCollection, rspFailureRoom, payload, sizeof(payload));
@@ -234,7 +234,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
         }
         else if(OC_REST_PUT == ehRequest->method)
         {
-            if(query.find("oc.mi.def") != std::string::npos)
+            if(query.find(OC_RSRVD_INTERFACE_DEFAULT) != std::string::npos)
             {
                 if(ret != OC_EH_ERROR)
                 {
@@ -242,7 +242,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
                             rspPutRoomDefault, rspFailureRoom, payload, sizeof(payload));
                 }
             }
-            if(query.find("oc.mi.ll") != std::string::npos)
+            if(query.find(OC_RSRVD_INTERFACE_LL) != std::string::npos)
             {
                 if(ret != OC_EH_ERROR)
                 {
@@ -262,7 +262,7 @@ OCEntityHandlerResult OCEntityHandlerRoomCb(OCEntityHandlerFlag flag,
                             rspPutFanCollection, rspFailureFan, payload, sizeof(payload));
                 }
             }
-            if(query.find("oc.mi.b") != std::string::npos)
+            if(query.find(OC_RSRVD_INTERFACE_BATCH ) != std::string::npos)
             {
                 if(ret != OC_EH_ERROR)
                 {
@@ -547,7 +547,7 @@ void createResources()
     OCResourceHandle fan;
     OCStackResult res = OCCreateResource(&fan,
             "core.fan",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             "/a/fan",
             OCEntityHandlerFanCb,
             OC_DISCOVERABLE|OC_OBSERVABLE);
@@ -556,7 +556,7 @@ void createResources()
     OCResourceHandle light;
     res = OCCreateResource(&light,
             "core.light",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             "/a/light",
             OCEntityHandlerLightCb,
             OC_DISCOVERABLE|OC_OBSERVABLE);
@@ -568,7 +568,7 @@ void createResources()
     {
         res = OCCreateResource(&room,
                 "core.room",
-                "oc.mi.b",
+                OC_RSRVD_INTERFACE_BATCH,
                 "/a/room",
                 OCEntityHandlerRoomCb,
                 OC_DISCOVERABLE);
@@ -577,15 +577,15 @@ void createResources()
     {
         res = OCCreateResource(&room,
                 "core.room",
-                "oc.mi.b",
+                OC_RSRVD_INTERFACE_BATCH,
                 "/a/room",
                 NULL,
                 OC_DISCOVERABLE);
     }
 
     OC_LOG_V(INFO, TAG, "Created room resource with result: %s", getResult(res));
-    OCBindResourceInterfaceToResource(room, "oc.mi.ll");
-    OCBindResourceInterfaceToResource(room, "oc.mi.def");
+    OCBindResourceInterfaceToResource(room, OC_RSRVD_INTERFACE_LL);
+    OCBindResourceInterfaceToResource(room, OC_RSRVD_INTERFACE_DEFAULT);
 
     res = OCBindResource(room, light);
     OC_LOG_V(INFO, TAG, "OC Bind Contained Resource to resource: %s", getResult(res));
index 542abdc..b698613 100644 (file)
@@ -369,7 +369,7 @@ int createLEDResource (char *uri, LEDResource *ledResource, bool resourceState,
     ledResource->power= resourcePower;
     OCStackResult res = OCCreateResource(&(ledResource->handle),
             "core.led",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             uri,
             OCEntityHandlerCb,
             OC_DISCOVERABLE|OC_OBSERVABLE);
index d63207b..869b973 100644 (file)
@@ -379,7 +379,7 @@ int createLEDResource (char *uri, LEDResource *ledResource, bool resourceState,
     ledResource->power= resourcePower;
     OCStackResult res = OCCreateResource(&(ledResource->handle),
             "core.led",
-            "oc.mi.def",
+            OC_RSRVD_INTERFACE_DEFAULT,
             uri,
             OCEntityHandlerCb,
             OC_DISCOVERABLE|OC_OBSERVABLE | OC_SECURE);
index e3914ff..9708660 100644 (file)
@@ -699,8 +699,8 @@ TEST(StackResource, StackTestResourceDiscoverManyResources)
     url = OCGetResourceUri(handle3);
     EXPECT_STREQ("/a/led3", url);
 
-    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle3, "oc.mi.ll"));
-    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle3, "oc.mi.b"));
+    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle3, OC_RSRVD_INTERFACE_LL));
+    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle3, OC_RSRVD_INTERFACE_BATCH));
 
     OCResourceHandle handle4;
     EXPECT_EQ(OC_STACK_OK, OCCreateResource(&handle4,
@@ -713,8 +713,8 @@ TEST(StackResource, StackTestResourceDiscoverManyResources)
     EXPECT_STREQ("/a/led4", url);
 
     EXPECT_EQ(OC_STACK_OK, OCBindResourceTypeToResource(handle4, "core.brightled"));
-    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle4, "oc.mi.ll"));
-    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle4, "oc.mi.b"));
+    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle4, OC_RSRVD_INTERFACE_LL));
+    EXPECT_EQ(OC_STACK_OK, OCBindResourceInterfaceToResource(handle4, OC_RSRVD_INTERFACE_BATCH));
 
     //EXPECT_EQ(OC_STACK_OK, OCHandleServerRequest(&res, uri, query, req, rsp));
 
index 4d08548..7f3d5ee 100644 (file)
@@ -311,7 +311,7 @@ int main(int argc, char* argv[])
         myLight.createResource();
 
         myLight.addType(std::string("core.brightlight"));
-        myLight.addInterface(std::string("oc.mi.ll"));
+        myLight.addInterface(std::string(LINK_INTERFACE));
 
         // A condition variable will free the mutex it is given, then do a non-
         // intensive block until 'notify' is called on it.  In this case, since we
index 078d774..004414d 100644 (file)
@@ -547,9 +547,10 @@ int main(int argc, char* argv[])
         std::cout << "Created resource." << std::endl;
 
         myLight.addType(std::string("core.brightlight"));
-        myLight.addInterface(std::string("oc.mi.ll"));
+        myLight.addInterface(std::string(LINK_INTERFACE));
         std::cout << "Added Interface and Type" << std::endl;
 
+
         // A condition variable will free the mutex it is given, then do a non-
         // intensive block until 'notify' is called on it.  In this case, since we
         // don't ever call cv.notify, this should be a non-processor intensive version
index 3239291..7ae61b2 100644 (file)
@@ -460,7 +460,7 @@ int main(int argc, char* argv[])
         myLight.createResource();
 
         myLight.addType(std::string("core.brightlight"));
-        myLight.addInterface(std::string("oc.mi.ll"));
+        myLight.addInterface(std::string(LINK_INTERFACE));
 
         // A condition variable will free the mutex it is given, then do a non-
         // intensive block until 'notify' is called on it.  In this case, since we
index 194e99b..9664e51 100644 (file)
@@ -186,13 +186,13 @@ namespace OC
     // const strings for different interfaces
 
     // Default interface
-    const std::string DEFAULT_INTERFACE = "oc.mi.def";
+    const std::string DEFAULT_INTERFACE = "oic.if.baseline";
 
     // Used in discovering (GET) links to other resources of a collection.
-    const std::string LINK_INTERFACE = "oc.mi.ll";
+    const std::string LINK_INTERFACE = "oic.if.ll";
 
     // Used in GET, PUT, POST, DELETE methods on links to other resources of a collection.
-    const std::string BATCH_INTERFACE = "oc.mi.b";
+    const std::string BATCH_INTERFACE = "oic.if.b";
 
     // Used in GET, PUT, POST methods on links to other remote resources of a group.
     const std::string GROUP_INTERFACE = "oc.mi.grp";
index 8776790..ccac71d 100644 (file)
@@ -222,7 +222,7 @@ namespace OC
 
         return checked_guard(m_server, &IServerWrapper::registerResourceWithHost,
                 std::ref(resourceHandle), resource->host(), resource->uri(),
-                resourceTypes[0]/*"core.remote"*/, "oc.mi.def",
+                resourceTypes[0]/*"core.remote"*/, DEFAULT_INTERFACE,
                 (EntityHandler) nullptr, resourceProperty);
     }