Commit 2a4c5117 authored by George Nash's avatar George Nash Committed by Rick Bell

Modify the code to place oic.d.light in a collection

This adds the the oic.wk.col to the oic.d.light device
Also adds the oic.if.ll to the resource interfaces.

Change-Id: I63c6cecc955ecf566c0c12b12cf1d1d4a7bd4808
Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19757Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarRick Bell <richard.s.bell@intel.com>
parent fbcd2b69
......@@ -265,6 +265,11 @@ OCRepPayload* UpnpBridgeDevice::getCommonPayload(const char *uri, char *interfac
{
throw "Failed to set baseline interface" ;
}
if (!OCRepPayloadAddInterface(payload, OC_RSRVD_INTERFACE_LL))
{
throw "Failed to set ll interface";
}
}
return payload;
......
......@@ -774,6 +774,27 @@ OCStackResult UpnpConnector::createResource(const string uri, const string resou
// {
// DEBUG_PRINT("Failed to bind virtual resource type to " << uri);
// }
if (UPNP_OIC_TYPE_DEVICE_LIGHT == resourceTypeName) {
result = OCBindResourceTypeToResource(handle, OC_RSRVD_RESOURCE_TYPE_COLLECTION);
if (result == OC_STACK_OK)
{
DEBUG_PRINT("Bound collection resource type to " << uri);
}
else
{
DEBUG_PRINT("Failed to bind collection resource type to " << uri);
}
result = OCBindResourceInterfaceToResource(handle, OC_RSRVD_INTERFACE_LL);
if (result == OC_STACK_OK)
{
DEBUG_PRINT("Bound ll resource interface to " << uri);
}
else
{
DEBUG_PRINT("Failed to bind ll resource interface to " << uri);
}
}
}
else
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment