[Release] wrt-installer_0.0.92 for sdk branch
[framework/web/wrt-installer.git] / src / jobs / widget_install / widget_install_errors.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    installer_errors.h
18  * @author  Pawel Sikorski (p.sikorski@samgsung.com)
19  * @version
20  * @brief
21  */
22
23 #ifndef INSTALLER_ERRORS_H_
24 #define INSTALLER_ERRORS_H_
25
26 #include <dpl/exception.h>
27 #include <job_exception_base.h>
28
29 //TODO SafeException(...)
30
31 namespace Jobs {
32 namespace WidgetInstall {
33 namespace Exceptions {
34 enum Type
35 {
36     Success,                         ///< Success
37
38     ErrorInvalidWidgetPackage,       ///< ?
39     ErrorWidgetDoesNotExist,         ///< ?
40     ErrorAreadyUninstalling,         ///< Widget is already being uninstalled
41     ErrorOutOfDiskSpace,             ///< ?
42     ErrorInvalidPackage,             ///< Widget signature is invalid.
43     ErrorAlreadyInstalled,           ///< ?
44     ErrorInternal,                   ///< ?
45     ErrorNotAllowed,                 ///< Widget installation or update not allowed
46                                      ///< because violation of policy ocurred
47     ErrorDeferred,                   ///< Widget installation was deferred and will be continued when possible
48     ErrorDatabaseFailure,            ///< Failure in database
49     ErrorRemovingFolderFailure,      ///< Failure in removing existing widget folder
50     ErrorCreateVconfFailure,         ///< Failure in creating vconf
51     ErrorInstallOspServcie,          ///< Failure in installing osp service
52     ErrorUpdateWidget,               ///< Failure in widget update.
53     ErrorInstallToExt,               ///< Failure in install to sdcard
54     ErrorUnknown                     ///< Temporary error. Try to not use this.
55 };
56
57 DECLARE_JOB_EXCEPTION_BASE(JobExceptionBase, Base, ErrorUnknown)
58
59 // PREPARE
60 DECLARE_JOB_EXCEPTION(Base, NotAllowed, ErrorNotAllowed)
61 DECLARE_JOB_EXCEPTION(Base, Deferred, ErrorDeferred)
62 DECLARE_JOB_EXCEPTION(Base, InvalidWidgetUrl, ErrorInvalidWidgetPackage)
63
64 //UNZIP
65 DECLARE_JOB_EXCEPTION(Base, OpenZipFailed, ErrorInvalidWidgetPackage)
66 DECLARE_JOB_EXCEPTION(Base, GetZipGlobalInfoFailed, ErrorInvalidWidgetPackage)
67 DECLARE_JOB_EXCEPTION(Base, ZipEmpty, ErrorInvalidWidgetPackage)
68 DECLARE_JOB_EXCEPTION(Base, GetZippedFileInfoFailed, ErrorInvalidWidgetPackage)
69 DECLARE_JOB_EXCEPTION(Base, ZippedFileVersionTooNew, ErrorInvalidWidgetPackage)
70 DECLARE_JOB_EXCEPTION(Base, ExtractFileFailed, ErrorInvalidWidgetPackage)
71 DECLARE_JOB_EXCEPTION(Base, OutOfDiskSpace, ErrorOutOfDiskSpace)
72 DECLARE_JOB_EXCEPTION(Base, InternalError, ErrorInternal)
73
74 //CERTIFY
75 DECLARE_JOB_EXCEPTION(Base, InvalidPackage, ErrorInvalidPackage)
76
77 //WCONFIG
78 DECLARE_JOB_EXCEPTION(Base, WidgetConfigFileInvalid, ErrorInvalidWidgetPackage)
79 DECLARE_JOB_EXCEPTION(Base, NotInstalled, ErrorInvalidWidgetPackage)
80 DECLARE_JOB_EXCEPTION(Base, InstallationFailed, ErrorInvalidWidgetPackage)
81 DECLARE_JOB_EXCEPTION(Base, AlreadyInstalled, ErrorAlreadyInstalled)
82 DECLARE_JOB_EXCEPTION(Base, UnknownError, ErrorUnknown)
83 DECLARE_JOB_EXCEPTION(Base, DatabaseFailure, ErrorDatabaseFailure)
84 DECLARE_JOB_EXCEPTION(Base, RemovingFolderFailure, ErrorRemovingFolderFailure)
85 DECLARE_JOB_EXCEPTION(Base, CreateVconfFailure, ErrorCreateVconfFailure)
86
87 DECLARE_JOB_EXCEPTION(Base, CopyIconFailed, ErrorUnknown)
88
89 DECLARE_JOB_EXCEPTION(Base, ErrorExternalInstallingFailure, ErrorInstallToExt)
90
91 // Installation osp service
92 DECLARE_JOB_EXCEPTION(Base, RequestInstallOspsvc, ErrorInstallOspServcie)
93 DECLARE_JOB_EXCEPTION(Base, InstallOspsvcFailed, ErrorInstallOspServcie)
94 //UPDATE
95 DECLARE_JOB_EXCEPTION(Base, BackupFailed, ErrorUpdateWidget)
96 DECLARE_JOB_EXCEPTION(Base, InsertNewWidgetFailed, ErrorUpdateWidget)
97 DECLARE_JOB_EXCEPTION(Base, RemoveBackupFailed, ErrorUpdateWidget)
98
99 //Database
100 DECLARE_JOB_EXCEPTION(Base, UpdateFailed, ErrorInvalidWidgetPackage)
101
102 // Plugins copy errors
103 DECLARE_JOB_EXCEPTION(Base, EmptyPluginsDirectory, ErrorInvalidWidgetPackage)
104 DECLARE_JOB_EXCEPTION(Base, PluginsSubdirectory, ErrorInvalidWidgetPackage)
105
106 DECLARE_JOB_EXCEPTION(Base, SetCertificateInfoFailed, ErrorUnknown)
107
108 } //namespace
109 } //namespace
110 } //namespace
111
112 #endif /* INSTALLER_ERRORS_H_ */