[Iotcon] apply latest widl change.
authorjk.pu <jk.pu@samsung.com>
Fri, 1 Apr 2016 13:29:25 +0000 (22:29 +0900)
committerjk.pu <jk.pu@samsung.com>
Fri, 1 Apr 2016 13:31:48 +0000 (22:31 +0900)
Change-Id: I0573deb8abc45b3bda44a9fb9c3341846a1990f2
Signed-off-by: jk.pu <jk.pu@samsung.com>
src/iotcon/iotcon_api.js
src/iotcon/iotcon_utils.cc

index 29e64820d3a97dd6e7a2718b10da60cb4d714362..ed8776db323c65c658c82c693fd8603d40e7b650 100644 (file)
@@ -1065,6 +1065,10 @@ Server.prototype.createResource = function() {
     name: 'resourceTypes',
     type: types.ARRAY,
     values: types.STRING
+  }, {
+    name: 'resourceInterfaces',
+    type: types.ARRAY,
+    values: types.STRING
   }, {
     name: 'dictionary',
     type: types.DICTIONARY,
@@ -1075,6 +1079,7 @@ Server.prototype.createResource = function() {
   var callArgs = args.dictionary || {};
   callArgs.uriPath = args.uriPath;
   callArgs.resourceTypes = args.resourceTypes;
+  callArgs.resourceInterfaces = args.resourceInterfaces;
 
   var result = native.callSync('IotconServer_createResource', callArgs);
 
index cb54b694ed590c8a265a29eeaff3f43a67d7cbc0..e5b3723ddab317a00a823d1c99bf134e6654d809 100644 (file)
@@ -158,7 +158,7 @@ int IotconUtils::GetProperties(const picojson::object& args) {
   properties |= (observable.is<bool>() ? observable.get<bool>() : false) ? IOTCON_RESOURCE_OBSERVABLE : IOTCON_RESOURCE_NO_PROPERTY;
 
   const auto& discoverable = IotconUtils::GetArg(args, kIsDiscoverable);
-  properties |= (discoverable.is<bool>() ? discoverable.get<bool>() : false) ? IOTCON_RESOURCE_DISCOVERABLE : IOTCON_RESOURCE_NO_PROPERTY;
+  properties |= (discoverable.is<bool>() ? discoverable.get<bool>() : true) ? IOTCON_RESOURCE_DISCOVERABLE : IOTCON_RESOURCE_NO_PROPERTY;
 
   const auto& active = IotconUtils::GetArg(args, kIsActive);
   properties |= (active.is<bool>() ? active.get<bool>() : false) ? IOTCON_RESOURCE_ACTIVE : IOTCON_RESOURCE_NO_PROPERTY;
@@ -634,7 +634,7 @@ common::TizenResult IotconUtils::RequestToJson(iotcon_request_h request,
       if (!result) {
         LogAndReturnTizenError(result, ("iotcon_request_get_observe_type() failed"));
       }
-      out->insert(std::make_pair(kRequestType, picojson::value{FromObserveType(observe_type)}));
+      out->insert(std::make_pair(kObserveType, picojson::value{FromObserveType(observe_type)}));
     }
   } else {
     LoggerW("Request handle is null, ignoring");