std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP, NULL);
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), NULL);
if (ret == OC_STACK_OK)
{
std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,
- NULL);
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), NULL);
if (ret == OC_STACK_OK)
{
{
std::cout << "Getting device information failed." << std::endl;
}
-
+
if(resourceURI == "/a/garage")
{
curResource = resource;
std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,
- NULL);
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), NULL);
if (ret == OC_STACK_OK)
{
std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,
- NULL);
-
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), NULL);
if (ret == OC_STACK_OK)
{
std::cout << "Getting device information is done." << std::endl;
std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,
- &receivedDeviceInfo);
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), &receivedDeviceInfo);
if (ret == OC_STACK_OK)
{
{
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())
std::cout << "Querying for device information... " << std::endl;
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,
- &receivedDeviceInfo);
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,
+ resource->connectivityType(), &receivedDeviceInfo);
if (ret == OC_STACK_OK)
{
{
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())
{\r
std::cout << "\t\t" << resourceInterfaces << std::endl;\r
}\r
- \r
+\r
OCStackResult ret;\r
std::cout << "Querying for platform information... " << std::endl;\r
\r
\r
std::cout << "Querying for device information... " << std::endl;\r
\r
- ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI, CT_ADAPTER_IP,\r
- &receivedDeviceInfo);\r
+ ret = OCPlatform::getDeviceInfo(resource->host(), deviceDiscoveryURI,\r
+ resource->connectivityType(), &receivedDeviceInfo);\r
+\r
\r
if (ret == OC_STACK_OK)\r
{\r
{\r
std::cout << "Getting device information failed." << std::endl;\r
}\r
- \r
+\r
if (resourceURI == "/a/media")\r
{\r
curResource = resource;\r