Release version 0.15.0
[platform/core/appfw/slp-pkgmgr.git] / installer / pkgmgr_installer_error.h
1 /*
2  * Copyright (c) 2016 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
18 #ifndef __PKGMGR_INSTALLER_ERROR__
19 #define __PKGMGR_INSTALLER_ERROR__
20
21 /* new common error codes
22  * since 3.0
23  */
24 #define PKGMGR_INSTALLER_ERRCODE_UNDEFINED_ERROR        (-999)
25 #define PKGMGR_INSTALLER_ERRCODE_GLOBALSYMLINK_ERROR     (-26)  /* Global symlink error */
26 #define PKGMGR_INSTALLER_ERRCODE_GRANT_PERMISSION_ERROR  (-25)  /* Grant permission error */
27 #define PKGMGR_INSTALLER_ERRCODE_IMAGE_ERROR             (-24)  /* Image error */
28 #define PKGMGR_INSTALLER_ERRCODE_UNZIP_ERROR             (-23)  /* Unzip error */
29 #define PKGMGR_INSTALLER_ERRCODE_SECURITY_ERROR          (-22)  /* Security error */
30 #define PKGMGR_INSTALLER_ERRCODE_REGISTER_ERROR          (-21)  /* Register application error */
31 #define PKGMGR_INSTALLER_ERRCODE_PRIVILEGE_ERROR         (-20)  /* Privilege error */
32 #define PKGMGR_INSTALLER_ERRCODE_PARSE_ERROR             (-19)  /* Parsing error */
33 #define PKGMGR_INSTALLER_ERRCODE_RECOVERY_ERROR          (-18)  /* Recovery error */
34 #define PKGMGR_INSTALLER_ERRCODE_DELTA_ERROR             (-17)  /* Delta patch error */
35 #define PKGMGR_INSTALLER_ERRCODE_APP_DIR_ERROR           (-16)  /* Application directory error */
36 #define PKGMGR_INSTALLER_ERRCODE_CONFIG_ERROR            (-15)  /* Configuration error */
37 #define PKGMGR_INSTALLER_ERRCODE_SIGNATURE_ERROR         (-14)  /* Signature error */
38 #define PKGMGR_INSTALLER_ERRCODE_SIGNATURE_INVALID       (-13)  /* Signature invalid */
39 #define PKGMGR_INSTALLER_ERRCODE_CERT_ERROR              (-12)  /* Check certificate error */
40 #define PKGMGR_INSTALLER_ERRCODE_AUTHOR_CERT_NOT_MATCH   (-11)  /* Author certificate not match */
41 #define PKGMGR_INSTALLER_ERRCODE_AUTHOR_CERT_NOT_FOUND   (-10)  /* Author certificate not found */
42 #define PKGMGR_INSTALLER_ERRCODE_ICON_ERROR               (-9)  /* Icon error */
43 #define PKGMGR_INSTALLER_ERRCODE_ICON_NOT_FOUND           (-8)  /* Icon not found */
44 #define PKGMGR_INSTALLER_ERRCODE_MANIFEST_ERROR           (-7)  /* Manifest error */
45 #define PKGMGR_INSTALLER_ERRCODE_MANIFEST_NOT_FOUND       (-6)  /* Manifest not found */
46 #define PKGMGR_INSTALLER_ERRCODE_PACKAGE_NOT_FOUND        (-5)  /* Package not found */
47 #define PKGMGR_INSTALLER_ERRCODE_OPERATION_NOT_ALLOWED    (-4)  /* Operation not allowed */
48 #define PKGMGR_INSTALLER_ERRCODE_OUT_OF_SPACE             (-3)  /* Out of disc space */
49 #define PKGMGR_INSTALLER_ERRCODE_INVALID_VALUE            (-2)  /* Invalid argument */
50 #define PKGMGR_INSTALLER_ERRCODE_ERROR                    (-1)  /* General error */
51 #define PKGMGR_INSTALLER_ERRCODE_OK                        (0)  /* Success */
52
53 #define PKGMGR_INSTALLER_ERRCODE_UNDEFINED_ERROR_STR         "Undefined error"
54 #define PKGMGR_INSTALLER_ERRCODE_GLOBALSYMLINK_ERROR_STR     "Global symlink error"
55 #define PKGMGR_INSTALLER_ERRCODE_GRANT_PERMISSION_ERROR_STR  "Grant permission error"
56 #define PKGMGR_INSTALLER_ERRCODE_IMAGE_ERROR_STR             "Image error"
57 #define PKGMGR_INSTALLER_ERRCODE_UNZIP_ERROR_STR             "Unzip error"
58 #define PKGMGR_INSTALLER_ERRCODE_SECURITY_ERROR_STR          "Security error"
59 #define PKGMGR_INSTALLER_ERRCODE_REGISTER_ERROR_STR          "Register application error"
60 #define PKGMGR_INSTALLER_ERRCODE_PRIVILEGE_ERROR_STR         "Privilege error"
61 #define PKGMGR_INSTALLER_ERRCODE_PARSE_ERROR_STR             "Parsing error"
62 #define PKGMGR_INSTALLER_ERRCODE_RECOVERY_ERROR_STR          "Recovery error"
63 #define PKGMGR_INSTALLER_ERRCODE_DELTA_ERROR_STR             "Delta patch error"
64 #define PKGMGR_INSTALLER_ERRCODE_APP_DIR_ERROR_STR           "Application directory error"
65 #define PKGMGR_INSTALLER_ERRCODE_CONFIG_ERROR_STR            "Configuration error"
66 #define PKGMGR_INSTALLER_ERRCODE_SIGNATURE_ERROR_STR         "Signature error"
67 #define PKGMGR_INSTALLER_ERRCODE_SIGNATURE_INVALID_STR       "Signature invalid"
68 #define PKGMGR_INSTALLER_ERRCODE_CERT_ERROR_STR              "Check certificate error"
69 #define PKGMGR_INSTALLER_ERRCODE_AUTHOR_CERT_NOT_MATCH_STR   "Author certificate not match"
70 #define PKGMGR_INSTALLER_ERRCODE_AUTHOR_CERT_NOT_FOUND_STR   "Author certificate not found"
71 #define PKGMGR_INSTALLER_ERRCODE_ICON_ERROR_STR              "Icon error"
72 #define PKGMGR_INSTALLER_ERRCODE_ICON_NOT_FOUND_STR          "Icon not found"
73 #define PKGMGR_INSTALLER_ERRCODE_MANIFEST_ERROR_STR          "Manifest error"
74 #define PKGMGR_INSTALLER_ERRCODE_MANIFEST_NOT_FOUND_STR      "Manifest not found"
75 #define PKGMGR_INSTALLER_ERRCODE_PACKAGE_NOT_FOUND_STR       "Package not found"
76 #define PKGMGR_INSTALLER_ERRCODE_OPERATION_NOT_ALLOWED_STR   "Operation not allowed"
77 #define PKGMGR_INSTALLER_ERRCODE_OUT_OF_SPACE_STR            "Out of disc space"
78 #define PKGMGR_INSTALLER_ERRCODE_INVALID_VALUE_STR           "Invalid argument"
79 #define PKGMGR_INSTALLER_ERRCODE_ERROR_STR                   "General error"
80 #define PKGMGR_INSTALLER_ERRCODE_OK_STR                      "Success"
81
82 /* Outdated error codes (for compatible with 2.x)
83  * 1 -100 : Package command errors
84  * 101-120 : reserved for Core installer
85  * 121-140 : reserved for Web installer
86  * 141-160 : reserved for Native installer
87  */
88 #define PKGMGR_INSTALLER_ERR_PACKAGE_NOT_FOUND                       1
89 #define PKGMGR_INSTALLER_ERR_PACKAGE_INVALID                         2
90 #define PKGMGR_INSTALLER_ERR_PACKAGE_LOWER_VERSION                   3
91 #define PKGMGR_INSTALLER_ERR_PACKAGE_EXECUTABLE_NOT_FOUND            4
92 #define PKGMGR_INSTALLER_ERR_MANIFEST_NOT_FOUND                     11
93 #define PKGMGR_INSTALLER_ERR_MANIFEST_INVALID                       12
94 #define PKGMGR_INSTALLER_ERR_CONFIG_NOT_FOUND                       13
95 #define PKGMGR_INSTALLER_ERR_CONFIG_INVALID                         14
96 #define PKGMGR_INSTALLER_ERR_SIGNATURE_NOT_FOUND                    21
97 #define PKGMGR_INSTALLER_ERR_SIGNATURE_INVALID                      22
98 #define PKGMGR_INSTALLER_ERR_SIGNATURE_VERIFICATION_FAILED          23
99 #define PKGMGR_INSTALLER_ERR_ROOT_CERTIFICATE_NOT_FOUND             31
100 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_INVALID                    32
101 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_CHAIN_VERIFICATION_FAILED  33
102 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_EXPIRED                    34
103 #define PKGMGR_INSTALLER_ERR_INVALID_PRIVILEGE                      41
104 #define PKGMGR_INSTALLER_ERR_MENU_ICON_NOT_FOUND                    51
105 #define PKGMGR_INSTALLER_ERR_FATAL_ERROR                            61
106 #define PKGMGR_INSTALLER_ERR_OUT_OF_STORAGE                         62
107 #define PKGMGR_INSTALLER_ERR_OUT_OF_MEMORY                          63
108 #define PKGMGR_INSTALLER_ERR_ARGUMENT_INVALID                       64
109
110 #define PKGMGR_INSTALLER_ERR_PACKAGE_NOT_FOUND_STR                      "PACKAGE_NOT_FOUND"
111 #define PKGMGR_INSTALLER_ERR_PACKAGE_INVALID_STR                        "PACKAGE_INVALID"
112 #define PKGMGR_INSTALLER_ERR_PACKAGE_LOWER_VERSION_STR                  "PACKAGE_LOWER_VERSION"
113 #define PKGMGR_INSTALLER_ERR_PACKAGE_EXECUTABLE_NOT_FOUND_STR           "PACKAGE_EXECUTABLE_NOT_FOUND"
114 #define PKGMGR_INSTALLER_ERR_MANIFEST_NOT_FOUND_STR                     "MANIFEST_NOT_FOUND"
115 #define PKGMGR_INSTALLER_ERR_MANIFEST_INVALID_STR                       "MANIFEST_INVALID"
116 #define PKGMGR_INSTALLER_ERR_CONFIG_NOT_FOUND_STR                       "CONFIG_NOT_FOUND"
117 #define PKGMGR_INSTALLER_ERR_CONFIG_INVALID_STR                         "CONFIG_INVALID"
118 #define PKGMGR_INSTALLER_ERR_SIGNATURE_NOT_FOUND_STR                    "SIGNATURE_NOT_FOUND"
119 #define PKGMGR_INSTALLER_ERR_SIGNATURE_INVALID_STR                      "SIGNATURE_INVALID"
120 #define PKGMGR_INSTALLER_ERR_SIGNATURE_VERIFICATION_FAILED_STR          "SIGNATURE_VERIFICATION_FAILED"
121 #define PKGMGR_INSTALLER_ERR_ROOT_CERTIFICATE_NOT_FOUND_STR             "ROOT_CERTIFICATE_NOT_FOUND"
122 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_INVALID_STR                    "CERTIFICATE_INVALID"
123 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_CHAIN_VERIFICATION_FAILED_STR  "CERTIFICATE_CHAIN_VERIFICATION_FAILED"
124 #define PKGMGR_INSTALLER_ERR_CERTIFICATE_EXPIRED_STR                    "CERTIFICATE_EXPIRED"
125 #define PKGMGR_INSTALLER_ERR_INVALID_PRIVILEGE_STR                      "INVALID_PRIVILEGE"
126 #define PKGMGR_INSTALLER_ERR_MENU_ICON_NOT_FOUND_STR                    "MENU_ICON_NOT_FOUND"
127 #define PKGMGR_INSTALLER_ERR_FATAL_ERROR_STR                            "FATAL_ERROR"
128 #define PKGMGR_INSTALLER_ERR_OUT_OF_STORAGE_STR                         "OUT_OF_STORAGE"
129 #define PKGMGR_INSTALLER_ERR_OUT_OF_MEMORY_STR                          "OUT_OF_MEMORY"
130 #define PKGMGR_INSTALLER_ERR_ARGUMENT_INVALID_STR                       "ARGUMENT_INVALID"
131 #define PKGMGR_INSTALLER_ERR_UNKNOWN_STR                                "Unknown Error"
132
133 #endif