tizen 2.4 release
[framework/web/wrt-installer.git] / src / jobs / widget_install / widget_unzip.h
similarity index 88%
rename from src_mobile/jobs/widget_install/widget_unzip.h
rename to src/jobs/widget_install/widget_unzip.h
index 204cde7..83bda4e 100644 (file)
 #define WIDGET_UNZIP_H
 
 #include <string>
-
+#include <set>
 #include <dpl/zip_input.h>
 #include <dpl/wrt-dao-ro/common_dao_types.h>
+#include <dpl/platform.h>
+#include <boost/filesystem.hpp>
+
+namespace bf = boost::filesystem;
 
 namespace Jobs {
 namespace WidgetInstall {
@@ -42,14 +46,19 @@ class WidgetUnzip
     std::unique_ptr<DPL::ZipInput> m_zip;
     DPL::ZipInput::const_iterator m_zipIterator;
     std::string m_requestFile;
+    std::set<bf::path> m_availablePathSet;
 
     void unzipProgress(const std::string &destination);
     void ExtractFile(DPL::ZipInput::File *input, const std::string
             &destFileName);
+    bool isAvailablePath(const bf::path &actualPath, const bf::path &destination);
+
+#if USE(DRM)
     bool isDRMPackage(const std::string &source);
     bool decryptDRMPackage(const std::string &source, const std::string
             &decryptedSource);
     std::string getDecryptedPackage(const std::string &source);
+#endif
 };
 
 } //namespace WidgetInstall