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.
17 * @file job_plugin_install.h
18 * @author Pawel Sikorski (p.sikorski@samgsung.com)
23 #ifndef WRT_SRC_INSTALLER_CORE_JOB_JOB_PLUGIN_INSTALL_H_
24 #define WRT_SRC_INSTALLER_CORE_JOB_JOB_PLUGIN_INSTALL_H_
32 #include <plugin_install/plugin_installer_struct.h>
33 #include <plugin_install/plugin_installer_context.h>
35 namespace PluginInstall {
36 class JobPluginInstall :
38 public JobProgressBase<PluginInstallerContext::PluginInstallStep,
39 PluginInstallerContext::PLUGIN_INSTALL_END>,
40 public JobContextBase<PluginInstallerStruct>
43 static const WrtDB::DbPluginHandle INVALID_HANDLE = -1;
47 * @brief Automaticaly sets installation process
49 JobPluginInstall(PluginPath const &pluginPath,
50 const PluginInstallerStruct &installerStruct);
52 WrtDB::DbPluginHandle getNewPluginHandle() const
54 return m_context.pluginHandle;
56 std::string getFilePath() const
58 return m_context.pluginFilePath.Fullpath();
60 bool isReadyToInstall() const
62 return m_context.installationCompleted;
66 void SendFinishedSuccess();
67 void SendFinishedFailure();
68 void SaveExceptionData(const Jobs::JobExceptionBase &e);
71 PluginInstallerContext m_context;
73 //TODO move it to base class of all jobs
74 //maybe separate JobBase class for this?
75 Jobs::Exceptions::Type m_exceptionCaught;
76 std::string m_exceptionMessage;
79 } //namespace PluginInstall
81 #endif /* WRT_SRC_INSTALLER_CORE_JOB_JOB_PLUGIN_INSTALL_H_ */