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>
36 namespace PluginInstall {
37 class JobPluginInstall :
39 public JobProgressBase<PluginInstallerContext::PluginInstallStep,
40 PluginInstallerContext::PLUGIN_INSTALL_END>,
41 public JobContextBase<PluginInstallerStruct>
44 static const WrtDB::DbPluginHandle INVALID_HANDLE = -1;
48 * @brief Automaticaly sets installation process
50 JobPluginInstall(std::string const &pluginPath,
51 const PluginInstallerStruct &installerStruct);
53 WrtDB::DbPluginHandle getNewPluginHandle() const
55 return m_context.pluginHandle;
57 std::string getFilePath() const
59 return m_context.pluginFilePath;
61 bool isReadyToInstall() const
63 return m_context.installationCompleted;
67 void SendFinishedSuccess();
68 void SendFinishedFailure();
69 void SaveExceptionData(const Jobs::JobExceptionBase &e);
72 //TODO move somewhere this attribute
73 //(as it is in all Jobs...)
74 PluginInstallerContext m_context;
76 //TODO move it to base class of all jobs
77 //maybe separate JobBase class for this?
78 Jobs::Exceptions::Type m_exceptionCaught;
79 std::string m_exceptionMessage;
82 } //namespace PluginInstall
84 #endif /* WRT_SRC_INSTALLER_CORE_JOB_JOB_PLUGIN_INSTALL_H_ */