2cfb58425065065af8d9c82fdd54708e76e76b10
[framework/web/wrt-installer.git] / src_mobile / 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 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 #define WRT_DEPRECATED __attribute__((deprecated))
40
41 typedef enum
42 {
43     /* Generic success */
44     WRT_SUCCESS = 0,                /*< Success*/
45
46     /* pkgmgr error */
47     WRT_INSTALLER_ERROR_PACKAGE_NOT_FOUND,      ///<
48     WRT_INSTALLER_ERROR_PACKAGE_INVALID,        ///< invalid widget package
49     WRT_INSTALLER_ERROR_PACKAGE_LOWER_VERSION,  ///< given version is lower than existing version
50     WRT_INSTALLER_ERROR_PACKAGE_EXCUTABLE_NOT_FOUND,
51
52     WRT_INSTALLER_ERROR_MANIFEST_NOT_FOUND = 11,///<
53     WRT_INSTALLER_ERROR_MANIFEST_INVALID,       ///<
54     WRT_INSTALLER_CONFIG_NOT_FOUND,             ///< couldn't find config.xml
55                                                 ///< in package.
56     WRT_INSTALLER_ERROR_CONFIG_INVALID,         ///< invalid config.xml
57
58     WRT_INSTALLER_ERROR_SIGNATURE_NOT_FOUND = 21,    ///< signature file not exist.
59     WRT_INSTALLER_ERROR_SIGNATURE_INVALID,           ///< invalid signature file
60     WRT_INSTALLER_ERROR_SIGNATURE_VERIFICATION_FAILED,  ///< failure in verificate signature
61     WRT_INSTALLER_ERROR_ROOT_CERTIFICATE_NOT_FOUND = 31, ///< couldn't find root certificate.
62     WRT_INSTALLER_ERROR_CERTIFICATION_INVAID,       ///< invalid certification
63     WRT_INSTALLER_ERROR_CERTIFICATE_CHAIN_VERIFICATION_FAILED,    ///< failure in verificate certification chain.
64     WRT_INSTALLER_ERROR_CERTIFICATE_EXPIRED,        ///< expire cerification.
65
66     WRT_INSTALLER_ERROR_INVALID_PRIVILEGE = 41,     ///< invalid privilege.
67     WRT_INSTALLER_ERROR_PRIVILEGE_LEVEL_VIOLATION,
68
69     WRT_INSTALLER_ERROR_MENU_ICON_NOT_FOUND = 51,   ///<
70
71     WRT_INSTALLER_ERROR_FATAL_ERROR = 61,           ///< failure in db operation or file opertion..
72     WRT_INSTALLER_ERROR_OUT_OF_STORAGE,             ///< failure in shortage of memory
73     WRT_INSTALLER_ERROR_OUT_OF_MEMORY,              ///< failure in shortage of RAM
74     WRT_INSTALLER_ERROR_ARGUMENT_INVALID,
75
76     /* wrt-installer error */
77     /* 121-140 : reserved for Web installer */
78
79     /* installation */
80     WRT_INSTALLER_ERROR_PACKAGE_ALREADY_INSTALLED = 121,
81     WRT_INSTALLER_ERROR_ACE_CHECK_FAILED,
82     WRT_INSTALLER_ERROR_MANIFEST_CREATE_FAILED,     ///<
83     WRT_INSTALLER_ERROR_ENCRYPTION_FAILED,          ///< Failure in reousrce encrypttion
84     WRT_INSTALLER_ERROR_INSTALL_OSP_SERVCIE,        ///< Failure in installing osp service
85     WRT_INSTALLER_ERROR_PLUGIN_INSTALLATION_FAILED,
86     WRT_INSTALLER_ERROR_UNINSTALLATION_FAILED,
87
88     WRT_INSTALLER_ERROR_UNKNOWN = 140,              ///< do not use this error code.
89
90 } WrtErrStatus;
91
92 #ifdef __cplusplus
93 }
94 #endif
95
96 #endif /* WRT_TYPE_H_ */