summaryrefslogtreecommitdiff
path: root/inc/protected/persComTypes.h
blob: 4fc0ff75fc68bd077bb73bd8a487c7061e407612 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
#ifndef PERS_COM_TYPES_H
#define PERS_COM_TYPES_H

/**********************************************************************************************************************
*
* Copyright (C) 2012 Continental Automotive Systems, Inc.
*
* Author: Ionut.Ieremie@continental-corporation.com
*
* Interface: protected - Type and constant definitions.
*
* For additional details see
* https://collab.genivi.org/wiki/display/genivi/SysInfraEGPersistenceConceptInterface   
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*
* Date       Author             Reason
* 2013.02.05 uidl9757  1.0.0.0  CSP_WZ#TODO:  CoC_SSW:Persistence:  interface that defines type and constants
*
**********************************************************************************************************************/

#include <stdbool.h>

#ifndef char_t
typedef char char_t ;
#endif

#ifndef NIL
/**
 * \brief Definition of the NIL value to be used.
 */
#define NIL     (0)
#endif /* #ifndef NIL */

#ifndef NULL
/**
 * \brief Definition of NULL to be the same as NIL.
 * \note
 * It is not allowed to use NULL furthermore, use NIL instead. NULL
 * is defined for legacy code only.
 */
#define NULL    NIL
#endif /* #ifndef NULL */




/**
 * \brief Definition to make boolean type common for C and C++
 */
typedef unsigned char bool_t;

/**
 * \brief Definition of false for boolean type in C.
 */
#ifndef false
#define false ((bool_t)0)
#endif

/**
 * \brief Definition of true for boolean type in C.
 */
#ifndef true
#define true ((bool_t)1)
#endif


#include <linux/types.h>  /* from within kernel source-tree ! */

typedef __s8  INT8;
typedef __s16 INT16;
typedef __s32 INT32;
typedef __s64 INT64;

typedef __u8  uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;
typedef __u64 uint64_t;

/**
 * \brief 8 bit signed
 */
typedef INT8 sint8_t;

/**
 * \brief 16 bit signed
 */
typedef INT16 sint16_t;

/**
 * \brief 32 bit signed
 */
typedef INT32 sint32_t;

/**
 * \brief 64 bit signed
 */
typedef INT64 sint64_t;


/**
 * \brief Storage for unsigned characters (8 bit).
 */
typedef unsigned char uc8_t;
/**
 * \brief Pointer to storage for unsigned characters (8 bit).
 */
typedef uc8_t * puc8_t;

/**
 * \brief Storage for signed characters (8 bit).
 */
typedef signed char sc8_t;
/**
 * \brief Pointer to storage for signed characters (8 bit).
 */
typedef sc8_t * psc8_t;

/**
 * \brief Definition of a single string element.
 */
typedef char str_t;
/**
 * \brief Pointer to string (to differentiate between characters and strings).
 */
typedef str_t * pstr_t;
/**
 * \brief Pointer to constant string.
 */
typedef const str_t * pconststr_t;
/**
 * \brief Constant pointer to string.
 */
typedef str_t *const constpstr_t;
/**
 * \brief Constant pointer to constant string.
 */
typedef const str_t *const constpconststr_t;

/**
 * \brief Storage for wide characters (16 bit) to support Unicode.
 */
typedef unsigned short uc16_t;
/**
 * \brief Pointer to storage for wide characters (16 bit) to support Unicode.
 */
typedef uc16_t * puc16_t;

/**
 * \brief Pointer to wide string (to differentiate between wide characters
 * and wide strings).
 */
typedef puc16_t pwstr_t;
/**
 * \brief Pointer to constant wide string.
 */
typedef const uc16_t * pconstwstr_t;
/**
 * \brief Constant pointer to wide string.
 */
typedef uc16_t *const constpwstr_t;
/**
 * \brief Constant pointer to constant wide string.
 */
typedef const uc16_t *const constpconstwstr_t;

/**
 * \brief Pointer to UNSIGNED-8-Bit
 */
typedef uint8_t* puint8_t;
/**
 * \brief Pointer to SIGNED-8-Bit
 */
typedef sint8_t* psint8_t;

/**
 * \brief Pointer to UNSIGNED-16-Bit
 */
typedef uint16_t* puint16_t;
/**
 * \brief Pointer to SIGNED-16-Bit
 */
typedef sint16_t* psint16_t;

/**
 * \brief Pointer to UNSIGNED-32-Bit
 */
typedef uint32_t* puint32_t;
/**
 * \brief Pointer to SIGNED-32-Bit
 */
typedef sint32_t* psint32_t;

/**
 * \brief Pointer to UNSIGNED-64-Bit
 */
typedef uint64_t* puint64_t;
/**
 * \brief Pointer to SIGNED-64-Bit
 */
typedef sint64_t* psint64_t;


typedef unsigned int uint_t;


typedef signed int sint_t;


#endif /* #ifndef PERS_COM_TYPES_H */