| 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.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
- newtype NetworkService = NetworkService (ManagedPtr NetworkService)
- class (GObject o, IsDescendantOf NetworkService o) => IsNetworkService o
- toNetworkService :: (MonadIO m, IsNetworkService o) => o -> m NetworkService
- type family ResolveNetworkServiceMethod (t :: Symbol) o where ...
- data NetworkServiceGetDomainMethodInfo
- networkServiceGetDomain :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
- data NetworkServiceGetProtocolMethodInfo
- networkServiceGetProtocol :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
- data NetworkServiceGetSchemeMethodInfo
- networkServiceGetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
- data NetworkServiceGetServiceMethodInfo
- networkServiceGetService :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> m Text
- networkServiceNew :: (HasCallStack, MonadIO m) => Text -> Text -> Text -> m NetworkService
- data NetworkServiceSetSchemeMethodInfo
- networkServiceSetScheme :: (HasCallStack, MonadIO m, IsNetworkService a) => a -> Text -> m ()
- data NetworkServiceDomainPropertyInfo
- constructNetworkServiceDomain :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)
- getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceDomain :: AttrLabelProxy "domain"
- data NetworkServiceProtocolPropertyInfo
- constructNetworkServiceProtocol :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)
- getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceProtocol :: AttrLabelProxy "protocol"
- data NetworkServiceSchemePropertyInfo
- constructNetworkServiceScheme :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)
- getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceScheme :: AttrLabelProxy "scheme"
- setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m ()
- data NetworkServiceServicePropertyInfo
- constructNetworkServiceService :: (IsNetworkService o, MonadIO m) => Text -> m (GValueConstruct o)
- getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceService :: AttrLabelProxy "service"
Exported types
newtype NetworkService Source #
Memory-managed wrapper type.
Constructors
| NetworkService (ManagedPtr NetworkService) |
Instances
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
| (GObject o, IsDescendantOf NetworkService o) => IsNetworkService o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, enumerate, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, proxyEnumerate, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toString, unref, watchClosure.
Getters
getData, getDomain, getProperty, getProtocol, getQdata, getScheme, getService.
Setters
type family ResolveNetworkServiceMethod (t :: Symbol) o where ... Source #
Equations
getDomain
data NetworkServiceGetDomainMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsNetworkService a) => OverloadedMethod NetworkServiceGetDomainMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.NetworkService Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo NetworkServiceGetDomainMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.NetworkService Methods | |
networkServiceGetDomain Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> m Text | Returns: |
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
data NetworkServiceGetProtocolMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsNetworkService a) => OverloadedMethod NetworkServiceGetProtocolMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.NetworkService Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo NetworkServiceGetProtocolMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.NetworkService Methods | |
networkServiceGetProtocol Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> m Text | Returns: |
Gets srv's protocol name (eg, "tcp").
Since: 2.22
getScheme
data NetworkServiceGetSchemeMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsNetworkService a) => OverloadedMethod NetworkServiceGetSchemeMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.NetworkService Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo NetworkServiceGetSchemeMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.NetworkService Methods | |
networkServiceGetScheme Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> m Text | Returns: |
Gets the URI scheme used to resolve proxies. By default, the service name is used as scheme.
Since: 2.26
getService
data NetworkServiceGetServiceMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsNetworkService a) => OverloadedMethod NetworkServiceGetServiceMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.NetworkService Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo NetworkServiceGetServiceMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.NetworkService Methods | |
networkServiceGetService Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> m Text | Returns: |
Gets srv's service name (eg, "ldap").
Since: 2.22
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> Text |
|
| -> Text |
|
| -> m NetworkService | Returns: a new |
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
data NetworkServiceSetSchemeMethodInfo Source #
Instances
| (signature ~ (Text -> m ()), MonadIO m, IsNetworkService a) => OverloadedMethod NetworkServiceSetSchemeMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.NetworkService Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo NetworkServiceSetSchemeMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.NetworkService Methods | |
networkServiceSetScheme Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> Text |
|
| -> 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
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
networkServiceDomain :: AttrLabelProxy "domain" Source #
protocol
Network protocol, for example tcp.
Since: 2.22
data NetworkServiceProtocolPropertyInfo Source #
Instances
| AttrInfo NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService Associated Types
Methods attrGet :: AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo o => o -> IO (AttrGetType NetworkServiceProtocolPropertyInfo) # attrSet :: (AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo o, AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo o, AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo o, AttrTransferTypeConstraint NetworkServiceProtocolPropertyInfo b) => Proxy o -> b -> IO (AttrTransferType NetworkServiceProtocolPropertyInfo) # | |||||||||||||||||||||||||||||||||
| type AttrAllowedOps NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrGetType NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrLabel NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrOrigin NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrTransferType NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrTransferTypeConstraint NetworkServiceProtocolPropertyInfo Source # | |||||||||||||||||||||||||||||||||
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
networkServiceProtocol :: AttrLabelProxy "protocol" Source #
scheme
Network scheme (default is to use service).
Since: 2.22
data NetworkServiceSchemePropertyInfo Source #
Instances
| AttrInfo NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService Associated Types
Methods attrGet :: AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo o => o -> IO (AttrGetType NetworkServiceSchemePropertyInfo) # attrSet :: (AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo o, AttrSetTypeConstraint NetworkServiceSchemePropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo o, AttrSetTypeConstraint NetworkServiceSchemePropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo o, AttrTransferTypeConstraint NetworkServiceSchemePropertyInfo b) => Proxy o -> b -> IO (AttrTransferType NetworkServiceSchemePropertyInfo) # | |||||||||||||||||||||||||||||||||
| type AttrAllowedOps NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrGetType NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrLabel NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrOrigin NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrSetTypeConstraint NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrTransferType NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrTransferTypeConstraint NetworkServiceSchemePropertyInfo Source # | |||||||||||||||||||||||||||||||||
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
networkServiceScheme :: AttrLabelProxy "scheme" Source #
setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m () Source #
Set the value of the “scheme” property.
When overloading is enabled, this is equivalent to
setnetworkService [ #scheme:=value ]
service
Service name, for example ldap.
Since: 2.22
data NetworkServiceServicePropertyInfo Source #
Instances
| AttrInfo NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService Associated Types
Methods attrGet :: AttrBaseTypeConstraint NetworkServiceServicePropertyInfo o => o -> IO (AttrGetType NetworkServiceServicePropertyInfo) # attrSet :: (AttrBaseTypeConstraint NetworkServiceServicePropertyInfo o, AttrSetTypeConstraint NetworkServiceServicePropertyInfo b) => o -> b -> IO () # attrClear :: AttrBaseTypeConstraint NetworkServiceServicePropertyInfo o => o -> IO () # attrConstruct :: (AttrBaseTypeConstraint NetworkServiceServicePropertyInfo o, AttrSetTypeConstraint NetworkServiceServicePropertyInfo b) => b -> IO (GValueConstruct o) # attrTransfer :: (AttrBaseTypeConstraint NetworkServiceServicePropertyInfo o, AttrTransferTypeConstraint NetworkServiceServicePropertyInfo b) => Proxy o -> b -> IO (AttrTransferType NetworkServiceServicePropertyInfo) # | |||||||||||||||||||||||||||||||||
| type AttrAllowedOps NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrBaseTypeConstraint NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrGetType NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrLabel NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrOrigin NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
| type AttrSetTypeConstraint NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrTransferType NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
Defined in GI.Gio.Objects.NetworkService | |||||||||||||||||||||||||||||||||
| type AttrTransferTypeConstraint NetworkServiceServicePropertyInfo Source # | |||||||||||||||||||||||||||||||||
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
networkServiceService :: AttrLabelProxy "service" Source #