Merge "[devel_3.0_main] Cherry-pick Beautification of source-code. 80383" into devel_...
[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 /**
28  * @c byte is an @c unsigned @c char datatype.
29  * @since 2.0
30  */
31 typedef unsigned char byte;
32
33 /**
34  * @c result is an @c unsigned @c long type and indicates the result of the method execution.
35  * @since 2.0
36  */
37 typedef unsigned long result;
38
39
40 namespace Tizen { namespace Base
41 {
42 class String;
43 }}
44
45 typedef Tizen::Base::String UserId;
46 typedef Tizen::Base::String LoginId;
47
48
49 /**
50 * The invocation ID is returned when a request is sent.
51 * @since 2.0
52 */
53 typedef long RequestId;
54 #define INVALID_REQUEST_ID  -1
55
56
57 // Macro to get the value in byte
58 #define GET_MASK(val, pos, msk) (((val) & ((msk) << (pos))) >> (pos))
59 // Macro to put the value in byte
60 #define PUT_MASK(var, val, pos) ((var) | ((val) << (pos)))
61
62
63 #ifndef Handle
64 typedef int Handle;
65 #define INVALID_HANDLE  -1
66 #endif // Handle
67
68 #ifndef null
69 #define null    0
70 #endif // null
71
72 #ifndef INFINITE
73 #define INFINITE    0xFFFFFFFF
74 #endif // INFINITE
75
76
77 #ifndef UUID
78 #ifndef UUID__DEFINED
79 typedef struct UUID_
80 {
81         unsigned long x;
82         unsigned short s1;
83         unsigned short s2;
84         unsigned char c[8];
85 } UUID_;
86
87 #define UUID__DEFINED
88 #define UUID_DEFINED
89 #endif
90
91 #define UUID UUID_
92 #endif // UUID
93
94 #endif // _FBASE_DATA_TYPE_H_