gi-gio
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellNone
LanguageHaskell2010

GI.Gio.Objects.NetworkService

Description

Like NetworkAddress does with hostnames, GNetworkService provides an easy way to resolve a SRV record, and then attempt to connect to one of the hosts that implements that service, handling service priority/weighting, multiple IP addresses, and multiple address families.

See SrvTarget for more information about SRV records, and see SocketConnectable for an example of using the connectable interface.

Synopsis

Exported types

newtype NetworkService Source #

Memory-managed wrapper type.

Instances

Instances details
Eq NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

GObject NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

ManagedPtrNewtype NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

TypedObject NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

Methods

glibType :: IO GType #

HasParentTypes NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

HasAttributeList NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

(info ~ ResolveNetworkServiceMethod t NetworkService, OverloadedMethod info NetworkService p, HasField t NetworkService p) => HasField (t :: Symbol) NetworkService (p :: Type) Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

Methods

getField :: NetworkService -> p #

(info ~ ResolveNetworkServiceMethod t NetworkService, OverloadedMethodInfo info NetworkService) => IsLabel t (MethodProxy info NetworkService) Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

(info ~ ResolveNetworkServiceMethod t NetworkService, OverloadedMethod info NetworkService p) => IsLabel t (NetworkService -> p) Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

Methods

fromLabel :: NetworkService -> p #

IsGValue (Maybe NetworkService) Source #

Convert NetworkService to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Gio.Objects.NetworkService

type AttributeList NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type ParentTypes NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type SignalList NetworkService Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

class (GObject o, IsDescendantOf NetworkService o) => IsNetworkService o Source #

Type class for types which can be safely cast to NetworkService, for instance with toNetworkService.

Instances

Instances details
(GObject o, IsDescendantOf NetworkService o) => IsNetworkService o Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

toNetworkService :: (MonadIO m, IsNetworkService o) => o -> m NetworkService Source #

Cast to NetworkService, for types for which this is known to be safe. For general casts, use castTo.

Methods

type family ResolveNetworkServiceMethod (t :: Symbol) o where ... Source #

Equations

ResolveNetworkServiceMethod "bindProperty" o = ObjectBindPropertyMethodInfo 
ResolveNetworkServiceMethod "bindPropertyFull" o = ObjectBindPropertyFullMethodInfo 
ResolveNetworkServiceMethod "enumerate" o = SocketConnectableEnumerateMethodInfo 
ResolveNetworkServiceMethod "forceFloating" o = ObjectForceFloatingMethodInfo 
ResolveNetworkServiceMethod "freezeNotify" o = ObjectFreezeNotifyMethodInfo 
ResolveNetworkServiceMethod "getv" o = ObjectGetvMethodInfo 
ResolveNetworkServiceMethod "isFloating" o = ObjectIsFloatingMethodInfo 
ResolveNetworkServiceMethod "notify" o = ObjectNotifyMethodInfo 
ResolveNetworkServiceMethod "notifyByPspec" o = ObjectNotifyByPspecMethodInfo 
ResolveNetworkServiceMethod "proxyEnumerate" o = SocketConnectableProxyEnumerateMethodInfo 
ResolveNetworkServiceMethod "ref" o = ObjectRefMethodInfo 
ResolveNetworkServiceMethod "refSink" o = ObjectRefSinkMethodInfo 
ResolveNetworkServiceMethod "runDispose" o = ObjectRunDisposeMethodInfo 
ResolveNetworkServiceMethod "stealData" o = ObjectStealDataMethodInfo 
ResolveNetworkServiceMethod "stealQdata" o = ObjectStealQdataMethodInfo 
ResolveNetworkServiceMethod "thawNotify" o = ObjectThawNotifyMethodInfo 
ResolveNetworkServiceMethod "toString" o = SocketConnectableToStringMethodInfo 
ResolveNetworkServiceMethod "unref" o = ObjectUnrefMethodInfo 
ResolveNetworkServiceMethod "watchClosure" o = ObjectWatchClosureMethodInfo 
ResolveNetworkServiceMethod "getData" o = ObjectGetDataMethodInfo 
ResolveNetworkServiceMethod "getDomain" o = NetworkServiceGetDomainMethodInfo 
ResolveNetworkServiceMethod "getProperty" o = ObjectGetPropertyMethodInfo 
ResolveNetworkServiceMethod "getProtocol" o = NetworkServiceGetProtocolMethodInfo 
ResolveNetworkServiceMethod "getQdata" o = ObjectGetQdataMethodInfo 
ResolveNetworkServiceMethod "getScheme" o = NetworkServiceGetSchemeMethodInfo 
ResolveNetworkServiceMethod "getService" o = NetworkServiceGetServiceMethodInfo 
ResolveNetworkServiceMethod "setData" o = ObjectSetDataMethodInfo 
ResolveNetworkServiceMethod "setDataFull" o = ObjectSetDataFullMethodInfo 
ResolveNetworkServiceMethod "setProperty" o = ObjectSetPropertyMethodInfo 
ResolveNetworkServiceMethod "setScheme" o = NetworkServiceSetSchemeMethodInfo 
ResolveNetworkServiceMethod l o = MethodResolutionFailed l o :: Type 

