77c0579415b0eef0a37f10dee7a7a43e9bddad50
[platform/framework/native/appfw.git] / src / app / inc / FApp_Types.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FApp_Types.h
20  * @brief       This is the header file for the internal Tizen::App types.
21  */
22
23 #ifndef _FAPP_INTERNAL_TYPES_H_
24 #define _FAPP_INTERNAL_TYPES_H_
25
26
27 namespace Tizen { namespace App
28 {
29
30 #define DRM_PARAM_MAX_LENGTH    4096
31 #define WIDGET_APP_MAX_APPID_LENGTH 255
32 #define NATIVE_APP_MAX_APPID_LENGTH 256
33
34 #define APP_APPID_SIZE_MAX      256
35 #define APP_APPNAME_SIZE_MAX        256
36 #define MAPP_CHANNELNAME_SIZE_MAX   256
37 #define MAPP_PATH_SIZE_MAX      256
38
39 /**
40  * @enum        _AppType
41  * Defines the type of an application.
42  *
43  * @since 2.1
44  */
45 enum _AppType
46 {
47         _APP_TYPE_UI_APP = 0x01,        /**< %UiApp type */
48         _APP_TYPE_SERVICE_APP = 0x02,   /**< %ServiceApp type */
49         _APP_TYPE_IME_APP = 0x10,       /**< %ImeApp type */
50         _APP_TYPE_HOME_APP = 0x20,      /**< %HomeApp type */
51         _APP_TYPE_LOCK_APP = 0x40,      /**< %LockApp type */
52         _APP_TYPE_MENU_APP = 0x80,      /**< %MenuApp type */
53         _APP_TYPE_WEB_APP = 0x1000,     /**< %WebApp type */
54 };
55
56 enum _AppEvent
57 {
58         AE_BATTERY = 0x01,
59         AE_LOW_MEMORY,
60         AE_LEGACY_APPCONTROL,
61         AE_LAUNCH_REQUEST,
62         AE_CHECKPOINT,
63         AE_DELETE_FRAME,
64         AE_CLEAR_LISTENER,
65 };
66
67 /**
68  * @enum        _ApphandlerType
69  * Defines the application provider type
70  */
71 enum _AppHandler
72 {
73         _APP_HANDLER_NONE = 0x00,
74         _APP_HANDLER_APPCONTROL = 0x01,
75         _APP_HANDLER_DATACONTROL = 0x02,
76         _APP_HANDLER_LAUNCH_NORMAL = 0x04,
77         _APP_HANDLER_LAUNCH_COND = 0x08,
78 };
79
80 /**
81  * @enum        _DataControlAccess
82  * Defines the DataControl accessibility
83  */
84 enum _DataControlAccess
85 {
86         _DATACONTROL_ACCESS_UNDEFINED = 0x00,
87         _DATACONTROL_ACCESS_READ = 0x01,
88         _DATACONTROL_ACCESS_WRITE = 0x10,
89         _DATACONTROL_ACCESS_READWRITE = 0x11,
90 };
91
92 //
93 // AppControl result mapping
94 // APP_CTRL_RESULT_SUCCEEDED <-> APPSVC_RES_OK (0) == SERVICE_RESULT_SUCCEEDED
95 // APP_CTRL_RESULT_FAILED <->  APPSVC_OSP_RES_FAIL
96 // APP_CTRL_RESULT_CANCELED <-> APPSVC_RES_NOT_OK (-1) == SERVICE_RESULT_FAILED
97 // APP_CTRL_RESULT_TERMINATED <-> APPSVC_OSP_RES_TERMINATE
98 // APP_CTRL_RESULT_ABORTED <-> APPSVC_RES_CANCEL (-2) == SERVICE_RESULT_CANCELED
99 //
100 const int APPSVC_OSP_RES_FAIL = -13;
101 const int APPSVC_OSP_RES_TERMINATE = -14;
102
103 const int LAUNCH_ARG_META_COUNT = 3;
104
105 _OSP_LOCAL_ extern const wchar_t LEGACY_LAUNCH_REASON_NORMAL[];
106 _OSP_LOCAL_ extern const wchar_t LEGACY_LAUNCH_REASON_CONDITIONAL[];
107 _OSP_LOCAL_ extern const wchar_t TIZEN_OPERATION_MAIN[];
108 _OSP_EXPORT_ extern const wchar_t TIZEN_OPERATION_PICK[];
109 _OSP_LOCAL_ extern const char TIZEN_APPCONTROL_DATA_LEGACY[];
110 _OSP_LOCAL_ extern const char TIZEN_NOTIFICATION_DATA[];
111
112 } } // Tizen::App
113
114 #endif // _FAPP_INTERNAL_TYPES_H_