3a5ed67442d8b8f26b800e2e88fcf04a00f52b80
[framework/web/wearable/wrt-installer.git] / src / wrt-installer / wrt_type.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        wrt_type.h
18  * @author      jihoon Chung (jihoon.Chung@samsung.com)
19  * @version     1.0
20  * @brief       This file contains declarations of wrt api
21  */
22
23 /*
24  * @defgroup wrt_engine_group WebRunTime engine Library
25  * @ingroup internet_FW
26  * Functions to APIs to access wrt-engine
27  */
28
29 #ifndef WRT_TYPE_H_
30 #define WRT_TYPE_H_
31
32 #include <stdbool.h>
33 #include <stddef.h>
34
35 #define WRT_DEPRECATED __attribute__((deprecated))
36
37 typedef enum
38 {
39     /* Generic success */
40     WRT_SUCCESS = 0,                /*< Success*/
41
42     /* pkgmgr error */
43     WRT_INSTALLER_ERROR_PACKAGE_NOT_FOUND,      ///<
44     WRT_INSTALLER_ERROR_PACKAGE_INVALID,        ///< invalid widget package
45     WRT_INSTALLER_ERROR_PACKAGE_LOWER_VERSION,  ///< given version is lower than existing version
46     WRT_INSTALLER_ERROR_PACKAGE_EXCUTABLE_NOT_FOUND,
47
48     WRT_INSTALLER_ERROR_MANIFEST_NOT_FOUND = 11,///<
49     WRT_INSTALLER_ERROR_MANIFEST_INVALID,       ///<
50     WRT_INSTALLER_CONFIG_NOT_FOUND,             ///< couldn't find config.xml
51                                                 ///< in package.
52     WRT_INSTALLER_ERROR_CONFIG_INVALID,         ///< invalid config.xml
53
54     WRT_INSTALLER_ERROR_SIGNATURE_NOT_FOUND = 21,    ///< signature file not exist.
55     WRT_INSTALLER_ERROR_SIGNATURE_INVALID,           ///< invalid signature file
56     WRT_INSTALLER_ERROR_SIGNATURE_VERIFICATION_FAILED,  ///< failure in verificate signature
57     WRT_INSTALLER_ERROR_ROOT_CERTIFICATE_NOT_FOUND = 31, ///< couldn't find root certificate.
58     WRT_INSTALLER_ERROR_CERTIFICATION_INVAID,       ///< invalid certification
59     WRT_INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED,    ///< failure in verificate certification chain.
60     WRT_INSTALLER_ERROR_CERTIFICATE_EXPIRED,        ///< expire cerification.
61
62     WRT_INSTALLER_ERROR_INVALID_PRIVILEGE = 41,     ///< invalid privilege.
63     WRT_INSTALLER_ERROR_PRIVILEGE_LEVEL_VIOLATION,
64
65     WRT_INSTALLER_ERROR_MENU_ICON_NOT_FOUND = 51,   ///<
66
67     WRT_INSTALLER_ERROR_FATAL_ERROR = 61,           ///< failure in db operation or file opertion..
68     WRT_INSTALLER_ERROR_OUT_OF_STORAGE,             ///< failure in shortage of memory
69     WRT_INSTALLER_ERROR_OUT_OF_MEMORY,              ///< failure in shortage of RAM
70     WRT_INSTALLER_ERROR_ARGUMENT_INVALID,
71
72     /* wrt-installer error */
73     /* 121-140 : reserved for Web installer */
74
75     /* installation */
76     WRT_INSTALLER_ERROR_PACKAGE_ALREADY_INSTALLED = 121,
77     WRT_INSTALLER_ERROR_ACE_CHECK_FAILED,
78     WRT_INSTALLER_ERROR_MANIFEST_CREATE_FAILED,     ///<
79     WRT_INSTALLER_ERROR_ENCRYPTION_FAILED,          ///< Failure in reousrce encrypttion
80     WRT_INSTALLER_ERROR_INSTALL_OSP_SERVCIE,        ///< Failure in installing osp service
81     WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED,
82     WRT_INSTALLER_ERROR_UNINSTALLATION_FAILED,
83
84     WRT_INSTALLER_ERROR_UNKNOWN = 140,              ///< do not use this error code.
85
86 } WrtErrStatus;
87
88 #endif /* WRT_TYPE_H_ */