getDomain

networkServiceGetDomain Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's domain name

Gets the domain that srv serves. This might be either UTF-8 or ASCII-encoded, depending on what srv was created with.

Since: 2.22

getProtocol

networkServiceGetProtocol Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's protocol name

Gets srv's protocol name (eg, "tcp").

Since: 2.22

getScheme

networkServiceGetScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's scheme name

Gets the URI scheme used to resolve proxies. By default, the service name is used as scheme.

Since: 2.26

getService

networkServiceGetService Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> m Text

Returns: srv's service name

Gets srv's service name (eg, "ldap").

Since: 2.22

new

networkServiceNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

service: the service type to look up (eg, "ldap")

-> Text

protocol: the networking protocol to use for service (eg, "tcp")

-> Text

domain: the DNS domain to look up the service in

-> m NetworkService

Returns: a new NetworkService

Creates a new NetworkService representing the given service, protocol, and domain. This will initially be unresolved; use the SocketConnectable interface to resolve it.

Since: 2.22

setScheme

networkServiceSetScheme Source #

Arguments

:: (HasCallStack, MonadIO m, IsNetworkService a) 
=> a

srv: a NetworkService

-> Text

scheme: a URI scheme

-> m () 

Set's the URI scheme used to resolve proxies. By default, the service name is used as scheme.

Since: 2.26

Properties

domain

Network domain, for example example.com.

Since: 2.22

data NetworkServiceDomainPropertyInfo Source #

Instances

Instances details
AttrInfo NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrAllowedOps NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceDomainPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

constructNetworkServiceDomain :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text Source #

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

get networkService #domain

protocol

Network protocol, for example tcp.

Since: 2.22

data NetworkServiceProtocolPropertyInfo Source #

Instances

Instances details
AttrInfo NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

Associated Types

type AttrAllowedOps NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceProtocolPropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrAllowedOps NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceProtocolPropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

constructNetworkServiceProtocol :: (IsNetworkService 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.

getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text Source #

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

get networkService #protocol

scheme

Network scheme (default is to use service).

Since: 2.22

data NetworkServiceSchemePropertyInfo Source #

Instances

Instances details
AttrInfo NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrAllowedOps NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceSchemePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

constructNetworkServiceScheme :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text Source #

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

get networkService #scheme

setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m () Source #

Set the value of the “scheme” property. When overloading is enabled, this is equivalent to

set networkService [ #scheme := value ]

service

Service name, for example ldap.

Since: 2.22

data NetworkServiceServicePropertyInfo Source #

Instances

Instances details
AttrInfo NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

Associated Types

type AttrAllowedOps NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceServicePropertyInfo 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrAllowedOps NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrBaseTypeConstraint NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrGetType NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrLabel NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrOrigin NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrSetTypeConstraint NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferType NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

type AttrTransferTypeConstraint NetworkServiceServicePropertyInfo Source # 
Instance details

Defined in GI.Gio.Objects.NetworkService

constructNetworkServiceService :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text Source #

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

get networkService #service