2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
16 #ifndef WRT_SRC_INSTALLER_CORE_INSTALLER_LOGIC_H_
17 #define WRT_SRC_INSTALLER_CORE_INSTALLER_LOGIC_H_
19 #include <dpl/wrt-dao-rw/widget_dao.h>
20 #include <dpl/wrt-dao-rw/global_dao.h>
21 #include <dpl/wrt-dao-ro/feature_model.h>
22 #include <widget_install/widget_installer_struct.h>
23 #include <widget_uninstall/widget_uninstaller_struct.h>
24 #include <plugin_install/plugin_installer_struct.h>
31 typedef std::map<Jobs::JobHandle, Jobs::Job*> JobsContainer;
34 void InstallDeferredWidgetPackages();
35 void InstallSingleDeferredPackage();
37 void ResetProgressPlugins();
38 void InstallWaitingPlugins();
39 bool resolvePluginDependencies(PluginHandle handle);
41 Jobs::JobHandle m_NextHandle;
42 Jobs::JobHandle GetNewJobHandle()
44 return m_NextHandle++;
46 Jobs::JobHandle AddAndStartJob(Jobs::Job *job);
48 virtual ~InstallerLogic();
54 Jobs::JobHandle InstallWidget(const std::string & widgetPath,
55 const WidgetInstallationStruct &installerStruct);
57 Jobs::JobHandle UninstallWidget(const std::string & widgetPkgName,
58 const WidgetUninstallationStruct &uninstallerStruct);
60 Jobs::JobHandle InstallPlugin(std::string const & pluginPath,
61 const PluginInstallerStruct &installerStruct);
63 bool NextStep(Jobs::Job* installModel);
66 bool AbortJob(const Jobs::JobHandle & /*handle*/)
68 LogWarning("Not implemented");
75 friend class InstallerController;
80 #endif // INSTALLER_LOGIC_H