{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.NetworkService
(
NetworkService(..) ,
IsNetworkService ,
toNetworkService ,
#if defined(ENABLE_OVERLOADING)
ResolveNetworkServiceMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
NetworkServiceGetDomainMethodInfo ,
#endif
networkServiceGetDomain ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceGetProtocolMethodInfo ,
#endif
networkServiceGetProtocol ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceGetSchemeMethodInfo ,
#endif
networkServiceGetScheme ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceGetServiceMethodInfo ,
#endif
networkServiceGetService ,
networkServiceNew ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceSetSchemeMethodInfo ,
#endif
networkServiceSetScheme ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceDomainPropertyInfo ,
#endif
constructNetworkServiceDomain ,
getNetworkServiceDomain ,
#if defined(ENABLE_OVERLOADING)
networkServiceDomain ,
#endif
#if defined(ENABLE_OVERLOADING)
NetworkServiceProtocolPropertyInfo ,
#endif
constructNetworkServiceProtocol ,
getNetworkServiceProtocol ,
#if defined(ENABLE_OVERLOADING)
networkServiceProtocol ,
#endif
#if defined(ENABLE_OVERLOADING)
NetworkServiceSchemePropertyInfo ,
#endif
constructNetworkServiceScheme ,
getNetworkServiceScheme ,
#if defined(ENABLE_OVERLOADING)
networkServiceScheme ,
#endif
setNetworkServiceScheme ,
#if defined(ENABLE_OVERLOADING)
NetworkServiceServicePropertyInfo ,
#endif
constructNetworkServiceService ,
getNetworkServiceService ,
#if defined(ENABLE_OVERLOADING)
networkServiceService ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.SocketConnectable as Gio.SocketConnectable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.SocketAddress as Gio.SocketAddress
import {-# SOURCE #-} qualified GI.Gio.Objects.SocketAddressEnumerator as Gio.SocketAddressEnumerator
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.SocketConnectable as Gio.SocketConnectable
#endif
newtype NetworkService = NetworkService (SP.ManagedPtr NetworkService)
deriving (NetworkService -> NetworkService -> Bool
(NetworkService -> NetworkService -> Bool)
-> (NetworkService -> NetworkService -> Bool) -> Eq NetworkService
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: NetworkService -> NetworkService -> Bool
== :: NetworkService -> NetworkService -> Bool
$c/= :: NetworkService -> NetworkService -> Bool
/= :: NetworkService -> NetworkService -> Bool
Eq)
instance SP.ManagedPtrNewtype NetworkService where
toManagedPtr :: NetworkService -> ManagedPtr NetworkService
toManagedPtr (NetworkService ManagedPtr NetworkService
p) = ManagedPtr NetworkService
p
foreign import ccall "g_network_service_get_type"
c_g_network_service_get_type :: IO B.Types.GType
instance B.Types.TypedObject NetworkService where
glibType :: IO GType
glibType = IO GType
c_g_network_service_get_type
instance B.Types.GObject NetworkService
class (SP.GObject o, O.IsDescendantOf NetworkService o) => IsNetworkService o
instance (SP.GObject o, O.IsDescendantOf NetworkService o) => IsNetworkService o
instance O.HasParentTypes NetworkService
type instance O.ParentTypes NetworkService = '[GObject.Object.Object, Gio.SocketConnectable.SocketConnectable]
toNetworkService :: (MIO.MonadIO m, IsNetworkService o) => o -> m NetworkService
toNetworkService :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> m NetworkService
toNetworkService = IO NetworkService -> m NetworkService
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO NetworkService -> m NetworkService)
-> (o -> IO NetworkService) -> o -> m NetworkService
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr NetworkService -> NetworkService)
-> o -> IO NetworkService
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr NetworkService -> NetworkService
NetworkService
instance B.GValue.IsGValue (Maybe NetworkService) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_network_service_get_type
gvalueSet_ :: Ptr GValue -> Maybe NetworkService -> IO ()
gvalueSet_ Ptr GValue
gv Maybe NetworkService
P.Nothing = Ptr GValue -> Ptr NetworkService -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr NetworkService
forall a. Ptr a
FP.nullPtr :: FP.Ptr NetworkService)
gvalueSet_ Ptr GValue
gv (P.Just NetworkService
obj) = NetworkService -> (Ptr NetworkService -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr NetworkService
obj (Ptr GValue -> Ptr NetworkService -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe NetworkService)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr NetworkService)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr NetworkService)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject NetworkService ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveNetworkServiceMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveNetworkServiceMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveNetworkServiceMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveNetworkServiceMethod "enumerate" o = Gio.SocketConnectable.SocketConnectableEnumerateMethodInfo
ResolveNetworkServiceMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveNetworkServiceMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveNetworkServiceMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveNetworkServiceMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveNetworkServiceMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveNetworkServiceMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveNetworkServiceMethod "proxyEnumerate" o = Gio.SocketConnectable.SocketConnectableProxyEnumerateMethodInfo
ResolveNetworkServiceMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveNetworkServiceMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveNetworkServiceMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveNetworkServiceMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveNetworkServiceMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveNetworkServiceMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveNetworkServiceMethod "toString" o = Gio.SocketConnectable.SocketConnectableToStringMethodInfo
ResolveNetworkServiceMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveNetworkServiceMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveNetworkServiceMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveNetworkServiceMethod "getDomain" o = NetworkServiceGetDomainMethodInfo
ResolveNetworkServiceMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveNetworkServiceMethod "getProtocol" o = NetworkServiceGetProtocolMethodInfo
ResolveNetworkServiceMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveNetworkServiceMethod "getScheme" o = NetworkServiceGetSchemeMethodInfo
ResolveNetworkServiceMethod "getService" o = NetworkServiceGetServiceMethodInfo
ResolveNetworkServiceMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveNetworkServiceMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveNetworkServiceMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveNetworkServiceMethod "setScheme" o = NetworkServiceSetSchemeMethodInfo
ResolveNetworkServiceMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveNetworkServiceMethod t NetworkService, O.OverloadedMethod info NetworkService p) => OL.IsLabel t (NetworkService -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveNetworkServiceMethod t NetworkService, O.OverloadedMethod info NetworkService p, R.HasField t NetworkService p) => R.HasField t NetworkService p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveNetworkServiceMethod t NetworkService, O.OverloadedMethodInfo info NetworkService) => OL.IsLabel t (O.MethodProxy info NetworkService) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getNetworkServiceDomain :: (MonadIO m, IsNetworkService o) => o -> m T.Text
getNetworkServiceDomain :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> m Text
getNetworkServiceDomain o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getNetworkServiceDomain" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"domain"
constructNetworkServiceDomain :: (IsNetworkService o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructNetworkServiceDomain :: forall o (m :: * -> *).
(IsNetworkService o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructNetworkServiceDomain Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"domain" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data NetworkServiceDomainPropertyInfo
instance AttrInfo NetworkServiceDomainPropertyInfo where
type AttrAllowedOps NetworkServiceDomainPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint NetworkServiceDomainPropertyInfo = IsNetworkService
type AttrSetTypeConstraint NetworkServiceDomainPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint NetworkServiceDomainPropertyInfo = (~) T.Text
type AttrTransferType NetworkServiceDomainPropertyInfo = T.Text
type AttrGetType NetworkServiceDomainPropertyInfo = T.Text
type AttrLabel NetworkServiceDomainPropertyInfo = "domain"
type AttrOrigin NetworkServiceDomainPropertyInfo = NetworkService
attrGet = getNetworkServiceDomain
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructNetworkServiceDomain
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.domain"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#g:attr:domain"
})
#endif
getNetworkServiceProtocol :: (MonadIO m, IsNetworkService o) => o -> m T.Text
getNetworkServiceProtocol :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> m Text
getNetworkServiceProtocol o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getNetworkServiceProtocol" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"protocol"
constructNetworkServiceProtocol :: (IsNetworkService o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructNetworkServiceProtocol :: forall o (m :: * -> *).
(IsNetworkService o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructNetworkServiceProtocol Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"protocol" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data NetworkServiceProtocolPropertyInfo
instance AttrInfo NetworkServiceProtocolPropertyInfo where
type AttrAllowedOps NetworkServiceProtocolPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint NetworkServiceProtocolPropertyInfo = IsNetworkService
type AttrSetTypeConstraint NetworkServiceProtocolPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint NetworkServiceProtocolPropertyInfo = (~) T.Text
type AttrTransferType NetworkServiceProtocolPropertyInfo = T.Text
type AttrGetType NetworkServiceProtocolPropertyInfo = T.Text
type AttrLabel NetworkServiceProtocolPropertyInfo = "protocol"
type AttrOrigin NetworkServiceProtocolPropertyInfo = NetworkService
attrGet = getNetworkServiceProtocol
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructNetworkServiceProtocol
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.protocol"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#g:attr:protocol"
})
#endif
getNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> m T.Text
getNetworkServiceScheme :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> m Text
getNetworkServiceScheme o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getNetworkServiceScheme" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"scheme"
setNetworkServiceScheme :: (MonadIO m, IsNetworkService o) => o -> T.Text -> m ()
setNetworkServiceScheme :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> Text -> m ()
setNetworkServiceScheme o
obj Text
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe Text -> IO ()
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"scheme" (Text -> Maybe Text
forall a. a -> Maybe a
Just Text
val)
constructNetworkServiceScheme :: (IsNetworkService o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructNetworkServiceScheme :: forall o (m :: * -> *).
(IsNetworkService o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructNetworkServiceScheme Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"scheme" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data NetworkServiceSchemePropertyInfo
instance AttrInfo NetworkServiceSchemePropertyInfo where
type AttrAllowedOps NetworkServiceSchemePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint NetworkServiceSchemePropertyInfo = IsNetworkService
type AttrSetTypeConstraint NetworkServiceSchemePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint NetworkServiceSchemePropertyInfo = (~) T.Text
type AttrTransferType NetworkServiceSchemePropertyInfo = T.Text
type AttrGetType NetworkServiceSchemePropertyInfo = T.Text
type AttrLabel NetworkServiceSchemePropertyInfo = "scheme"
type AttrOrigin NetworkServiceSchemePropertyInfo = NetworkService
attrGet = getNetworkServiceScheme
attrSet = setNetworkServiceScheme
attrTransfer _ v = do
return v
attrConstruct = constructNetworkServiceScheme
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.scheme"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#g:attr:scheme"
})
#endif
getNetworkServiceService :: (MonadIO m, IsNetworkService o) => o -> m T.Text
getNetworkServiceService :: forall (m :: * -> *) o.
(MonadIO m, IsNetworkService o) =>
o -> m Text
getNetworkServiceService o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getNetworkServiceService" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO Text
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"service"
constructNetworkServiceService :: (IsNetworkService o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructNetworkServiceService :: forall o (m :: * -> *).
(IsNetworkService o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructNetworkServiceService Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"service" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data NetworkServiceServicePropertyInfo
instance AttrInfo NetworkServiceServicePropertyInfo where
type AttrAllowedOps NetworkServiceServicePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint NetworkServiceServicePropertyInfo = IsNetworkService
type AttrSetTypeConstraint NetworkServiceServicePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint NetworkServiceServicePropertyInfo = (~) T.Text
type AttrTransferType NetworkServiceServicePropertyInfo = T.Text
type AttrGetType NetworkServiceServicePropertyInfo = T.Text
type AttrLabel NetworkServiceServicePropertyInfo = "service"
type AttrOrigin NetworkServiceServicePropertyInfo = NetworkService
attrGet = getNetworkServiceService
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructNetworkServiceService
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.service"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#g:attr:service"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList NetworkService
type instance O.AttributeList NetworkService = NetworkServiceAttributeList
type NetworkServiceAttributeList = ('[ '("domain", NetworkServiceDomainPropertyInfo), '("protocol", NetworkServiceProtocolPropertyInfo), '("scheme", NetworkServiceSchemePropertyInfo), '("service", NetworkServiceServicePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
networkServiceDomain :: AttrLabelProxy "domain"
networkServiceDomain = AttrLabelProxy
networkServiceProtocol :: AttrLabelProxy "protocol"
networkServiceProtocol = AttrLabelProxy
networkServiceScheme :: AttrLabelProxy "scheme"
networkServiceScheme = AttrLabelProxy
networkServiceService :: AttrLabelProxy "service"
networkServiceService = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList NetworkService = NetworkServiceSignalList
type NetworkServiceSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_network_service_new" g_network_service_new ::
CString ->
CString ->
CString ->
IO (Ptr NetworkService)
networkServiceNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> T.Text
-> T.Text
-> m NetworkService
networkServiceNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> Text -> Text -> m NetworkService
networkServiceNew Text
service Text
protocol Text
domain = IO NetworkService -> m NetworkService
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO NetworkService -> m NetworkService)
-> IO NetworkService -> m NetworkService
forall a b. (a -> b) -> a -> b
$ do
service' <- Text -> IO CString
textToCString Text
service
protocol' <- textToCString protocol
domain' <- textToCString domain
result <- g_network_service_new service' protocol' domain'
checkUnexpectedReturnNULL "networkServiceNew" result
result' <- (wrapObject NetworkService) result
freeMem service'
freeMem protocol'
freeMem domain'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_network_service_get_domain" g_network_service_get_domain ::
Ptr NetworkService ->
IO CString
networkServiceGetDomain ::
(B.CallStack.HasCallStack, MonadIO m, IsNetworkService a) =>
a
-> m T.Text
networkServiceGetDomain :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNetworkService a) =>
a -> m Text
networkServiceGetDomain a
srv = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
srv' <- a -> IO (Ptr NetworkService)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srv
result <- g_network_service_get_domain srv'
checkUnexpectedReturnNULL "networkServiceGetDomain" result
result' <- cstringToText result
touchManagedPtr srv
return result'
#if defined(ENABLE_OVERLOADING)
data NetworkServiceGetDomainMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsNetworkService a) => O.OverloadedMethod NetworkServiceGetDomainMethodInfo a signature where
overloadedMethod = networkServiceGetDomain
instance O.OverloadedMethodInfo NetworkServiceGetDomainMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.networkServiceGetDomain",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#v:networkServiceGetDomain"
})
#endif
foreign import ccall "g_network_service_get_protocol" g_network_service_get_protocol ::
Ptr NetworkService ->
IO CString
networkServiceGetProtocol ::
(B.CallStack.HasCallStack, MonadIO m, IsNetworkService a) =>
a
-> m T.Text
networkServiceGetProtocol :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNetworkService a) =>
a -> m Text
networkServiceGetProtocol a
srv = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
srv' <- a -> IO (Ptr NetworkService)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srv
result <- g_network_service_get_protocol srv'
checkUnexpectedReturnNULL "networkServiceGetProtocol" result
result' <- cstringToText result
touchManagedPtr srv
return result'
#if defined(ENABLE_OVERLOADING)
data NetworkServiceGetProtocolMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsNetworkService a) => O.OverloadedMethod NetworkServiceGetProtocolMethodInfo a signature where
overloadedMethod = networkServiceGetProtocol
instance O.OverloadedMethodInfo NetworkServiceGetProtocolMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.networkServiceGetProtocol",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#v:networkServiceGetProtocol"
})
#endif
foreign import ccall "g_network_service_get_scheme" g_network_service_get_scheme ::
Ptr NetworkService ->
IO CString
networkServiceGetScheme ::
(B.CallStack.HasCallStack, MonadIO m, IsNetworkService a) =>
a
-> m T.Text
networkServiceGetScheme :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNetworkService a) =>
a -> m Text
networkServiceGetScheme a
srv = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
srv' <- a -> IO (Ptr NetworkService)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srv
result <- g_network_service_get_scheme srv'
checkUnexpectedReturnNULL "networkServiceGetScheme" result
result' <- cstringToText result
touchManagedPtr srv
return result'
#if defined(ENABLE_OVERLOADING)
data NetworkServiceGetSchemeMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsNetworkService a) => O.OverloadedMethod NetworkServiceGetSchemeMethodInfo a signature where
overloadedMethod = networkServiceGetScheme
instance O.OverloadedMethodInfo NetworkServiceGetSchemeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.networkServiceGetScheme",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#v:networkServiceGetScheme"
})
#endif
foreign import ccall "g_network_service_get_service" g_network_service_get_service ::
Ptr NetworkService ->
IO CString
networkServiceGetService ::
(B.CallStack.HasCallStack, MonadIO m, IsNetworkService a) =>
a
-> m T.Text
networkServiceGetService :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNetworkService a) =>
a -> m Text
networkServiceGetService a
srv = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ do
srv' <- a -> IO (Ptr NetworkService)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srv
result <- g_network_service_get_service srv'
checkUnexpectedReturnNULL "networkServiceGetService" result
result' <- cstringToText result
touchManagedPtr srv
return result'
#if defined(ENABLE_OVERLOADING)
data NetworkServiceGetServiceMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsNetworkService a) => O.OverloadedMethod NetworkServiceGetServiceMethodInfo a signature where
overloadedMethod = networkServiceGetService
instance O.OverloadedMethodInfo NetworkServiceGetServiceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.networkServiceGetService",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#v:networkServiceGetService"
})
#endif
foreign import ccall "g_network_service_set_scheme" g_network_service_set_scheme ::
Ptr NetworkService ->
CString ->
IO ()
networkServiceSetScheme ::
(B.CallStack.HasCallStack, MonadIO m, IsNetworkService a) =>
a
-> T.Text
-> m ()
networkServiceSetScheme :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsNetworkService a) =>
a -> Text -> m ()
networkServiceSetScheme a
srv Text
scheme = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
srv' <- a -> IO (Ptr NetworkService)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
srv
scheme' <- textToCString scheme
g_network_service_set_scheme srv' scheme'
touchManagedPtr srv
freeMem scheme'
return ()
#if defined(ENABLE_OVERLOADING)
data NetworkServiceSetSchemeMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsNetworkService a) => O.OverloadedMethod NetworkServiceSetSchemeMethodInfo a signature where
overloadedMethod = networkServiceSetScheme
instance O.OverloadedMethodInfo NetworkServiceSetSchemeMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.NetworkService.networkServiceSetScheme",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-NetworkService.html#v:networkServiceSetScheme"
})
#endif