| Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Gio.Objects.NetworkService
Contents
Description
Like NetworkAddress does with hostnames, NetworkService
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 and example of using the connectable
interface.
- newtype NetworkService = NetworkService (ManagedPtr NetworkService)
- class GObject o => IsNetworkService o
- toNetworkService :: IsNetworkService o => o -> IO NetworkService
- noNetworkService :: Maybe NetworkService
- 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 => Text -> IO (GValueConstruct o)
- getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceDomain :: AttrLabelProxy "domain"
- data NetworkServiceProtocolPropertyInfo
- constructNetworkServiceProtocol :: IsNetworkService o => Text -> IO (GValueConstruct o)
- getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceProtocol :: AttrLabelProxy "protocol"
- data NetworkServiceSchemePropertyInfo
- constructNetworkServiceScheme :: IsNetworkService o => Text -> IO (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 => Text -> IO (GValueConstruct o)
- getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text
- networkServiceService :: AttrLabelProxy "service"
Exported types
newtype NetworkService Source #
Constructors
| NetworkService (ManagedPtr NetworkService) |
Instances
| GObject NetworkService Source # | |
| IsObject NetworkService Source # | |
| IsSocketConnectable NetworkService Source # | |
| IsNetworkService NetworkService Source # | |
| ((~) * info (ResolveNetworkServiceMethod t NetworkService), MethodInfo * info NetworkService p) => IsLabel t (NetworkService -> p) Source # | |
| ((~) * info (ResolveNetworkServiceMethod t NetworkService), MethodInfo * info NetworkService p) => IsLabelProxy t (NetworkService -> p) Source # | |
| HasAttributeList * NetworkService Source # | |
| type AttributeList NetworkService Source # | |
| type SignalList NetworkService Source # | |
class GObject o => IsNetworkService o Source #
Instances
toNetworkService :: IsNetworkService o => o -> IO NetworkService Source #
Methods
getDomain
data NetworkServiceGetDomainMethodInfo Source #
Instances
| ((~) * signature (m Text), MonadIO m, IsNetworkService a) => MethodInfo * NetworkServiceGetDomainMethodInfo a signature Source # | |
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) => MethodInfo * NetworkServiceGetProtocolMethodInfo a signature Source # | |
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) => MethodInfo * NetworkServiceGetSchemeMethodInfo a signature Source # | |
networkServiceGetScheme Source #
Arguments
| :: (HasCallStack, MonadIO m, IsNetworkService a) | |
| => a |
|
| -> m Text | Returns: |
Get's 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) => MethodInfo * NetworkServiceGetServiceMethodInfo a signature Source # | |
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) => MethodInfo * NetworkServiceSetSchemeMethodInfo a signature Source # | |
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
data NetworkServiceDomainPropertyInfo Source #
Instances
constructNetworkServiceDomain :: IsNetworkService o => Text -> IO (GValueConstruct o) Source #
getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m Text Source #
networkServiceDomain :: AttrLabelProxy "domain" Source #
protocol
data NetworkServiceProtocolPropertyInfo Source #
Instances
constructNetworkServiceProtocol :: IsNetworkService o => Text -> IO (GValueConstruct o) Source #
getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m Text Source #
networkServiceProtocol :: AttrLabelProxy "protocol" Source #
scheme
data NetworkServiceSchemePropertyInfo Source #
Instances
constructNetworkServiceScheme :: IsNetworkService o => Text -> IO (GValueConstruct o) Source #
getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m Text Source #
networkServiceScheme :: AttrLabelProxy "scheme" Source #
setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> Text -> m () Source #
service
data NetworkServiceServicePropertyInfo Source #
Instances
constructNetworkServiceService :: IsNetworkService o => Text -> IO (GValueConstruct o) Source #
getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m Text Source #
networkServiceService :: AttrLabelProxy "service" Source #