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 public import gio.SocketAddressEnumerator; 65 66 67 68 /** 69 * Objects that describe one or more potential socket endpoints 70 * implement GSocketConnectable. Callers can then use 71 * g_socket_connectable_enumerate() to get a GSocketAddressEnumerator 72 * to try out each socket address in turn until one succeeds, as shown 73 * in the sample code below. 74 * 75 * $(DDOC_COMMENT example) 76 */ 77 public template SocketConnectableT(TStruct) 78 { 79 80 /** the main Gtk struct */ 81 protected GSocketConnectable* gSocketConnectable; 82 83 84 /** Get the main Gtk struct */ 85 public GSocketConnectable* getSocketConnectableTStruct() 86 { 87 return cast(GSocketConnectable*)getStruct(); 88 } 89 90 91 /** 92 */ 93 94 /** 95 * Creates a GSocketAddressEnumerator for connectable. 96 * Since 2.22 97 * Returns: a new GSocketAddressEnumerator. [transfer full] 98 */ 99 public SocketAddressEnumerator enumerate() 100 { 101 // GSocketAddressEnumerator * g_socket_connectable_enumerate (GSocketConnectable *connectable); 102 auto p = g_socket_connectable_enumerate(getSocketConnectableTStruct()); 103 104 if(p is null) 105 { 106 return null; 107 } 108 109 return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p); 110 } 111 112 /** 113 * Creates a GSocketAddressEnumerator for connectable that will 114 * return GProxyAddresses for addresses that you must connect 115 * to via a proxy. 116 * If connectable does not implement 117 * g_socket_connectable_proxy_enumerate(), this will fall back to 118 * calling g_socket_connectable_enumerate(). 119 * Since 2.26 120 * Returns: a new GSocketAddressEnumerator. [transfer full] 121 */ 122 public SocketAddressEnumerator proxyEnumerate() 123 { 124 // GSocketAddressEnumerator * g_socket_connectable_proxy_enumerate (GSocketConnectable *connectable); 125 auto p = g_socket_connectable_proxy_enumerate(getSocketConnectableTStruct()); 126 127 if(p is null) 128 { 129 return null; 130 } 131 132 return ObjectG.getDObject!(SocketAddressEnumerator)(cast(GSocketAddressEnumerator*) p); 133 } 134 }