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 INSTALLER_MODEL_H
17 #define INSTALLER_MODEL_H
19 #include <dpl/task_list.h>
22 class JobExceptionBase;
24 * @brief Defines installation and uninstallation type.
28 Installation, ///< defines install process
29 Uninstallation, ///< defines uninstall process
30 PluginInstallation ///< defines plugin installation process
33 typedef int JobHandle;
39 Job(InstallationType installType);
41 InstallationType GetInstallationType() const;
44 void SetUndoType(bool flag);
45 bool GetUndoType() const;
47 // Pause/resume support
48 bool IsPaused() const;
49 void SetPaused(bool paused);
52 void SetJobHandle(JobHandle handle);
53 JobHandle GetJobHandle() const;
54 virtual void SendProgress();
55 virtual void SendFinishedSuccess();
56 virtual void SendFinishedFailure();
58 virtual void SaveExceptionData(const Jobs::JobExceptionBase&);
61 InstallationType m_installationType;
62 bool m_UndoType; //TODO change name to m_AbortStarted
67 #endif // INSTALLER_MODEL_H