1 /*
2  * This file is part of gtkD.
3  *
4  * gtkD is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License
6  * as published by the Free Software Foundation; either version 3
7  * of the License, or (at your option) any later version, with
8  * some exceptions, please read the COPYING file.
9  *
10  * gtkD is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with gtkD; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
18  */
19  
20 // generated automatically - do not change
21 // find conversion definition on APILookup.txt
22 // implement new conversion functionalities on the wrap.utils pakage
23 
24 module gdac.gdatypes;
25 
26 
27 public import gtkc.glibtypes;
28 public import gtkc.gobjecttypes;
29 
30 
31 /**
32  * typedef GList GdaValueList;
33  */
34 public alias GList GdaValueList;
35 public enum GdaBlobMode
36 {
37 	MODE_READ = 1,
38 	MODE_WRITE = 1 << 1,
39 	MODE_RDWR = 0x03
40 }
41 alias GdaBlobMode daBlobMode;
42 
43 public enum GdaClientEvent
44 {
45 	INVALID,
46 	/+* events usually notified by the library itself, and which the providers
47 	should notify on very special cases (like a transaction being started
48 	or committed via a BEGIN/COMMIT command directly sent to the
49 	executeCommand method on the provider +/
50 	ERROR, /+* params: "error" +/
51 	CONNECTION_OPENED, /+* params: +/
52 	CONNECTION_CLOSED, /+* params: +/
53 	TRANSACTION_STARTED, /+* params: "transaction" +/
54 	TRANSACTION_COMMITTED, /+* params: "transaction" +/
55 	TRANSACTION_CANCELLED /+* params: "transaction" +/
56 }
57 alias GdaClientEvent daClientEvent;
58 
59 /**
60  * And OR'ed combination of GDA_COMMAND_OPTIONS_* values.
61  */
62 public enum GdaCommandOptions
63 {
64 	IGNORE_ERRORS = 1,
65 	STOP_ON_ERRORS = 1 << 1,
66 	BAD_OPTION = 1 << 2
67 }
68 alias GdaCommandOptions daCommandOptions;
69 
70 /**
71  * GDA_COMMAND_TYPE_SQL
72  * the text of the command is composed of zero or more SQL
73  * sentences.
74  * GDA_COMMAND_TYPE_XML
75  * GDA_COMMAND_TYPE_PROCEDURE
76  * GDA_COMMAND_TYPE_TABLE
77  * the text of the command is composed of zero or more
78  * table names.
79  * GDA_COMMAND_TYPE_SCHEMA
80  * GDA_COMMAND_TYPE_INVALID
81  */
82 public enum GdaCommandType
83 {
84 	TYPE_SQL,
85 	TYPE_XML,
86 	TYPE_PROCEDURE,
87 	TYPE_TABLE,
88 	TYPE_SCHEMA,
89 	TYPE_INVALID
90 }
91 alias GdaCommandType daCommandType;
92 
93 public enum GdaConnectionOptions
94 {
95 	READ_ONLY = 1 << 0,
96 	DONT_SHARE = 2 << 0
97 }
98 alias GdaConnectionOptions daConnectionOptions;
99 
100 public enum GdaConnectionFeature
101 {
102 	AGGREGATES,
103 	BLOBS,
104 	INDEXES,
105 	INHERITANCE,
106 	NAMESPACES,
107 	PROCEDURES,
108 	SEQUENCES,
109 	SQL,
110 	TRANSACTIONS,
111 	TRIGGERS,
112 	UPDATABLE_CURSOR,
113 	USERS,
114 	VIEWS,
115 	XML_QUERIES
116 }
117 alias GdaConnectionFeature daConnectionFeature;
118 
119 public enum GdaConnectionSchema
120 {
121 	AGGREGATES,
122 	DATABASES,
123 	FIELDS,
124 	INDEXES,
125 	LANGUAGES,
126 	NAMESPACES,
127 	PARENT_TABLES,
128 	PROCEDURES,
129 	SEQUENCES,
130 	TABLES,
131 	TRIGGERS,
132 	TYPES,
133 	USERS,
134 	VIEWS
135 }
136 alias GdaConnectionSchema daConnectionSchema;
137 
138 public enum GdaExportFlags
139 {
140 	TABLE_DATA = 1
141 }
142 alias GdaExportFlags daExportFlags;
143 
144 public enum GdaTransactionIsolation
145 {
146 	UNKNOWN,
147 	READ_COMMITTED,
148 	READ_UNCOMMITTED,
149 	REPEATABLE_READ,
150 	SERIALIZABLE
151 }
152 alias GdaTransactionIsolation daTransactionIsolation;
153 
154 public enum GdaValueType
155 {
156 	TYPE_NULL,
157 	TYPE_BIGINT,
158 	TYPE_BIGUINT,
159 	TYPE_BINARY,
160 	TYPE_BLOB,
161 	TYPE_BOOLEAN,
162 	TYPE_DATE,
163 	TYPE_DOUBLE,
164 	TYPE_GEOMETRIC_POINT,
165 	TYPE_GOBJECT,
166 	TYPE_INTEGER,
167 	TYPE_LIST,
168 	TYPE_MONEY,
169 	TYPE_NUMERIC,
170 	TYPE_SINGLE,
171 	TYPE_SMALLINT,
172 	TYPE_SMALLUINT,
173 	TYPE_STRING,
174 	TYPE_TIME,
175 	TYPE_TIMESTAMP,
176 	TYPE_TINYINT,
177 	TYPE_TINYUINT,
178 	TYPE_TYPE,
179 	TYPE_UINTEGER,
180 	TYPE_UNKNOWN
181 }
182 alias GdaValueType daValueType;
183 
184 
185 public struct GdaConnection{}
186 public struct GdaError{}
187 public struct GdaTransaction{}
188 public struct GdaDataModelArray{}
189 
190 public struct GdaDataModelHash{}
191 
192 public struct GdaDataModelList{}
193 
194 public struct xmlNodePtr{}
195 public struct GdaExport{}
196 
197 public struct GdaSelect{}
198 public struct GdaTable{}
199 
200 public struct GdaServerProviderPrivate{}
201 
202 
203 /**
204  * Main Gtk struct.
205  */
206 public struct GdaBlob
207 {
208 	/+* Private +/
209 	extern(C) int function(GdaBlob* blob, GdaBlobMode mode)  open;
210 	extern(C) int function(GdaBlob* blob, void* buf, int size, int* bytesRead)  read;
211 	extern(C) int function(GdaBlob* blob, void* buf, int size, int* bytesWritten)  write;
212 	extern(C) int function(GdaBlob* blob, int offset, int whence)  lseek;
213 	extern(C) int function(GdaBlob* blob)  close;
214 	extern(C) int function(GdaBlob* blob)  remove;
215 	extern(C) char * function(GdaBlob* blob)  stringify;
216 	extern(C) void function(GdaBlob* blob)  freeData;
217 	void* privData;
218 	/+* +/
219 	/+* Public +/
220 	void* userData;
221 }
222 
223 
224 public struct GdaClientPrivate{}
225 
226 
227 /**
228  * Main Gtk struct.
229  */
230 public struct GdaCommand
231 {
232 	char *text;
233 	GdaCommandType type;
234 	GdaCommandOptions options;
235 	GdaTransaction *xaction;
236 }
237 
238 
239 public struct GdaProviderInfo
240 {
241 	char *id;
242 	char *location;
243 	char *description;
244 	GList *gdaParams; /+* A list of GdaProviderParameterInfo pointers +/
245 }
246 
247 
248 public struct GdaDataSourceInfo
249 {
250 	char *name;
251 	char *provider;
252 	char *cncString;
253 	char *description;
254 	char *username;
255 	char *password;
256 }
257 
258 
259 public struct GdaConnectionPrivate{}
260 
261 
262 public struct GdaServerProvider
263 {
264 	GObject object;
265 	GdaServerProviderPrivate *priv;
266 }
267 
268 
269 public struct GdaClient
270 {
271 	GObject object;
272 	GdaClientPrivate *priv;
273 }
274 
275 
276 public struct GdaDataModelArrayPrivate{}
277 
278 
279 public struct GdaDataModelHashPrivate{}
280 
281 
282 public struct GdaDataModelListPrivate{}
283 
284 
285 public struct GdaDataModelPrivate{}
286 
287 
288 public struct GdaErrorPrivate{}
289 
290 
291 public struct GdaExportPrivate{}
292 
293 
294 /**
295  * Main Gtk struct.
296  */
297 public struct GdaFieldAttributes
298 {
299 	int definedSize;
300 	char *name;
301 	char *table;
302 	char *caption;
303 	int scale;
304 	GdaValueType gdaType;
305 	int allowNull;
306 	int primaryKey;
307 	int uniqueKey;
308 	char *references;
309 	int autoIncrement;
310 	glong autoIncrementStart;
311 	glong autoIncrementStep;
312 	int position;
313 	GdaValue *defaultValue;
314 }
315 
316 
317 public struct GdaField
318 {
319 	int actualSize;
320 	GdaValue *value;
321 	GdaFieldAttributes *attributes;
322 }
323 
324 
325 /**
326  * Main Gtk struct.
327  */
328 public struct GdaParameter
329 {
330 	char *name;
331 	GdaValue *value;
332 }
333 
334 
335 public struct GdaParameterList{}
336 
337 
338 /**
339  * Main Gtk struct.
340  */
341 public struct GdaQuarkList{}
342 
343 
344 public struct GdaDataModel
345 {
346 	GObject object;
347 	GdaDataModelPrivate *priv;
348 }
349 
350 
351 /**
352  * Main Gtk struct.
353  */
354 public struct GdaRow{}
355 
356 
357 public struct GdaSelectPrivate{}
358 
359 
360 public struct GdaTablePrivate{}
361 
362 
363 public struct GdaTransactionPrivate{}
364 
365 
366 public struct GdaDate
367 {
368 	short year;
369 	ushort month;
370 	ushort day;
371 }
372 
373 
374 public struct GdaGeometricPoint
375 {
376 	double x;
377 	double y;
378 }
379 
380 
381 public struct GdaMoney
382 {
383 	char *currency;
384 	double amount;
385 }
386 
387 
388 public struct GdaNumeric
389 {
390 	char *number;
391 	glong precision;
392 	glong width;
393 }
394 
395 
396 public struct GdaTime
397 {
398 	ushort hour;
399 	ushort minute;
400 	ushort second;
401 	glong timezone; /+* # of seconds to the east UTC +/
402 }
403 
404 
405 public struct GdaTimestamp
406 {
407 	short year;
408 	ushort month;
409 	ushort day;
410 	ushort hour;
411 	ushort minute;
412 	ushort second;
413 	gulong fraction;
414 	glong timezone; /+* # of seconds to the east UTC +/
415 }
416 
417 
418 /**
419  * Main Gtk struct.
420  */
421 public struct GdaValue
422 {
423 	GdaValueType type;
424 	union Value
425 	{
426 		long vBigint;
427 		ulong vBiguint;
428 		void* vBinary;
429 		GdaBlob vBlob;
430 		int vBoolean;
431 		GdaDate vDate;
432 		double vDouble;
433 		GdaGeometricPoint vPoint;
434 		GObject *vGobj;
435 		int vInteger;
436 		GdaValueList *vList;
437 		GdaMoney vMoney;
438 		GdaNumeric vNumeric;
439 		float vSingle;
440 		short vSmallint;
441 		ushort vSmalluint;
442 		char *vString;
443 		GdaTime vTime;
444 		GdaTimestamp vTimestamp;
445 		char vTinyint;
446 		char vTinyuint;
447 		GdaValueType vType;
448 		uint vUinteger;
449 	}
450 	Value value;
451 	glong binaryLength;
452 }
453 
454 
455 /*
456  * value :
457  * type :
458  */
459 // TODO
460 // #define gda_value_isa(value,type) (gda_value_get_type (value) == type)
461 
462 /*
463  * user_data :
464  */
465 // void (*GdaInitFunc) (gpointer user_data);
466 public alias extern(C) void function(void* userData) GdaInitFunc;
467 
468 /*
469  * path :
470  * user_data :
471  */
472 // void (*GdaConfigListenerFunc) (const gchar *path,  gpointer user_data);
473 public alias extern(C) void function(char* path, void* userData) GdaConfigListenerFunc;
474 
475 /*
476  * model :
477  * row :
478  * user_data :
479  * Returns :
480  */
481 // gboolean (*GdaDataModelForeachFunc) (GdaDataModel *model,  GdaRow *row,  gpointer user_data);
482 public alias extern(C) int function(GdaDataModel* model, GdaRow* row, void* userData) GdaDataModelForeachFunc;