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  = GSocketConnectable.html
27  * outPack = gio
28  * outFile = SocketConnectableT
29  * strct   = GSocketConnectable
30  * realStrct=
31  * ctorStrct=
32  * clss    = SocketConnectableT
33  * interf  = SocketConnectableIF
34  * class Code: No
35  * interface Code: No
36  * template for:
37  * 	- TStruct
38  * extend  = 
39  * implements:
40  * prefixes:
41  * 	- g_socket_connectable_
42  * omit structs:
43  * omit prefixes:
44  * 	- g_socket_address_enumerator_
45  * omit code:
46  * omit signals:
47  * imports:
48  * 	- gio.SocketAddressEnumerator
49  * structWrap:
50  * 	- GSocketAddressEnumerator* -> SocketAddressEnumerator
51  * module aliases:
52  * local aliases:
53  * overrides:
54  */
55 
56 module gio.SocketConnectableT;
57 
58 public  import gtkc.giotypes;
59 
60 public import gtkc.gio;
61 public import glib.ConstructionException;
62 public import gobject.ObjectG;
63 
64 
65 public import gio.SocketAddressEnumerator;
66 
67 
68 
69 
70 /**
71  * Objects that describe one or more potential socket endpoints
72  * implement GSocketConnectable. Callers can then use
73  * g_socket_connectable_enumerate() to get a GSocketAddressEnumerator
74  * to try out each socket address in turn until one succeeds, as shown
75  * in the sample code below.
76  *
77  * $(DDOC_COMMENT example)
78  */
79 public template SocketConnectableT(TStruct)
80 {
81 	
82 	/** the main Gtk struct */
83 	protected GSocketConnectable* gSocketConnectable;
84 	
85 	
86 	public GSocketConnectable* getSocketConnectableTStruct()
87 	{
88 		return cast(GSocketConnectable*)getStruct();
89 	}
90 	
91 	
92 	/**
93 	 */
94 	
95 	/**
96 	 * Creates a GSocketAddressEnumerator for connectable.
97 	 * Since 2.22
98 	 * Returns: a new GSocketAddressEnumerator. [transfer full]
99 	 */
100 	public SocketAddressEnumerator enumerate()
101 	{
102 		// GSocketAddressEnumerator * g_socket_connectable_enumerate  (GSocketConnectable *connectable);
103 		auto p = g_socket_connectable_enumerate(getSocketConnectableTStruct());
104 		
105 		if(p is null)
106 		{
107 			return null;
108 		}
109 		
110 		return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p);
111 	}
112 	
113 	/**
114 	 * Creates a GSocketAddressEnumerator for connectable that will
115 	 * return GProxyAddresses for addresses that you must connect
116 	 * to via a proxy.
117 	 * If connectable does not implement
118 	 * g_socket_connectable_proxy_enumerate(), this will fall back to
119 	 * calling g_socket_connectable_enumerate().
120 	 * Since 2.26
121 	 * Returns: a new GSocketAddressEnumerator. [transfer full]
122 	 */
123 	public SocketAddressEnumerator proxyEnumerate()
124 	{
125 		// GSocketAddressEnumerator * g_socket_connectable_proxy_enumerate  (GSocketConnectable *connectable);
126 		auto p = g_socket_connectable_proxy_enumerate(getSocketConnectableTStruct());
127 		
128 		if(p is null)
129 		{
130 			return null;
131 		}
132 		
133 		return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p);
134 	}
135 }