Merge "Revert "Fix N_SE-46938 for tz list."" into devel_3.0_main
[platform/framework/native/appfw.git] / inc / FBaseDataType.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                FBaseDataType.h
19  * @brief               This is the header file for the data types.
20  *
21  * This header file defines the data types.
22  */
23 #ifndef _FBASE_DATA_TYPE_H_
24 #define _FBASE_DATA_TYPE_H_
25
26 /**
27  * @c byte is an @c unsigned @c char datatype.
28  * @since 2.0
29  */
30 typedef unsigned char byte;
31
32 /**
33  * @c result is an @c unsigned @c long type and indicates the result of the method execution.
34  * @since 2.0
35  */
36 typedef unsigned long result;
37
38 namespace Tizen { namespace Base
39 {
40 class String;
41 }}
42
43 /**
44  * The user ID for authentication
45  * @since 2.0
46  */
47 typedef Tizen::Base::String UserId;
48
49 /**
50  * The user ID for login
51  * @since 2.0
52  */
53 typedef Tizen::Base::String LoginId;
54
55 /**
56  * The invocation ID is returned when a request is sent.
57  * @since 2.0
58  */
59 typedef long RequestId;
60
61 #define INVALID_REQUEST_ID  -1
62
63 // Macro to get the value in byte
64 #define GET_MASK(val, pos, msk) (((val) & ((msk) << (pos))) >> (pos))
65 // Macro to put the value in byte
66 #define PUT_MASK(var, val, pos) ((var) | ((val) << (pos)))
67
68 #ifndef Handle
69 typedef int Handle;
70 #define INVALID_HANDLE  -1
71 #endif // Handle
72
73 #ifndef null
74 #define null    0
75 #endif // null
76
77 #ifndef INFINITE
78 #define INFINITE    0xFFFFFFFF
79 #endif // INFINITE
80
81 #ifndef UUID
82 #ifndef UUID__DEFINED
83 typedef struct UUID_
84 {
85         unsigned long x;
86         unsigned short s1;
87         unsigned short s2;
88         unsigned char c[8];
89 } UUID_;
90
91 #define UUID__DEFINED
92 #define UUID_DEFINED
93 #endif
94
95 #define UUID UUID_
96 #endif // UUID
97
98 #endif // _FBASE_DATA_TYPE_H_