gi-gio-2.0.38: Gio bindings

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.Objects.ProxyAddress

Contents

- Exported types
- Methods
  - getDestinationHostname
  - getDestinationPort
  - getDestinationProtocol
  - getPassword
  - getProtocol
  - getUri
  - getUsername
  - new
- Properties
  - destinationHostname
  - destinationPort
  - destinationProtocol
  - password
  - protocol
  - uri
  - username

Description

A `InetSocketAddress` representing a connection via a proxy server.

Since: 2.26

Synopsis

- newtype ProxyAddress = ProxyAddress (ManagedPtr ProxyAddress)
- class (GObject o, IsDescendantOf ProxyAddress o) => IsProxyAddress o
- toProxyAddress :: (MonadIO m, IsProxyAddress o) => o -> m ProxyAddress
- proxyAddressGetDestinationHostname :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
- proxyAddressGetDestinationPort :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Word16
- proxyAddressGetDestinationProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
- proxyAddressGetPassword :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)
- proxyAddressGetProtocol :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m Text
- proxyAddressGetUri :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)
- proxyAddressGetUsername :: (HasCallStack, MonadIO m, IsProxyAddress a) => a -> m (Maybe Text)
- proxyAddressNew :: (HasCallStack, MonadIO m, IsInetAddress a) => a -> Word16 -> Text -> Text -> Word16 -> Maybe Text -> Maybe Text -> m ProxyAddress
- constructProxyAddressDestinationHostname :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressDestinationHostname :: (MonadIO m, IsProxyAddress o) => o -> m Text
- constructProxyAddressDestinationPort :: (IsProxyAddress o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getProxyAddressDestinationPort :: (MonadIO m, IsProxyAddress o) => o -> m Word32
- constructProxyAddressDestinationProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressDestinationProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text
- constructProxyAddressPassword :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressPassword :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)
- constructProxyAddressProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text
- constructProxyAddressUri :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressUri :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)
- constructProxyAddressUsername :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o)
- getProxyAddressUsername :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text)

# Exported types

newtype ProxyAddress Source #

Memory-managed wrapper type.

Constructors

ProxyAddress (ManagedPtr ProxyAddress) |

#### Instances

Instances details

Eq ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress Methods (==) :: ProxyAddress -> ProxyAddress -> Bool Source # (/=) :: ProxyAddress -> ProxyAddress -> Bool Source #
GObject ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress
ManagedPtrNewtype ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress Methods toManagedPtr :: ProxyAddress -> ManagedPtr ProxyAddress Source #
TypedObject ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress Methods glibType :: IO GType Source #
HasParentTypes ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress
IsGValue (Maybe ProxyAddress) Source # | Convert `ProxyAddress` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gio.Objects.ProxyAddress Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe ProxyAddress -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe ProxyAddress) Source #
type ParentTypes ProxyAddress Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress type ParentTypes ProxyAddress = '[InetSocketAddress, SocketAddress, Object, SocketConnectable]

class (GObject o, IsDescendantOf ProxyAddress o) => IsProxyAddress o Source #

Type class for types which can be safely cast to `ProxyAddress`, for instance with `toProxyAddress`.

#### Instances

Instances details

(GObject o, IsDescendantOf ProxyAddress o) => IsProxyAddress o Source # |
Instance details Defined in GI.Gio.Objects.ProxyAddress

toProxyAddress :: (MonadIO m, IsProxyAddress o) => o -> m ProxyAddress Source #

Cast to `ProxyAddress`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, enumerate, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, proxyEnumerate, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toNative, toString, unref, watchClosure.

#### Getters

getAddress, getData, getDestinationHostname, getDestinationPort, getDestinationProtocol, getFamily, getFlowinfo, getNativeSize, getPassword, getPort, getProperty, getProtocol, getQdata, getScopeId, getUri, getUsername.

#### Setters

setData, setDataFull, setProperty.

## getDestinationHostname

proxyAddressGetDestinationHostname Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m Text | Returns: the `proxy`'s destination hostname

Gets `proxy`'s destination hostname; that is, the name of the host that will be connected to via the proxy, not the name of the proxy itself.

Since: 2.26

## getDestinationPort

