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