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 /* 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 module gda.ProviderInfo; 56 57 public import gdac.gdatypes; 58 59 private import gdac.gda; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import glib.Str; 65 private import glib.ListG; 66 67 68 69 70 /** 71 * The functions in this section allow applications an easy access to the libgda 72 * configuration, thus making them able to access the list of data sources 73 * configured in the system, for instance. 74 */ 75 public class ProviderInfo 76 { 77 78 /** the main Gtk struct */ 79 protected GdaProviderInfo* gdaProviderInfo; 80 81 82 public GdaProviderInfo* getProviderInfoStruct() 83 { 84 return gdaProviderInfo; 85 } 86 87 88 /** the main Gtk struct as a void* */ 89 protected void* getStruct() 90 { 91 return cast(void*)gdaProviderInfo; 92 } 93 94 /** 95 * Sets our main struct and passes it to the parent class 96 */ 97 public this (GdaProviderInfo* gdaProviderInfo) 98 { 99 this.gdaProviderInfo = gdaProviderInfo; 100 } 101 102 /** */ 103 this (ListG glist) { 104 this.gdaProviderInfo = cast(GdaProviderInfo *) glist.data(); 105 } 106 /** */ 107 string id() { return Str.toString(this.gdaProviderInfo.id); } 108 /** */ 109 string location() { return Str.toString(this.gdaProviderInfo.location); } 110 /** */ 111 string description() { return Str.toString(this.gdaProviderInfo.description); } 112 /** */ 113 ListG gda_params() { return new ListG(this.gdaProviderInfo.gdaParams); } 114 115 /** 116 */ 117 118 /** 119 * Returns: 120 */ 121 public static GType infoGetType() 122 { 123 // GType gda_provider_info_get_type (void); 124 return gda_provider_info_get_type(); 125 } 126 127 /** 128 * Creates a new GdaProviderInfo structure from an existing one. 129 * Returns: a newly allocated GdaProviderInfo with contains a copy of information in src. 130 */ 131 public ProviderInfo infoCopy() 132 { 133 // GdaProviderInfo* gda_provider_info_copy (GdaProviderInfo *src); 134 auto p = gda_provider_info_copy(gdaProviderInfo); 135 136 if(p is null) 137 { 138 return null; 139 } 140 141 return ObjectG.getDObject!(ProviderInfo)(cast(GdaProviderInfo*) p); 142 } 143 144 /** 145 * Deallocates all memory associated to the given GdaProviderInfo. 146 */ 147 public void infoFree() 148 { 149 // void gda_provider_info_free (GdaProviderInfo *provider_info); 150 gda_provider_info_free(gdaProviderInfo); 151 } 152 }