Adding fix for Sonarqube major issues for IoTivity 1.2-rel
[platform/upstream/iotivity.git] / resource / examples / fridgeclient.cpp
index b5af26f..bbbc748 100644 (file)
@@ -76,8 +76,6 @@ class ClientFridge
     void foundDevice(std::shared_ptr<OCResource> resource)
     {
         using namespace OC::OCPlatform;
-        std::string platformDiscoveryURI = "/oic/p";
-        std::string deviceDiscoveryURI   = "/oic/d";
         if(resource && resource->uri() == "/device")
         {
             std::cout << "Discovered a device object"<<std::endl;
@@ -85,35 +83,6 @@ class ClientFridge
             std::cout << "\tURI:  "<<resource->uri() <<std::endl;
         }
 
-        OCStackResult ret;
-
-        std::cout << "Querying for platform information... " << std::endl;
-
-        ret = OCPlatform::getPlatformInfo("", platformDiscoveryURI, CT_ADAPTER_IP, NULL);
-
-        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(), NULL);
-
-        if (ret == OC_STACK_OK)
-        {
-            std::cout << "Getting device information is done." << std::endl;
-        }
-        else
-        {
-            std::cout << "Getting device information failed." << std::endl;
-        }
-
         // we have now found a resource, so lets create a few resource objects
         // for the other resources that we KNOW are associated with the intel.fridge
         // server, and query them.