Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Interfaces.ProxyResolver
Description
GProxyResolver
provides synchronous and asynchronous network proxy
resolution. GProxyResolver
is used within SocketClient
through
the method socketConnectableProxyEnumerate
.
Implementations of GProxyResolver
based on
libproxy and GNOME settings can be
found in glib-networking.
GIO comes with an implementation for use inside Flatpak portals.
Since: 2.26
Synopsis
- newtype ProxyResolver = ProxyResolver (ManagedPtr ProxyResolver)
- class (GObject o, IsDescendantOf ProxyResolver o) => IsProxyResolver o
- toProxyResolver :: (MonadIO m, IsProxyResolver o) => o -> m ProxyResolver
- type family ResolveProxyResolverMethod (t :: Symbol) o where ...
- proxyResolverGetDefault :: (HasCallStack, MonadIO m) => m ProxyResolver
- data ProxyResolverIsSupportedMethodInfo
- proxyResolverIsSupported :: (HasCallStack, MonadIO m, IsProxyResolver a) => a -> m Bool
- data ProxyResolverLookupMethodInfo
- proxyResolverLookup :: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) => a -> Text -> Maybe b -> m [Text]
- data ProxyResolverLookupAsyncMethodInfo
- proxyResolverLookupAsync :: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) => a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- data ProxyResolverLookupFinishMethodInfo
- proxyResolverLookupFinish :: (HasCallStack, MonadIO m, IsProxyResolver a, IsAsyncResult b) => a -> b -> m [Text]
Exported types
newtype ProxyResolver Source #
Memory-managed wrapper type.
Constructors
ProxyResolver (ManagedPtr ProxyResolver) |
Instances
class (GObject o, IsDescendantOf ProxyResolver o) => IsProxyResolver o Source #
Type class for types which can be safely cast to ProxyResolver
, for instance with toProxyResolver
.
Instances
(GObject o, IsDescendantOf ProxyResolver o) => IsProxyResolver o Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver |
toProxyResolver :: (MonadIO m, IsProxyResolver o) => o -> m ProxyResolver Source #
Cast to ProxyResolver
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, isSupported, lookup, lookupAsync, lookupFinish, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata.
Setters
type family ResolveProxyResolverMethod (t :: Symbol) o where ... Source #
Equations
getDefault
proxyResolverGetDefault Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> m ProxyResolver | Returns: the default |
Gets the default ProxyResolver
for the system.
Since: 2.26
isSupported
data ProxyResolverIsSupportedMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsProxyResolver a) => OverloadedMethod ProxyResolverIsSupportedMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ProxyResolverIsSupportedMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods |
proxyResolverIsSupported Source #
Arguments
:: (HasCallStack, MonadIO m, IsProxyResolver a) | |
=> a |
|
-> m Bool | Returns: |
Checks if resolver
can be used on this system. (This is used
internally; proxyResolverGetDefault
will only return a proxy
resolver that returns True
for this method.)
Since: 2.26
lookup
data ProxyResolverLookupMethodInfo Source #
Instances
(signature ~ (Text -> Maybe b -> m [Text]), MonadIO m, IsProxyResolver a, IsCancellable b) => OverloadedMethod ProxyResolverLookupMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ProxyResolverLookupMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods |
Arguments
:: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m [Text] | Returns: A
NULL-terminated array of proxy URIs. Must be freed
with |
Looks into the system proxy configuration to determine what proxy,
if any, to use to connect to uri
. The returned proxy URIs are of
the form <protocol>://[user[:password]@]host[:port]
or
direct://
, where <protocol>
could be http, rtsp, socks
or other proxying protocol.
If you don't know what network protocol is being used on the
socket, you should use none
as the URI protocol.
In this case, the resolver might still return a generic proxy type
(such as SOCKS), but would not return protocol-specific proxy types
(such as http).
direct://
is used when no proxy is needed.
Direct connection should not be attempted unless it is part of the
returned array of proxies.
Since: 2.26
lookupAsync
data ProxyResolverLookupAsyncMethodInfo Source #
Instances
(signature ~ (Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()), MonadIO m, IsProxyResolver a, IsCancellable b) => OverloadedMethod ProxyResolverLookupAsyncMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ProxyResolverLookupAsyncMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods |
proxyResolverLookupAsync Source #
Arguments
:: (HasCallStack, MonadIO m, IsProxyResolver a, IsCancellable b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Asynchronous lookup of proxy. See proxyResolverLookup
for more
details.
Since: 2.26
lookupFinish
data ProxyResolverLookupFinishMethodInfo Source #
Instances
(signature ~ (b -> m [Text]), MonadIO m, IsProxyResolver a, IsAsyncResult b) => OverloadedMethod ProxyResolverLookupFinishMethodInfo a signature Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo ProxyResolverLookupFinishMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Interfaces.ProxyResolver Methods |
proxyResolverLookupFinish Source #
Arguments
:: (HasCallStack, MonadIO m, IsProxyResolver a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m [Text] | Returns: A
NULL-terminated array of proxy URIs. Must be freed
with |
Call this function to obtain the array of proxy URIs when
proxyResolverLookupAsync
is complete. See
proxyResolverLookup
for more details.
Since: 2.26