Tizen 2.0 Release
[framework/web/wrt-commons.git] / modules / widget_dao / include / dpl / wrt-dao-ro / feature_model.h
index 13b959c..8698d4a 100644 (file)
 
 #include <dpl/event/model.h>
 #include <dpl/event/property.h>
-#include <dpl/shared_ptr.h>
+#include <memory>
 #include <string>
 #include <list>
 #include <set>
 #include <dpl/wrt-dao-ro/common_dao_types.h>
 
 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:
@@ -53,12 +57,19 @@ class FeatureModel : public DPL::Event::Model
         Name(this),
         DeviceCapabilities(this),
         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
 
 #endif // FEATURE_MODEL_H