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