{
m_resourceMap.clear();
- OC::OCPlatform::findResource("", OC_WELL_KNOWN_QUERY, CT_DEFAULT, m_findCB);
+ OC::OCPlatform::findResource("", OC_RSRVD_WELL_KNOWN_URI, CT_DEFAULT, m_findCB);
}
void MiddleClient::foundOCResource(shared_ptr<OCResource> resource)
void IoTClient::findResource()
{
- string coap_multicast_discovery = string(OC_MULTICAST_DISCOVERY_URI "?if=" EDISON_RESOURCE_INTERFACE);
+ string coap_multicast_discovery = string(OC_RSRVD_WELL_KNOWN_URI "?if=" EDISON_RESOURCE_INTERFACE);
OCPlatform::findResource("", coap_multicast_discovery.c_str(), CT_DEFAULT, m_resourceDiscoveryCallback,
OC::QualityOfService::LowQos);
}
extern const char * SVR_DB_FILE_NAME;
extern const char * OIC_MI_DEF;
-extern const char * OIC_RSRC_CORE_URI;
-extern const char * OIC_RSRC_CORE_D_URI;
-extern const char * OIC_RSRC_CORE_P_URI;
-extern const char * OIC_RSRC_PRESENCE_URI;
-extern const char * OIC_RSRC_TYPES_D_URI;
-
//ACL
extern const char * OIC_RSRC_TYPE_SEC_ACL;
extern const char * OIC_RSRC_ACL_URI;
*/
const char *rsrcs[] = {
- OIC_RSRC_CORE_URI,
- OIC_RSRC_CORE_D_URI,
- OIC_RSRC_CORE_P_URI,
- OIC_RSRC_TYPES_D_URI,
- OIC_RSRC_PRESENCE_URI,
+ OC_RSRVD_WELL_KNOWN_URI,
+ OC_RSRVD_DEVICE_URI,
+ OC_RSRVD_PLATFORM_URI,
+ OC_RSRVD_RESOURCE_TYPES_URI,
+#ifdef WITH_PRESENCE
+ OC_RSRVD_PRESENCE_URI,
+#endif //WITH_PRESENCE
OIC_RSRC_ACL_URI,
OIC_RSRC_DOXM_URI,
OIC_RSRC_PSTAT_URI,
const char * SVR_DB_FILE_NAME = "oic_svr_db.json";
const char * OIC_MI_DEF = "oic.mi.def";
-const char * OIC_RSRC_CORE_URI = "/oic/res";
-const char * OIC_RSRC_CORE_D_URI = "/oic/res/d";
-const char * OIC_RSRC_CORE_P_URI = "/oic/p";
-const char * OIC_RSRC_PRESENCE_URI = "/oic/ad";
-const char * OIC_RSRC_TYPES_D_URI = "/oic/res/types/d";
-
//ACL
const char * OIC_RSRC_TYPE_SEC_ACL = "oic.sec.acl";
const char * OIC_RSRC_ACL_URI = "/oic/sec/acl";
#define OC_RESOURCE_SECURE 1
/**
+ * OIC Virtual resources supported by every OIC device.
+ */
+typedef enum
+{
+ OC_UNKNOWN_URI =0,
+ OC_WELL_KNOWN_URI, ///< "/oic/res"
+ OC_DEVICE_URI, ///< "/oic/d"
+ OC_PLATFORM_URI, ///< "/oic/p"
+ OC_RESOURCE_TYPES_URI, ///< "/oic/res/types/d"
+#ifdef WITH_PRESENCE
+ OC_PRESENCE, ///< "/oic/ad"
+#endif
+} OCVirtualResources;
+
+/**
* The type of query a request/response message is.
*/
typedef enum
OCEntityHandlerRequest * request, void* callbackParam);
/**
- * Get string value associated with a virtual resource type.
- */
-const char * GetVirtualResourceUri(OCVirtualResources resource);
-
-/**
* Find and retrieve pointer to a resource associated with a specific resource
* URI.
*/
//-----------------------------------------------------------------------------
// Defines
//-----------------------------------------------------------------------------
-#define OC_WELL_KNOWN_QUERY "/oic/res"
-#define OC_MULTICAST_DISCOVERY_URI "/oic/res"
+/**
+ * OIC Virtual resources supported by every OIC device.
+ */
+#define OC_RSRVD_WELL_KNOWN_URI "/oic/res"
+#define OC_RSRVD_DEVICE_URI "/oic/d"
+#define OC_RSRVD_PLATFORM_URI "/oic/p"
+#define OC_RSRVD_RESOURCE_TYPES_URI "/oic/res/types/d"
#ifdef WITH_PRESENCE
+#define OC_RSRVD_PRESENCE_URI "/oic/ad"
#define OC_DEFAULT_PRESENCE_TTL_SECONDS (60)
/// OC_MAX_PRESENCE_TTL_SECONDS sets the maximum time to live (TTL) for presence.
/// NOTE: Changing the setting to a longer duration may lead to unsupported and untested
/// operation.
#define OC_MAX_PRESENCE_TTL_SECONDS (60 * 60 * 24) // 60 sec/min * 60 min/hr * 24 hr/day
-#define OC_PRESENCE_URI "/oic/ad"
#endif
///Separtor for multiple query string
} OCConnectivityType;
/**
- * OC Virtual resources supported by every OC device.
- */
-typedef enum
-{
- OC_WELL_KNOWN_URI= 0, ///< "/oic/res"
- OC_DEVICE_URI, ///< "/oic/d"
- OC_PLATFORM_URI, ///< "/oic/p"
- OC_RESOURCE_TYPES_URI, ///< "/oic/res/d/type"
- #ifdef WITH_PRESENCE
- OC_PRESENCE, ///< "/oic/ad"
- #endif
- OC_MAX_VIRTUAL_RESOURCES ///<s Max items in the list
-} OCVirtualResources;
-
-/**
* OCDoResource methods
*/
typedef enum
clientResponse->devAddr.port);
OC_LOG_PAYLOAD(INFO, TAG, clientResponse->payload);
+ OC_CONNTYPE = clientResponse->connType;
parseClientResponse(clientResponse);
switch(TEST_CASE)
OC_LOG_V(INFO, TAG, "\n\nExecuting %s", __func__);
std::ostringstream query;
std::ostringstream querySuffix;
- query << "coap://" << coapServerIP << ":" << coapServerPort << OC_PRESENCE_URI;
+ query << "coap://" << coapServerIP << ":" << coapServerPort << OC_RSRVD_PRESENCE_URI;
if(TEST_CASE == TEST_OBS_PRESENCE)
{
result = InvokeOCDoResource(query, OC_REST_PRESENCE, OC_LOW_QOS,
{
std::ostringstream multicastPresenceQuery;
multicastPresenceQuery.str("");
- multicastPresenceQuery << "coap://" << OC_MULTICAST_PREFIX << OC_PRESENCE_URI;
+ multicastPresenceQuery << "coap://" << OC_MULTICAST_PREFIX << OC_RSRVD_PRESENCE_URI;
result = InvokeOCDoResource(multicastPresenceQuery, OC_REST_PRESENCE, OC_LOW_QOS,
presenceCB, NULL, 0);
}
static OCPlatformInfo savedPlatformInfo = {};
static OCDeviceInfo savedDeviceInfo = {};
-static const char * VIRTUAL_RSRCS[] =
-{
- "/oic/res",
- "/oic/d",
- "/oic/p",
- "/oic/res/types/d",
- #ifdef WITH_PRESENCE
- "/oic/ad"
- #endif
-};
-
//-----------------------------------------------------------------------------
// Default resource entity handler function
//-----------------------------------------------------------------------------
return OC_STACK_OK;
}
-static OCVirtualResources GetTypeOfVirtualURI(char *uriInRequest)
+static OCVirtualResources GetTypeOfVirtualURI(const char *uriInRequest)
{
- if (strcmp (uriInRequest, GetVirtualResourceUri(OC_WELL_KNOWN_URI)) == 0)
+ if (strcmp(uriInRequest, OC_RSRVD_WELL_KNOWN_URI) == 0)
{
return OC_WELL_KNOWN_URI;
}
- else if (strcmp (uriInRequest, GetVirtualResourceUri(OC_DEVICE_URI)) == 0)
+ else if (strcmp(uriInRequest, OC_RSRVD_DEVICE_URI) == 0)
{
return OC_DEVICE_URI;
}
- else if (strcmp (uriInRequest, GetVirtualResourceUri(OC_PLATFORM_URI)) == 0)
+ else if (strcmp(uriInRequest, OC_RSRVD_PLATFORM_URI) == 0)
{
return OC_PLATFORM_URI;
}
-
- #ifdef WITH_PRESENCE
- else
+ else if (strcmp(uriInRequest, OC_RSRVD_RESOURCE_TYPES_URI) == 0)
+ {
+ return OC_RESOURCE_TYPES_URI;
+ }
+#ifdef WITH_PRESENCE
+ else if (strcmp(uriInRequest, OC_RSRVD_PRESENCE_URI) == 0)
{
return OC_PRESENCE;
}
- #endif
+#endif //WITH_PRESENCE
+ return OC_UNKNOWN_URI;
}
static OCStackResult getQueryParamsForFiltering (OCVirtualResources uri, char *query,
OCDiscoveryPayloadAddResource(payload, resourcePtr, port);
return OC_STACK_OK;
}
-const char * GetVirtualResourceUri( OCVirtualResources resource)
-{
- if (resource < OC_MAX_VIRTUAL_RESOURCES)
- {
- return VIRTUAL_RSRCS[resource];
- }
- return NULL;
-}
-
-bool IsVirtualResource(const char* resourceUri)
-{
- if(!resourceUri)
- {
- return false;
- }
-
- for (int i = 0; i < OC_MAX_VIRTUAL_RESOURCES; i++)
- {
- if (strcmp(resourceUri, GetVirtualResourceUri((OCVirtualResources)i)) == 0)
- {
- return true;
- }
- }
- return false;
-}
uint8_t IsCollectionResource (OCResource *resource)
{
const OCDevAddr *devAddr = &request->devAddr;
// Check if virtual resource
- if (IsVirtualResource((const char*)request->resourceUrl))
+ if (GetTypeOfVirtualURI(request->resourceUrl) != OC_UNKNOWN_URI)
{
*handling = OC_RESOURCE_VIRTUAL;
*resource = headResource;
}
else if (virtualUriInRequest == OC_DEVICE_URI)
{
- payload = (OCPayload*)OCDevicePayloadCreate(GetVirtualResourceUri(OC_DEVICE_URI),
+ payload = (OCPayload*)OCDevicePayloadCreate(OC_RSRVD_DEVICE_URI,
OCGetServerInstanceID(), savedDeviceInfo.deviceName,
OC_SPEC_VERSION, OC_DATA_MODEL_VERSION);
if (!payload)
else if (virtualUriInRequest == OC_PLATFORM_URI)
{
OCPlatformPayload* payload = OCPlatformPayloadCreate(
- GetVirtualResourceUri(OC_PLATFORM_URI),
+ OC_RSRVD_PLATFORM_URI,
&savedPlatformInfo);
if (!payload)
{
}
return snprintf(presenceUri, CA_MAX_URI_LENGTH, format, endpoint->addr,
- endpoint->port, OC_PRESENCE_URI);
+ endpoint->port, OC_RSRVD_PRESENCE_URI);
}
return OC_STACK_ERROR;
}
- uriLen = FormCanonicalPresenceUri(endpoint, OC_PRESENCE_URI, presenceUri);
+ uriLen = FormCanonicalPresenceUri(endpoint, OC_RSRVD_PRESENCE_URI, presenceUri);
if (uriLen < 0 || uriLen >= sizeof (presenceUri))
{
return OC_STACK_INVALID_URI;
else
{
snprintf (presenceUri, MAX_URI_LENGTH, "coap://[%s]:%u%s", OC_MULTICAST_IP,
- OC_MULTICAST_PORT, OC_PRESENCE_URI);
+ OC_MULTICAST_PORT, OC_RSRVD_PRESENCE_URI);
cbNode = GetClientCB(NULL, 0, NULL, presenceUri);
if (cbNode)
{
VERIFY_NON_NULL_NR(responseInfo->info.resourceUri, FATAL);
OC_LOG(INFO, TAG, PCF("Enter HandleCAResponses"));
- if(strcmp(responseInfo->info.resourceUri, OC_PRESENCE_URI) == 0)
+ if(strcmp(responseInfo->info.resourceUri, OC_RSRVD_PRESENCE_URI) == 0)
{
HandlePresenceResponse(endPoint, responseInfo);
return;
requestData.type = CA_MSG_NONCONFIRM;
requestData.token = cbNode->token;
requestData.tokenLength = cbNode->tokenLength;
- requestData.resourceUri = OC_PRESENCE_URI;
+ requestData.resourceUri = OC_RSRVD_PRESENCE_URI;
requestInfo.method = CA_GET;
requestInfo.info = requestData;
return OC_STACK_ERROR;
}
- AddObserver(OC_PRESENCE_URI, NULL, 0, caToken, tokenLength,
+ AddObserver(OC_RSRVD_PRESENCE_URI, NULL, 0, caToken, tokenLength,
(OCResource *)presenceResource.handle, OC_LOW_QOS, &devAddr);
CADestroyToken(caToken);
}
result = OCCreateResource(&presenceResource.handle,
OC_RSRVD_RESOURCE_TYPE_PRESENCE,
"core.r",
- OC_PRESENCE_URI,
+ OC_RSRVD_PRESENCE_URI,
NULL,
NULL,
OC_OBSERVABLE);
/* Start a discovery query*/
char szQueryUri[64] = { 0 };
- strcpy(szQueryUri, OC_WELL_KNOWN_QUERY);
+ strcpy(szQueryUri, OC_RSRVD_WELL_KNOWN_URI);
cbData.cb = asyncDoResourcesCallback;
cbData.context = (void*)DEFAULT_CONTEXT_VALUE;
cbData.cd = NULL;
/* Start a discovery query*/
char szQueryUri[64] = { 0 };
- strcpy(szQueryUri, OC_WELL_KNOWN_QUERY);
+ strcpy(szQueryUri, OC_RSRVD_WELL_KNOWN_URI);
cbData.cb = asyncDoResourcesCallback;
cbData.context = (void*)DEFAULT_CONTEXT_VALUE;
cbData.cd = NULL;
"core.led",
"core.rw",
"/a/led",
- 0,
- NULL,
+ 0,
+ NULL,
OC_RES_PROP_NONE));// the resource is non-discoverable &
// non-observable by the client.
const char* url = OCGetResourceUri(handle);
m_callsMade(0),m_connectivityType(ct)
{
std::ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=intel.fridge";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=intel.fridge";
std::cout << "Fridge Client has started " <<std::endl;
FindCallback f (std::bind(&ClientFridge::foundDevice, this, PH::_1));
OCStackResult result = OCPlatform::findResource(
try
{
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.garage";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.garage";
OCPlatform::findResource("", requestURI.str(),
connectivityType, &foundResource);
int main(int argc, char* argv[])
{
ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=a.collection";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=a.collection";
PlatformConfig config
{ OC::ServiceType::InProc, ModeType::Client, "0.0.0.0", 0, OC::QualityOfService::LowQos };
cout << "registerResource is called." << endl;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
OCPlatform::findResource("", requestURI.str(),
connectivityType, &foundResource);
else
{
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI;
+ requestURI << OC_RSRVD_WELL_KNOWN_URI;
result = OCPlatform::findResource("", requestURI.str(),
CT_DEFAULT, &foundResource);
try
{
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI;
+ requestURI << OC_RSRVD_WELL_KNOWN_URI;
OCPlatform::findResource("", requestURI.str(), connectivityType, &foundResource);
std::cout<< "Finding Resource... " <<std::endl;
// makes it so that all boolean values are printed as 'true/false' in this stream
std::cout.setf(std::ios::boolalpha);
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI;// << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI;// << "?rt=core.light";
OCPlatform::findResource("", requestURI.str(),
CT_DEFAULT, &foundResource);
try
{
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
OCPlatform::findResource("", requestURI.str(),
connectivityType, &foundResource, OC::QualityOfService::LowQos);
void start()
{
std::ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.foo";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.foo";
std::cout<<"Starting Client find:"<<std::endl;
FindCallback f (std::bind(&ClientWorker::foundResource, this, std::placeholders::_1));
int main(int argc, char* argv[])
{
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.foo";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.foo";
PlatformConfig cfg {
OC::ServiceType::InProc,
auto cLock = m_csdkLock.lock();
std::ostringstream os;
- os << host << OC_PRESENCE_URI;;
+ os << host << OC_RSRVD_PRESENCE_URI;;
if(!resourceType.empty())
{
TEST(FindResourceTest, DISABLED_FindResourceValid)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK, OCPlatform::findResource("", requestURI.str(),
CT_DEFAULT, &foundResource));
}
TEST(FindResourceTest, FindResourceNullResourceURI1)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_ANY_THROW(OCPlatform::findResource(nullptr, requestURI.str(),
CT_DEFAULT, &foundResource));
}
TEST(FindResourceTest, FindResourceNullHost)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_ANY_THROW(OCPlatform::findResource(nullptr, requestURI.str(),
CT_DEFAULT, &foundResource));
}
TEST(FindResourceTest, FindResourceNullresourceHandler)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_THROW(OCPlatform::findResource("", requestURI.str(),
CT_DEFAULT, NULL), OC::OCException);
}
TEST(FindResourceTest, DISABLED_FindResourceWithLowQoS)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResource,
OC::QualityOfService::LowQos));
TEST(FindResourceTest, DISABLED_FindResourceWithMidQos)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResource,
OC::QualityOfService::MidQos));
TEST(FindResourceTest, DISABLED_FindResourceWithHighQos)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResource,
OC::QualityOfService::HighQos));
TEST(FindResourceTest, DISABLED_FindResourceWithNaQos)
{
std::ostringstream requestURI;
- requestURI << OC_WELL_KNOWN_QUERY << "?rt=core.light";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.light";
EXPECT_EQ(OC_STACK_OK,
OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResource,
OC::QualityOfService::NaQos));
cbData.cd = NULL;
char queryUri[OIC_STRING_MAX_VALUE] = { '\0' };
- snprintf(queryUri, sizeof(queryUri), "coap://%s%s", sourceResourceAddress , OC_PRESENCE_URI);
+ snprintf(queryUri, sizeof(queryUri), "coap://%s%s", sourceResourceAddress , OC_RSRVD_PRESENCE_URI);
OC_LOG_V(DEBUG, HOSTING_TAG, "initializePresenceForCoordinating Query : %s", queryUri);
result = OCDoResource(&handle, OC_REST_PRESENCE, queryUri, 0, 0,
// makes it so that all boolean values are printed as 'true/false' in this stream
std::cout.setf(std::ios::boolalpha);
// Find all resources
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.fan";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.fan";
OCPlatform::findResource("", requestURI.str(), CT_DEFAULT, &foundResourceFan);
std::cout << "Finding Resource... " << std::endl;
while (true)
// Find fan resources
std::ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=core.fan";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.fan";
OCPlatform::findResource("", requestURI.str(), OC_ALL, &foundResourceFan);
std::cout << "Finding Resource... " << std::endl;
}
OCStackResult ret = OC_STACK_ERROR;
std::ostringstream requestURI;
- requestURI << OC_MULTICAST_DISCOVERY_URI << "?rt=SSManager.Sensor";
+ requestURI << OC_RSRVD_WELL_KNOWN_URI << "?rt=SSManager.Sensor";
std::ostringstream multicastPresenceURI;
multicastPresenceURI << "coap://" << OC_MULTICAST_PREFIX;
if (n == 9)
{
- std::string query = OC_MULTICAST_DISCOVERY_URI;
+ std::string query = OC_RSRVD_WELL_KNOWN_URI;
query.append("?rt=");
query.append(resourceTypeName);
}
else if (n == 0)
{
- std::string query = OC_MULTICAST_DISCOVERY_URI;
+ std::string query = OC_RSRVD_WELL_KNOWN_URI;
query.append("?rt=");
query.append("core.bookmark");
else if (selectedMenu == 11)
{
ostringstream query;
- query << OC_MULTICAST_DISCOVERY_URI << "?rt=core.musicplayer";
+ query << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.musicplayer";
cout << query.str() << endl;
result = OCPlatform::findResource("",
else if (selectedMenu == 12)
{
ostringstream query;
- query << OC_MULTICAST_DISCOVERY_URI << "?rt=core.speaker";
+ query << OC_RSRVD_WELL_KNOWN_URI << "?rt=core.speaker";
result = OCPlatform::findResource("",
query.str(),
CT_DEFAULT,
{
// std::cout << "resourceTypes : " << resourceTypes.at(i) << std::endl;
- std::string query = OC_MULTICAST_DISCOVERY_URI;
+ std::string query = OC_RSRVD_WELL_KNOWN_URI;
query.append("?rt=");
query.append(resourceTypes.at(i));
for (unsigned int i = 0; i < collectionResourceTypes.size(); ++i)
{
- std::string query = OC_MULTICAST_DISCOVERY_URI;
+ std::string query = OC_RSRVD_WELL_KNOWN_URI;
query.append("?rt=");
query.append(collectionResourceTypes.at(i));
if (methodType == "joinGroup")
{
- std::string resourceName = OC_MULTICAST_DISCOVERY_URI;
+ std::string resourceName = OC_RSRVD_WELL_KNOWN_URI;
resourceName.append("?rt=");
resourceName.append(resourceType);
OC_LOG_V(DEBUG, TAG, "\t\t\tresourceName : %s", resourceName.c_str());