Update Runtime document from LB
[platform/framework/native/appfw.git] / inc / FBaseRtTypes.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                FBaseRtTypes.h
19  * @brief               This is the header file for the types in the %Runtime package.
20  *
21  * This header file defines the types in the Runtime package.
22  */
23 #ifndef _FBASE_RT_TYPES_H_
24 #define _FBASE_RT_TYPES_H_
25
26 #include <FBaseTypes.h>
27
28 namespace Tizen { namespace Base { namespace Runtime
29 {
30
31 /**
32 * This method is for internal use only. Using this method can cause behavioral, security-related,
33 * and consistency-related issues in the application.
34 *
35 * @since 2.0
36 */
37 enum TimerStatus
38 {
39         TIMER_STATUS_NOT_ACTIVATED, // This enum value is for internal use only. Using this enum can cause behavioral, security-related, and consistency-related issues in the application.
40         TIMER_STATUS_ACTIVATED,     // This enum value is for internal use only. Using this enum can cause behavioral, security-related, and consistency-related issues in the application.
41         TIMER_STATUS_CANCELED,      // This enum value is for internal use only. Using this enum can cause behavioral, security-related, and consistency-related issues in the application.
42         TIMER_STATUS_EXPIRED,       // This enum value is for internal use only. Using this enum can cause behavioral, security-related, and consistency-related issues in the application.
43         TIMER_STATUS_ACTIVATED_REPEATABLE,       // This enum value is for internal use only. Using this enum can cause behavioral, security-related, and consistency-related issues in the application.
44 };
45
46 /**
47 * @struct       TryTag
48 * @brief        This struct is used only for supporting the non-blocking acquisition of a resource.
49 *
50 * The %TryTag struct is used for just discriminating between the blocking and non-blocking acquisitions
51 * of a resource. So, the definition is empty.
52 *
53 * @since 2.0
54 *
55 * @see          MutexGuard
56 * @see          SemaphoreGuard
57 * @see          Try
58 */
59 struct TryTag
60 {
61 };
62
63 /**
64 * @brief        Used only for discriminating between the blocking and non-blocking acquisitions.
65 *
66 * @code
67 * Mutex m;
68 * m.Create();
69 * {
70 *     MutexGuard guard(m, Try);
71 *     // Access to shared resources
72 * }
73 *
74 * Semaphore s;
75 * s.Create();
76 * {
77 *     SemaphoreGuard guard(s, Try);
78 *     // Access to multiple shared resources
79 * }
80 * @endcode
81 */
82 static const TryTag Try = {};
83
84 } } } // Tizen::Runtime
85
86 #endif // _FBASE_RT_TYPES_H_