[Iotcon] - fixing bugs to pass TCT tests 45/81945/1
authorAndrzej Popowski <a.popowski@samsung.com>
Thu, 28 Jul 2016 09:24:27 +0000 (11:24 +0200)
committerAndrzej Popowski <a.popowski@samsung.com>
Fri, 29 Jul 2016 09:00:05 +0000 (11:00 +0200)
Change-Id: I262dcc13661f4a9ae5ee4a69b45084a179765af1
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
src/iotcon/iotcon_api.js
src/iotcon/iotcon_client_manager.cc
src/iotcon/iotcon_instance.cc

index fa5899b0720cd185290486caf1047b48678b6071..55e19bb42d726414be41776c83023855ffe7feef 100644 (file)
@@ -178,18 +178,36 @@ function DeviceInfo(data) {
 function IotconOption(id, data) {
   validator.isConstructorCall(this, tizen.IotconOption);
 
+  var _id = 0;
+  var _data = '';
+
   Object.defineProperties(this, {
     id: {
-      value: id,
-      writable: false,
+      get: function() {
+        return _id;
+      },
+      set: function(v) {
+        if (v) {
+          _id = v;
+        }
+      },
       enumerable: true
     },
     data: {
-      value: data,
-      writable: false,
+      get: function() {
+        return _data;
+      },
+      set: function(v) {
+        if (v) {
+          _data = v;
+        }
+      },
       enumerable: true
     }
   });
+
+  this["id"] = id;
+  this["data"] = data;
 }
 
 function PlatformInfo(data) {
@@ -1078,7 +1096,7 @@ Server.prototype.createResource = function() {
     name: 'dictionary',
     type: types.DICTIONARY,
     optional: true,
-    nullable: true
+    nullable: false
   }]);
 
   var callArgs = args.dictionary || {};
index 41f9c3b9b2192da51785be683dec126cbe5e6ac3..7ecd9bb1c2feafef2f3d3b26bad80ba7d8164a20 100644 (file)
@@ -84,7 +84,7 @@ common::TizenResult IotconClientManager::AddPresenceEventListener(
   presence->id = GetPresenceNextId();
   presence_map_.insert(std::make_pair(presence->id, presence));
 
-  return TizenSuccess();
+  return result;
 }
 
 common::TizenResult IotconClientManager::RemovePresenceEventListener(long long id) {
index 7e7b5fb6a1250fd650e150b6229c447f1ef1b3a4..29af641495b2c998e5bd6cd9bcea1a29b7ad2c45 100644 (file)
@@ -85,7 +85,7 @@ const std::string kResult = "result";
 const std::string kTimeout = "timeout";
 const std::string kData = "data";
 
-const std::string kVirtualResourcesHandlingPath = "/home/tmp_file_iotcon.dat";
+const std::string kVirtualResourcesHandlingPath = "/home/owner/share/tmp_file_iotcon.dat";
 
 }  // namespace