tizen beta release
[framework/web/wrt-installer.git] / src / jobs / plugin_install / plugin_install_task.h
1 /*
2  * Copyright (c) 2011 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    install.h
18  * @author  Pawel Sikorski (p.sikorski@samgsung.com)
19  * @author  Grzegorz Krawczyk (g.krawczyk@samgsung.com)
20  * @version
21  * @brief
22  */
23
24 #ifndef INSTALL_H_
25 #define INSTALL_H_
26
27 //WRT INCLUDES
28 #include <dpl/task.h>
29 #include "plugin_installer_context.h"
30 #include "plugin_objects.h"
31
32 namespace Jobs {
33 namespace PluginInstall {
34 class PluginInstallTask :
35     public DPL::TaskDecl<PluginInstallTask>
36 {
37   public:
38     PluginInstallTask(PluginInstallerContext *inCont);
39     virtual ~PluginInstallTask();
40
41   private:
42     //data
43     PluginInstallerContext *m_context;
44
45     //PluginMetafile
46     WrtDB::PluginMetafileData m_pluginMetafile;
47
48     //Plugin LibraryObjects
49     PluginObjectsPtr m_libraryObjects;
50
51     WrtDB::DbPluginHandle m_pluginHandle;
52
53     //steps
54     void stepCheckPluginPath();
55     void stepParseConfigFile();
56     void stepCheckIfAlreadyInstalled();
57     void stepLoadPluginLibrary();
58     void stepRegisterPlugin();
59     void stepRegisterFeatures();
60     void stepRegisterPluginObjects();
61     void stepResolvePluginDependencies();
62 };
63 } //namespace Jobs
64 } //namespace PluginInstall
65
66 #endif /* INSTALL_H_ */