Tizen 2.0 Release
[framework/web/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-ro / feature_model.h
index 13b959c..fc9754d 100644 (file)
@@ -24,7 +24,7 @@
 
 #include <dpl/event/model.h>
 #include <dpl/event/property.h>
-#include <dpl/shared_ptr.h>
+#include <memory>
 #include <string>
 #include <list>
 #include <set>
@@ -34,11 +34,16 @@ namespace WrtDB {
 
 typedef int FeatureHandle;
 typedef std::list<FeatureHandle> FeatureHandleList;
-typedef DPL::SharedPtr<FeatureHandleList> FeatureHandleListPtr;
+typedef std::shared_ptr<FeatureHandleList> FeatureHandleListPtr;
 
 typedef int FeatureSetHandle;
 typedef std::list<FeatureSetHandle> FeatureSetHandleList;
 
+typedef struct {
+    std::string     featureName;
+    DbPluginHandle  pluginHandle;
+} FeatureData;
+
 class FeatureModel : public DPL::Event::Model
 {
   public:
@@ -55,9 +60,16 @@ class FeatureModel : public DPL::Event::Model
         PHandle(this, -1)
     {
     }
+
+    void SetData(const std::string& name, const std::set<std::string>& deviceCapabilities, const DbPluginHandle& pluginHandle)
+    {
+        Name.SetWithoutLock(name);
+        DeviceCapabilities.SetWithoutLock(deviceCapabilities);
+        PHandle.SetWithoutLock(pluginHandle);
+    }
 };
 
-typedef DPL::SharedPtr<FeatureModel> FeatureModelPtr;
+typedef std::shared_ptr<FeatureModel> FeatureModelPtr;
 
 } // namespace WrtDB