Delete client callback for error response.
[platform/upstream/iotivity.git] / resource / examples / simpleclientHQ.cpp
index d75a84a..6d631d3 100644 (file)
@@ -302,64 +302,11 @@ void getLightRepresentation(std::shared_ptr<OCResource> resource)
     }
 }
 
-void receivedPlatformInfo(const OCRepresentation& rep)
-{
-    std::cout << "\nPlatform Information received ---->\n";
-    std::string value;
-    std::string values[] =
-    {
-        "pi",   "Platform ID                    ",
-        "mnmn", "Manufacturer name              ",
-        "mnml", "Manufacturer url               ",
-        "mnmo", "Manufacturer Model No          ",
-        "mndt", "Manufactured Date              ",
-        "mnpv", "Manufacturer Platform Version  ",
-        "mnos", "Manufacturer OS version        ",
-        "mnhw", "Manufacturer hardware version  ",
-        "mnfv", "Manufacturer firmware version  ",
-        "mnsl", "Manufacturer support url       ",
-        "st",   "Manufacturer system time       "
-    };
-
-    for (unsigned int i = 0; i < sizeof(values) / sizeof(values[0]); i += 2)
-    {
-        if(rep.getValue(values[i], value))
-        {
-            std::cout << values[i + 1] << " : "<< value << std::endl;
-        }
-    }
-}
-
-void receivedDeviceInfo(const OCRepresentation& rep)
-{
-    std::cout << "\nDevice Information received ---->\n";
-    std::string value;
-    std::string values[] =
-    { 
-        "di",  "Device ID        ",
-        "n",   "Device name      ",
-        "lcv", "Spec version url ",
-        "dmv", "Data Model Model ", 
-    };
-
-    for (unsigned int i = 0; i < sizeof(values) / sizeof(values[0]); i += 2)
-    {
-        if (rep.getValue(values[i], value))
-        {
-            std::cout << values[i + 1] << " : " << value << std::endl;
-        }
-    }
-}
-
 // Callback to found resources
 void foundResource(std::shared_ptr<OCResource> resource)
 {
     std::string resourceURI;
     std::string hostAddress;
-
-    std::string platformDiscoveryURI = "/oic/p";
-    std::string deviceDiscoveryURI   = "/oic/d";
-
     try
     {
         // Do some operations with resource object.
@@ -393,37 +340,6 @@ void foundResource(std::shared_ptr<OCResource> resource)
             hostAddress = resource->host();
             std::cout << "\tHost address of the resource: " << hostAddress << std::endl;
 
-            OCStackResult ret;
-
-            std::cout << "Querying for platform information... " << std::endl;
-
-            ret = OCPlatform::getPlatformInfo(resource->host(), platformDiscoveryURI,
-                                              resource->connectivityType(),
-                                              &receivedPlatformInfo);
-
-            if (ret == OC_STACK_OK)
-            {
-                std::cout << "Get platform information is done." << std::endl;
-            }
-            else
-            {
-                std::cout << "Get platform information failed." << std::endl;
-            }
-
-            std::cout << "Querying for device information... " << std::endl;
-
-            ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
-                                       resource->connectivityType(), &receivedDeviceInfo);
-
-            if (ret == OC_STACK_OK)
-            {
-                std::cout << "Getting device information is done." << std::endl;
-            }
-            else
-            {
-                std::cout << "Getting device information failed." << std::endl;
-            }
-
             // Get the resource types
             std::cout << "\tList of resource types: " << std::endl;
             for(auto &resourceTypes : resource->getResourceTypes())