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 * 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 public class ProviderInfo 77 { 78 79 /** the main Gtk struct */ 80 protected GdaProviderInfo* gdaProviderInfo; 81 82 83 public GdaProviderInfo* getProviderInfoStruct() 84 { 85 return gdaProviderInfo; 86 } 87 88 89 /** the main Gtk struct as a void* */ 90 protected void* getStruct() 91 { 92 return cast(void*)gdaProviderInfo; 93 } 94 95 /** 96 * Sets our main struct and passes it to the parent class 97 */ 98 public this (GdaProviderInfo* gdaProviderInfo) 99 { 100 this.gdaProviderInfo = gdaProviderInfo; 101 } 102 103 /** */ 104 this (ListG glist) { 105 this.gdaProviderInfo = cast(GdaProviderInfo *) glist.data; 106 } 107 /** */ 108 string id() { return Str.toString(this.gdaProviderInfo.id); } 109 /** */ 110 string location() { return Str.toString(this.gdaProviderInfo.location); } 111 /** */ 112 string description() { return Str.toString(this.gdaProviderInfo.description); } 113 /** */ 114 ListG gda_params() { return new ListG(this.gdaProviderInfo.gdaParams); } 115 116 /** 117 */ 118 119 /** 120 * Returns: 121 */ 122 public static GType infoGetType() 123 { 124 // GType gda_provider_info_get_type (void); 125 return gda_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 public ProviderInfo infoCopy() 133 { 134 // GdaProviderInfo* gda_provider_info_copy (GdaProviderInfo *src); 135 auto p = gda_provider_info_copy(gdaProviderInfo); 136 137 if(p is null) 138 { 139 return null; 140 } 141 142 return ObjectG.getDObject!(ProviderInfo)(cast(GdaProviderInfo*) p); 143 } 144 145 /** 146 * Deallocates all memory associated to the given GdaProviderInfo. 147 */ 148 public void infoFree() 149 { 150 // void gda_provider_info_free (GdaProviderInfo *provider_info); 151 gda_provider_info_free(gdaProviderInfo); 152 } 153 }