Move system-server under server/system.
[platform/framework/native/appfw.git] / inc / FAppTypes.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                FAppTypes.h
19  * @brief               This is the header file for the enumerations of the App class.
20  *
21  *      This header file contains the declarations of the enumerations of the App class.
22  * @see                 Application
23  */
24
25 #ifndef _FAPP_TYPES_H_
26 #define _FAPP_TYPES_H_
27
28 #include <FBaseString.h>
29
30 namespace Tizen { namespace App
31 {
32
33 /**
34  * The package ID
35  *
36  * @since       2.0
37  */
38 typedef Tizen::Base::String PackageId;
39
40 /**
41  * The application ID
42  *
43  * @since       2.0
44  */
45 typedef Tizen::Base::String AppId;
46
47 /**
48  * @if OSPDEPREC
49  * The application secret
50  * @brief       <i> [Deprecated] </i>
51  * @deprecated  This type is deprecated because the associated App::GetAppSecret() method is deprecated.
52  *
53  * @since       2.0
54  * @endif
55  */
56 typedef Tizen::Base::String AppSecret;
57
58 /**
59  * @enum        AppState
60  * Defines the various states of an application's life cycle.
61  *
62  * @since       2.0
63  */
64 enum AppState
65 {
66         INITIALIZING,   /**< The application has been launched */
67         RUNNING,        /**< The application has been initialized and is currently being executed */
68         TERMINATING,    /**< The application is about to exit and releases its resources and saves its preferences */
69         TERMINATED  /**< The application has been destroyed */
70 };
71
72 /**
73  * @enum        AppUiState
74  * Defines the UI state of an application.
75  *
76  * @since               2.0
77  */
78 enum AppUiState
79 {
80         APP_UI_STATE_FOREGROUND = 0x01,             /**< The application is completely visible on foreground */
81         APP_UI_STATE_PARTIAL_BACKGROUND = 0x02,     /**< The application is partially hidden by another window, such as a system pop-up */
82         APP_UI_STATE_BACKGROUND = 0x04              /**< The application is completely hidden by a full-screen window, usually by another application or an application control */
83 };
84
85 /**
86  * @enum        AppCtrlResult
87  * Defines the application control result.
88  *
89  * @since       2.0
90  */
91 enum AppCtrlResult
92 {
93         APP_CTRL_RESULT_SUCCEEDED = 0x00,       /**< The application operation is successful */
94         APP_CTRL_RESULT_FAILED = 0x01,          /**< The application operation has failed */
95         APP_CTRL_RESULT_CANCELED = 0x02,        /**< The application operation is canceled by the callee application */
96         APP_CTRL_RESULT_TERMINATED = 0x04,      /**< The callee application is terminated without sending the result */
97         APP_CTRL_RESULT_ABORTED = 0x08,         /**< The application operation is aborted by the platform */
98 };
99
100 /**
101  * @if OSPDEPREC
102  * The application launch request ID. @n
103  * Represents the application launch arguments in App::App::OnUserEventReceivedN().
104  *
105  * @brief       <i> [Deprecated] </i>
106  * @deprecated  This variable is deprecated. From %Tizen API version 2.1, App::App::OnUserEventReceivedN()
107  *                              is not invoked for the request from application and %AppLaunchRequestId is not used anymore.
108  *                              Instead, use IAppControlProviderEventListener.
109  * @since       2.0
110  *
111  * @see     App::App::OnUserEventReceivedN()
112  * @endif
113  */
114 const long AppLaunchRequestId = (-0xFFFF);
115
116 /**
117  * @if OSPDEPREC
118  * Defines the launch type - normal launch.
119  *
120  * @brief       <i> [Deprecated] </i>
121  * @deprecated  This variable is provided only for backward compatibility and will be deleted in the near future.
122  *                              Instead of using this variable, it is recommended to use IAppControlProviderEventListener to acquire the launch information.
123  * @since       2.0
124  * @endif
125  */
126 _OSP_EXPORT_ extern const Tizen::Base::String APP_LAUNCH_NORMAL;
127
128 /**
129  * @if OSPDEPREC
130  * Defines the launch type - conditional launch.
131  *
132  * @brief       <i> [Deprecated] </i>
133  * @deprecated  This variable is provided only for backward compatibility and will be deleted in the near future.
134  *                              Instead of using this variable, it is recommended to use IAppLaunchConditionEventListener to acquire the conditional launch information.
135  * @since       2.0
136  * @endif
137  */
138 _OSP_EXPORT_ extern const Tizen::Base::String APP_LAUNCH_CONDITIONAL;
139
140 }} // Tizen::App
141
142 #endif // _FAPP_TYPES_H_