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
214
215
216
|
/*
* Copyright (c) 2004 Massachusetts Institute of Technology
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
/* $Id$ */
#ifndef __KHIMAIRA_KCDB_TYPE_H
#define __KHIMAIRA_KCDB_TYPE_H
/* Types */
typedef struct kcdb_type_i_t {
kcdb_type type;
khm_int32 refcount;
struct kcdb_type_i_t * next;
struct kcdb_type_i_t * prev;
} kcdb_type_i;
#define KCDB_TYPE_HASH_SIZE 31
#define KCDB_TYPE_FLAG_DELETED 8
void kcdb_type_init(void);
void kcdb_type_exit(void);
void kcdb_type_add_ref(const void *key, void *vt);
void kcdb_type_del_ref(const void *key, void *vt);
void kcdb_type_msg_completion(kmq_message * m);
khm_int32 kcdb_type_hold(kcdb_type_i * t);
khm_int32 kcdb_type_release(kcdb_type_i * t);
void kcdb_type_check_and_delete(khm_int32 id);
void kcdb_type_post_message(khm_int32 op, kcdb_type_i * t);
khm_int32 KHMAPI kcdb_type_void_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_void_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_void_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_void_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_string_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_string_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_string_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_string_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_date_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_date_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_date_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_date_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_interval_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_interval_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_interval_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_interval_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_int32_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_int32_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_int32_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_int32_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_int64_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_int64_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_int64_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_int64_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
khm_int32 KHMAPI kcdb_type_data_toString(
const void * d,
khm_size cbd,
wchar_t * buffer,
khm_size * cb_buf,
khm_int32 flags);
khm_boolean KHMAPI kcdb_type_data_isValid(
const void * d,
khm_size cbd);
khm_int32 KHMAPI kcdb_type_data_comp(
const void * d1,
khm_size cbd1,
const void * d2,
khm_size cbd2);
khm_int32 KHMAPI kcdb_type_data_dup(
const void * d_src,
khm_size cbd_src,
void * d_dst,
khm_size * cbd_dst);
#endif
|