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 change21 // find conversion definition on APILookup.txt22 // implement new conversion functionalities on the wrap.utils pakage23 24 /*
25 * Conversion parameters:
26 * inFile =
27 * outPack = gda
28 * outFile = ProviderInfo
29 * strct = GdaProviderInfo
30 * realStrct=
31 * ctorStrct=
32 * clss = ProviderInfo
33 * interf =
34 * class Code: Yes
35 * interface Code: No
36 * template for:
37 * extend =
38 * implements:
39 * prefixes:
40 * - gda_provider_
41 * omit structs:
42 * omit prefixes:
43 * omit code:
44 * omit signals:
45 * imports:
46 * - glib.Str
47 * - glib.ListG
48 * structWrap:
49 * - GdaProviderInfo* -> ProviderInfo
50 * module aliases:
51 * local aliases:
52 * overrides:
53 */54 55 modulegda.ProviderInfo;
56 57 publicimportgdac.gdatypes;
58 59 privateimportgdac.gda;
60 privateimportglib.ConstructionException;
61 privateimportgobject.ObjectG;
62 63 64 privateimportglib.Str;
65 privateimportglib.ListG;
66 67 68 69 70 /**
71 * Description
72 * The functions in this section allow applications an easy access to the libgda
73 * configuration, thus making them able to access the list of data sources
74 * configured in the system, for instance.
75 */76 publicclassProviderInfo77 {
78 79 /** the main Gtk struct */80 protectedGdaProviderInfo* gdaProviderInfo;
81 82 83 publicGdaProviderInfo* getProviderInfoStruct()
84 {
85 returngdaProviderInfo;
86 }
87 88 89 /** the main Gtk struct as a void* */90 protectedvoid* getStruct()
91 {
92 returncast(void*)gdaProviderInfo;
93 }
94 95 /**
96 * Sets our main struct and passes it to the parent class
97 */98 publicthis (GdaProviderInfo* gdaProviderInfo)
99 {
100 this.gdaProviderInfo = gdaProviderInfo;
101 }
102 103 /** */104 this (ListGglist) {
105 this.gdaProviderInfo = cast(GdaProviderInfo *) glist.data;
106 }
107 /** */108 stringid() { returnStr.toString(this.gdaProviderInfo.id); }
109 /** */110 stringlocation() { returnStr.toString(this.gdaProviderInfo.location); }
111 /** */112 stringdescription() { returnStr.toString(this.gdaProviderInfo.description); }
113 /** */114 ListGgda_params() { returnnewListG(this.gdaProviderInfo.gdaParams); }
115 116 /**
117 */118 119 /**
120 * Returns:
121 */122 publicstaticGTypeinfoGetType()
123 {
124 // GType gda_provider_info_get_type (void);125 returngda_provider_info_get_type();
126 }
127 128 /**
129 * Creates a new GdaProviderInfo structure from an existing one.
130 * Returns: a newly allocated GdaProviderInfo with contains a copy of information in src.
131 */132 publicProviderInfoinfoCopy()
133 {
134 // GdaProviderInfo* gda_provider_info_copy (GdaProviderInfo *src);135 autop = gda_provider_info_copy(gdaProviderInfo);
136 137 if(pisnull)
138 {
139 returnnull;
140 }
141 142 returnObjectG.getDObject!(ProviderInfo)(cast(GdaProviderInfo*) p);
143 }
144 145 /**
146 * Deallocates all memory associated to the given GdaProviderInfo.
147 */148 publicvoidinfoFree()
149 {
150 // void gda_provider_info_free (GdaProviderInfo *provider_info);151 gda_provider_info_free(gdaProviderInfo);
152 }
153 }