alternative to assert
[gtkD.git] / gtkD / srcgda / gda / DataSourceInfo.d
blobb95e5c1fa47588611a34012a26a359be8fee1fe8
1 /*
2 * This file is part of gtkD.
4 * gtkD is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * gtkD is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with gtkD; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = libgda-gda-config.html
26 * outPack = gda
27 * outFile = DataSourceInfo
28 * strct = GdaDataSourceInfo
29 * realStrct=
30 * ctorStrct=
31 * clss = DataSourceInfo
32 * interf =
33 * class Code: Yes
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - gda_data_source_
40 * omit structs:
41 * - GdaProviderInfo
42 * omit prefixes:
43 * - gda_config_
44 * - gda_provider_
45 * omit code:
46 * - GdaConfigListenerFunc
47 * imports:
48 * - glib.ListG
49 * - std.string
50 * structWrap:
51 * module aliases:
52 * local aliases:
55 module gda.DataSourceInfo;
57 version(noAssert)
59 version(Tango)
61 import tango.io.Stdout; // use the tango loging?
65 private import gdac.gdatypes;
67 private import gdac.gda;
70 private import glib.ListG;
73 version(Tango) {
74 private import tango.text.Util;
75 } else {
76 private import std.string;
82 /**
83 * Description
84 * The functions in this section allow applications an easy access to the libgda
85 * configuration, thus making them able to access the list of data sources
86 * configured in the system, for instance.
88 public class DataSourceInfo
91 /** the main Gtk struct */
92 protected GdaDataSourceInfo* gdaDataSourceInfo;
95 public GdaDataSourceInfo* getDataSourceInfoStruct()
97 return gdaDataSourceInfo;
101 /** the main Gtk struct as a void* */
102 protected void* getStruct()
104 return cast(void*)gdaDataSourceInfo;
108 * Sets our main struct and passes it to the parent class
110 public this (GdaDataSourceInfo* gdaDataSourceInfo)
112 version(noAssert)
114 if ( gdaDataSourceInfo is null )
116 int zero = 0;
117 version(Tango)
119 Stdout("struct gdaDataSourceInfo is null on constructor").newline;
121 else
123 printf("struct gdaDataSourceInfo is null on constructor");
125 zero = zero / zero;
128 else
130 assert(gdaDataSourceInfo !is null, "struct gdaDataSourceInfo is null on constructor");
132 this.gdaDataSourceInfo = gdaDataSourceInfo;
135 this (ListG glist) {
136 this.gdaDataSourceInfo = cast(GdaDataSourceInfo *) glist.data;
138 char[] name() { return std.string.toString(this.gdaDataSourceInfo.name); }
139 char[] provider() { return std.string.toString(this.gdaDataSourceInfo.provider); }
140 char[] cncString() { return std.string.toString(this.gdaDataSourceInfo.cncString); }
141 char[] description() { return std.string.toString(this.gdaDataSourceInfo.description); }
142 char[] username() { return std.string.toString(this.gdaDataSourceInfo.username); }
143 char[] password() { return std.string.toString(this.gdaDataSourceInfo.password); }
180 * Returns :
182 public static GType infoGetType()
184 // GType gda_data_source_info_get_type (void);
185 return gda_data_source_info_get_type();