| 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 |
|
|---|
| 63 |
|
|---|
| 64 |
public import gio.SocketAddressEnumerator; |
|---|
| 65 |
|
|---|
| 66 |
|
|---|
| 67 |
|
|---|
| 68 |
|
|---|
| 69 |
/** |
|---|
| 70 |
* Description |
|---|
| 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 |
* $(DDOC_COMMENT example) |
|---|
| 77 |
*/ |
|---|
| 78 |
public template SocketConnectableT(TStruct) |
|---|
| 79 |
{ |
|---|
| 80 |
|
|---|
| 81 |
/** the main Gtk struct */ |
|---|
| 82 |
protected GSocketConnectable* gSocketConnectable; |
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 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 |
if(p is null) |
|---|
| 104 |
{ |
|---|
| 105 |
return null; |
|---|
| 106 |
} |
|---|
| 107 |
return new SocketAddressEnumerator(cast(GSocketAddressEnumerator*) p); |
|---|
| 108 |
} |
|---|
| 109 |
|
|---|
| 110 |
/** |
|---|
| 111 |
* Creates a GSocketAddressEnumerator for connectable that will |
|---|
| 112 |
* return GProxyAddresses for addresses that you must connect |
|---|
| 113 |
* to via a proxy. |
|---|
| 114 |
* If connectable does not implement |
|---|
| 115 |
* g_socket_connectable_proxy_enumerate(), this will fall back to |
|---|
| 116 |
* calling g_socket_connectable_enumerate(). |
|---|
| 117 |
* Since 2.26 |
|---|
| 118 |
* Returns: a new GSocketAddressEnumerator. [transfer full] |
|---|
| 119 |
*/ |
|---|
| 120 |
public SocketAddressEnumerator proxyEnumerate() |
|---|
| 121 |
{ |
|---|
| 122 |
// GSocketAddressEnumerator * g_socket_connectable_proxy_enumerate (GSocketConnectable *connectable); |
|---|
| 123 |
auto p = g_socket_connectable_proxy_enumerate(getSocketConnectableTStruct()); |
|---|
| 124 |
if(p is null) |
|---|
| 125 |
{ |
|---|
| 126 |
return null; |
|---|
| 127 |
} |
|---|
| 128 |
return new SocketAddressEnumerator(cast(GSocketAddressEnumerator*) p); |
|---|
| 129 |
} |
|---|
| 130 |
} |
|---|