Update wrt-plugins-common_0.3.60
[platform/framework/web/wrt-plugins-common.git] / src / plugins-installer / 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 #include <IObject.h>
32
33 namespace Jobs {
34 namespace PluginInstall {
35 class PluginInstallTask :
36     public DPL::TaskDecl<PluginInstallTask>
37 {
38   public:
39     PluginInstallTask(PluginInstallerContext *inCont);
40     virtual ~PluginInstallTask();
41
42   private:
43     //data
44     PluginInstallerContext *m_context;
45
46     //PluginMetafile
47     WrtDB::PluginMetafileData m_pluginInfo;
48
49     //Plugin LibraryObjects
50     PluginObjectsPtr m_libraryObjects;
51
52     WrtDB::DbPluginHandle m_pluginHandle;
53
54     bool m_dataFromConfigXML;
55
56     //steps
57     void stepCheckPluginPath();
58     void stepFindPluginLibrary();
59     void stepParseConfigFile();
60     void stepCheckIfAlreadyInstalled();
61     void stepLoadPluginLibrary();
62     void stepRegisterPlugin();
63     void stepRegisterFeatures();
64     void stepRegisterPluginObjects();
65     void stepResolvePluginDependencies();
66
67     void registerObjects(const WrtPluginsApi::IObjectsListPtr& objects);
68 };
69 } //namespace Jobs
70 } //namespace PluginInstall
71
72 #endif /* INSTALL_H_ */