[Release] wrt-installer_0.1.9
[framework/web/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 #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     /* Error result */
47     WRT_ERROR_INTERNAL = -128,      /*< Internal library error.
48                                      * Should never occur */
49
50     WRT_ERROR_PKGNAME_NOT_FOUND,    /*< package name was not found */
51     WRT_ERROR_NO_PATH,              /*<One of specific directory does not
52                                      * exist*/
53
54     /* Installer Errors*/
55     WRT_INSTALLER_ERROR_INVALID_WIDGET_PACKAGE, /*< package is malformed */
56     WRT_INSTALLER_ERROR_WIDGET_DOES_NOT_EXIST,  /*< given tizenAppId is invalid */
57
58     WRT_INSTALLER_ERROR_ALREADY_UNINSTALLING,   /*< Widget is already being
59                                                  * uninstalled */
60     WRT_INSTALLER_ERROR_INVALID_CERTIFICATE,    /*<  */
61     WRT_INSTALLER_ERROR_ALREADY_INSTALLED,      /*< Widget is already installed
62                                                  */
63     WRT_INSTALLER_ERROR_INTERNAL,               /*< Internal error due to inconsistency */
64     WRT_INSTALLER_ERROR_NOT_ALLOWED,            /*< Widget installation or
65                                                  * update not allowed */
66                                                 /*< because violation of policy
67                                                  * ocurred */
68     WRT_INSTALLER_ERROR_DEFERRED,               /*< Widget installation deferred
69                                                  */
70     WRT_INSTALLER_ERROR_DATABASE_FAILURE,       /*< Failure in database */
71     WRT_INSTALLER_ERROR_UNKNOWN,                /*< Temporary error. Try to not
72                                                  * use this. */
73     WRT_INSTALLER_ERROR_OSPSVC,                 /*< Error of installation
74                                                  * of osp service */
75     /* Plugin Installer Errors */
76     WRT_PLUGIN_INSTALLER_ERROR_WRONG_PATH,       /*< Wrong Path to plugin Dir */
77     WRT_PLUGIN_INSTALLER_ERROR_METAFILE,         /*< Plugin metafile error */
78     WRT_PLUGIN_INSTALLER_ERROR_ALREADY_INSTALLED, /*< Plugin already installed*/
79     WRT_PLUGIN_INSTALLER_ERROR_LIBRARY_ERROR,    /*< Shared library error*/
80     WRT_PLUGIN_INSTALLER_ERROR_WAITING,          /*< Missing dependencies*/
81     WRT_PLUGIN_INSTALLER_ERROR_LOCK,             /*< Another installation
82                                                   *  in progress or lock file
83                                                   *  error*/
84     WRT_PLUGIN_INSTALLER_ERROR_UNKNOWN           /*< Unknown error*/
85 } WrtErrStatus;
86
87 #ifdef __cplusplus
88 }
89 #endif
90
91 #endif /* WRT_TYPE_H_ */