proxyAddressGetDestinationPort Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m Word16 | Returns: the `proxy`'s destination port

Gets `proxy`'s destination port; that is, the port on the destination host that will be connected to via the proxy, not the port number of the proxy itself.

Since: 2.26

## getDestinationProtocol

proxyAddressGetDestinationProtocol Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m Text | Returns: the `proxy`'s destination protocol

Gets the protocol that is being spoken to the destination server; eg, "http" or "ftp".

Since: 2.34

## getPassword

proxyAddressGetPassword Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m (Maybe Text) | Returns: the `proxy`'s password

Gets `proxy`'s password.

Since: 2.26

## getProtocol

proxyAddressGetProtocol Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m Text | Returns: the `proxy`'s protocol

Gets `proxy`'s protocol. eg, "socks" or "http"

Since: 2.26

## getUri

proxyAddressGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m (Maybe Text) | Returns: the `proxy`'s URI, or `Nothing` if unknown

Gets the proxy URI that `proxy` was constructed from.

Since: 2.34

## getUsername

proxyAddressGetUsername Source #

Arguments

:: (HasCallStack, MonadIO m, IsProxyAddress a) |
=> a | `proxy`: a `ProxyAddress`
-> m (Maybe Text) | Returns: the `proxy`'s username

Gets `proxy`'s username.

Since: 2.26

## new

proxyAddressNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsInetAddress a) |
=> a | `inetaddr`: The proxy server `InetAddress`.
-> Word16 | `port`: The proxy server port.
-> Text | `protocol`: The proxy protocol to support, in lower case (e.g. socks, http).
-> Text | `destHostname`: The destination hostname the proxy should tunnel to.
-> Word16 | `destPort`: The destination port to tunnel to.
-> Maybe Text | `username`: The username to authenticate to the proxy server (or `Nothing`).
-> Maybe Text | `password`: The password to authenticate to the proxy server (or `Nothing`).
-> m ProxyAddress | Returns: a new `ProxyAddress`

Creates a new `ProxyAddress` for `inetaddr` with `protocol` that should tunnel through `destHostname` and `destPort`.

(Note that this method doesn't set the ProxyAddress:uri or ProxyAddress:destinationProtocol fields; use `g_object_new()` directly if you want to set those.)

Since: 2.26

# Properties

## destinationHostname

The proxy destination hostname.

Since: 2.26

constructProxyAddressDestinationHostname :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`destination-hostname`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressDestinationHostname :: (MonadIO m, IsProxyAddress o) => o -> m Text Source #

Get the value of the “`destination-hostname`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #destinationHostname

## destinationPort

The proxy destination port.

Since: 2.26

constructProxyAddressDestinationPort :: (IsProxyAddress o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`destination-port`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressDestinationPort :: (MonadIO m, IsProxyAddress o) => o -> m Word32 Source #

Get the value of the “`destination-port`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #destinationPort

## destinationProtocol

The protocol being spoke to the destination host, or `Nothing` if the `ProxyAddress` doesn't know.

Since: 2.34

constructProxyAddressDestinationProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`destination-protocol`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressDestinationProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text Source #

Get the value of the “`destination-protocol`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #destinationProtocol

## password

The proxy password.

Since: 2.26

constructProxyAddressPassword :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`password`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressPassword :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text) Source #

Get the value of the “`password`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #password

## protocol

The proxy protocol.

Since: 2.26

constructProxyAddressProtocol :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`protocol`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressProtocol :: (MonadIO m, IsProxyAddress o) => o -> m Text Source #

Get the value of the “`protocol`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #protocol

## uri

The URI string that the proxy was constructed from (or `Nothing` if the creator didn't specify this).

Since: 2.34

constructProxyAddressUri :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`uri`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressUri :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text) Source #

Get the value of the “`uri`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #uri

## username

The proxy username.

Since: 2.26

constructProxyAddressUsername :: (IsProxyAddress o, MonadIO m) => Text -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`username`” property. This is rarely needed directly, but it is used by `new`.

getProxyAddressUsername :: (MonadIO m, IsProxyAddress o) => o -> m (Maybe Text) Source #

Get the value of the “`username`” property. When overloading is enabled, this is equivalent to

    get proxyAddress #username