[Release] wrt-installer_0.0.73
[framework/web/wrt-installer.git] / src / jobs / widget_install / task_plugins_copy.h
1 /*
2  * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  *    Licensed under the Apache License, Version 2.0 (the "License");
5  *    you may not use this file except in compliance with the License.
6  *    You may obtain a copy of the License at
7  *
8  *        http://www.apache.org/licenses/LICENSE-2.0
9  *
10  *    Unless required by applicable law or agreed to in writing, software
11  *    distributed under the License is distributed on an "AS IS" BASIS,
12  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  *    See the License for the specific language governing permissions and
14  *    limitations under the License.
15  */
16 /*
17  * @file    task_plugin_copy.h
18  * @author  Marcin Kaminski (marcin.ka@samsung.com)
19  * @version 1.0
20  * @brief   Copying plugins delivered in widget package.
21  */
22
23 #ifndef WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_PLUGINS_COPY_H
24 #define WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_PLUGINS_COPY_H
25
26 class InstallerContext;
27
28 #include <string>
29 #include <dpl/task.h>
30 #include <dpl/string.h>
31 #include <list>
32
33 namespace Jobs {
34 namespace WidgetInstall {
35 class TaskPluginsCopy : public DPL::TaskDecl<TaskPluginsCopy>
36 {
37 public:
38     TaskPluginsCopy(InstallerContext &context);
39 private:
40     /* Widget installer context */
41     InstallerContext &m_context;
42     /* Path to plugins directory in unpacked widget*/
43     std::string m_npsource;
44     /* Path to plugins destination (install) directory */
45     std::string m_npdestination;
46     /* List of found .so files to copy*/
47     std::list<std::string> m_nplugins;
48
49     /* Plugins copying task steps. */
50     void StepFindPlugins();
51     void StepCopyPlugins();
52     void StepCopyingFinished();
53 };
54 } //namespace WidgetInstall
55 } //namespace Jobs
56
57 #endif /* WRT_INSTALLER_SRC_JOBS_WIDGET_INSTALL_TASK_PLUGINS_COPY_H */