correct app type for service app
[platform/framework/native/appfw.git] / src / app / inc / FApp_Types.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
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  * @file        FApp_Types.h
19  * @brief       This is the header file for the internal Tizen::App types.
20  */
21
22 #ifndef _FAPP_INTERNAL_TYPES_H_
23 #define _FAPP_INTERNAL_TYPES_H_
24
25
26 namespace Tizen { namespace App
27 {
28
29 #define DRM_PARAM_MAX_LENGTH    4096
30 #define WIDGET_APP_MAX_APPID_LENGTH 255
31 #define NATIVE_APP_MAX_APPID_LENGTH 256
32
33 #define APP_APPID_SIZE_MAX      256
34 #define APP_APPNAME_SIZE_MAX        256
35 #define MAPP_CHANNELNAME_SIZE_MAX   256
36 #define MAPP_PATH_SIZE_MAX      256
37
38 /**
39  * @enum        _AppType
40  * Defines the type of an application.
41  *
42  * @since 2.1
43  */
44 enum _AppType
45 {
46         _APP_TYPE_NONE = 0x00,  /**< Invalid %App type */
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_NOTIFICATION_DATA[];
110
111 } } // Tizen::App
112
113 #endif // _FAPP_INTERNAL_TYPES_H_