Remove vendor specific rt
authorJee Hyeok Kim <jihyeok13.kim@samsung.com>
Tue, 2 May 2017 04:22:23 +0000 (13:22 +0900)
committerJee Hyeok Kim <jihyeok13.kim@samsung.com>
Wed, 10 May 2017 03:21:36 +0000 (03:21 +0000)
Change-Id: Ie2ae985a8e977822e7ed2d616c86dfde4907f3a4
Signed-off-by: Jee Hyeok Kim <jihyeok13.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19517
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: jung seungho <shonest.jung@samsung.com>
cloud/dashboard/src/components/MainMenu.js
cloud/samples/client/airconditioner/aircon_controlee.cpp
cloud/samples/client/airconditioner/aircon_controller.cpp

index fdfeb7c..26a9ed3 100644 (file)
@@ -99,7 +99,7 @@ class MainMenu extends React.Component {
     };
 
     handleFirmware = () => {
-        Client.discoverResource("rt=x.samsung.firmware", this.onFirmwareResources);
+        Client.discoverResource("rt=x.org.iotivity.firmware", this.onFirmwareResources);
     };
 
     constructor(props, context) {
index 04d3046..723d3c9 100644 (file)
@@ -433,7 +433,7 @@ class AirConditionerResource : public Resource // oic.d.airconditioner
         }
 };
 
-class FirmwareResource : public Resource // x.samsung.firmware
+class FirmwareResource : public Resource // x.org.iotivity.firmware
 {
     private:
         string  m_currentversion;
@@ -880,13 +880,13 @@ int main(int argc, char *argv[])
 
     cout << "Registering resources to platform..." << endl;
 
-    AirConditionerResource  airConditioner("/sec/aircon/0", { "x.com.samsung.da.device" }, { DEFAULT_INTERFACE, BATCH_INTERFACE, LINK_INTERFACE });
+    AirConditionerResource  airConditioner("/aircon/0", { "x.org.iotivity.ac" }, { DEFAULT_INTERFACE, BATCH_INTERFACE, LINK_INTERFACE });
 
     BinarySwitchResource    binarySwitch("/power/0", { "oic.r.switch.binary" }, { DEFAULT_INTERFACE });
 
     TemperatureResource     temperature("/temperature/0", { "oic.r.temperature" }, { DEFAULT_INTERFACE });
 
-    FirmwareResource     firmware("/firmware", { "x.samsung.firmware" }, { DEFAULT_INTERFACE });
+    FirmwareResource     firmware("/firmware", { "x.org.iotivity.firmware" }, { DEFAULT_INTERFACE });
 
     string uri = airConditioner.getResourceUri();
     string rt = airConditioner.getResourceType()[0];
index 2235b44..e8f5cc1 100644 (file)
@@ -188,7 +188,7 @@ void updateFirmware()
     firmwareUpdate.setValue<bool>("update", true);
 
     QueryParamsMap      query;
-    g_binaryswitchResource->post("x.samsung.firmware", DEFAULT_INTERFACE, firmwareUpdate, query,
+    g_binaryswitchResource->post("x.org.iotivity.firmware", DEFAULT_INTERFACE, firmwareUpdate, query,
                                  &onPost);
 }
 
@@ -219,13 +219,13 @@ void getCollectionResource(const HeaderOptions &,
             g_binaryswitchResource->observe(ObserveType::Observe, query, &onObserve);
         }
 
-        if (it->getResourceTypes().at(0).compare("x.samsung.firmware") == 0)
+        if (it->getResourceTypes().at(0).compare("x.org.iotivity.firmware") == 0)
         {
             cout << "Observing " << it->getUri() << endl;
             g_firmwareResource = OCPlatform::constructResourceObject(g_host,
                                  it->getUri(),
                                  static_cast<OCConnectivityType>(CT_ADAPTER_TCP | CT_IP_USE_V4), true,
-            { string("x.samsung.firmware") }, { string(DEFAULT_INTERFACE) });
+            { string("x.org.iotivity.firmware") }, { string(DEFAULT_INTERFACE) });
 
             QueryParamsMap      query;
             g_firmwareResource->observe(ObserveType::Observe, query, &onObserve);
@@ -245,9 +245,9 @@ void foundAirconditionerResource(shared_ptr<OC::OCResource> resource)
     {
         cout << "RT: " << *it << endl;
 
-        if (it->compare("x.com.samsung.da.device") == 0)
+        if (it->compare("x.org.iotivity.ac") == 0)
         {
-            cout << "Found Samsung Airconditioner" << endl;
+            cout << "Found Airconditioner" << endl;
 
             QueryParamsMap      query;
             query["if"] = string(LINK_INTERFACE);