{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DBusObjectManagerServer
(
DBusObjectManagerServer(..) ,
IsDBusObjectManagerServer ,
toDBusObjectManagerServer ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusObjectManagerServerMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerExportMethodInfo ,
#endif
dBusObjectManagerServerExport ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerExportUniquelyMethodInfo,
#endif
dBusObjectManagerServerExportUniquely ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerGetConnectionMethodInfo,
#endif
dBusObjectManagerServerGetConnection ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerIsExportedMethodInfo,
#endif
dBusObjectManagerServerIsExported ,
dBusObjectManagerServerNew ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerSetConnectionMethodInfo,
#endif
dBusObjectManagerServerSetConnection ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerUnexportMethodInfo,
#endif
dBusObjectManagerServerUnexport ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerConnectionPropertyInfo,
#endif
clearDBusObjectManagerServerConnection ,
constructDBusObjectManagerServerConnection,
#if defined(ENABLE_OVERLOADING)
dBusObjectManagerServerConnection ,
#endif
getDBusObjectManagerServerConnection ,
setDBusObjectManagerServerConnection ,
#if defined(ENABLE_OVERLOADING)
DBusObjectManagerServerObjectPathPropertyInfo,
#endif
constructDBusObjectManagerServerObjectPath,
#if defined(ENABLE_OVERLOADING)
dBusObjectManagerServerObjectPath ,
#endif
getDBusObjectManagerServerObjectPath ,
) 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.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.Parameter as GObject.Parameter
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObject as Gio.DBusObject
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObjectManager as Gio.DBusObjectManager
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusInterfaceSkeleton as Gio.DBusInterfaceSkeleton
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMessage as Gio.DBusMessage
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMethodInvocation as Gio.DBusMethodInvocation
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusObjectSkeleton as Gio.DBusObjectSkeleton
import {-# SOURCE #-} qualified GI.Gio.Objects.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuAttributeIter as Gio.MenuAttributeIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuLinkIter as Gio.MenuLinkIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceVTable as Gio.DBusInterfaceVTable
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSignalInfo as Gio.DBusSignalInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSubtreeVTable as Gio.DBusSubtreeVTable
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
import qualified GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObjectManager as Gio.DBusObjectManager
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusObjectSkeleton as Gio.DBusObjectSkeleton
#endif
newtype DBusObjectManagerServer = DBusObjectManagerServer (SP.ManagedPtr DBusObjectManagerServer)
deriving (DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
(DBusObjectManagerServer -> DBusObjectManagerServer -> Bool)
-> (DBusObjectManagerServer -> DBusObjectManagerServer -> Bool)
-> Eq DBusObjectManagerServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
== :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
$c/= :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
/= :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusObjectManagerServer where
toManagedPtr :: DBusObjectManagerServer -> ManagedPtr DBusObjectManagerServer
toManagedPtr (DBusObjectManagerServer ManagedPtr DBusObjectManagerServer
p) = ManagedPtr DBusObjectManagerServer
p
foreign import ccall "g_dbus_object_manager_server_get_type"
c_g_dbus_object_manager_server_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusObjectManagerServer where
glibType :: IO GType
glibType = IO GType
c_g_dbus_object_manager_server_get_type
instance B.Types.GObject DBusObjectManagerServer
class (SP.GObject o, O.IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o
instance (SP.GObject o, O.IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o
instance O.HasParentTypes DBusObjectManagerServer
type instance O.ParentTypes DBusObjectManagerServer = '[GObject.Object.Object, Gio.DBusObjectManager.DBusObjectManager]
toDBusObjectManagerServer :: (MIO.MonadIO m, IsDBusObjectManagerServer o) => o -> m DBusObjectManagerServer
toDBusObjectManagerServer :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectManagerServer o) =>
o -> m DBusObjectManagerServer
toDBusObjectManagerServer = IO DBusObjectManagerServer -> m DBusObjectManagerServer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DBusObjectManagerServer -> m DBusObjectManagerServer)
-> (o -> IO DBusObjectManagerServer)
-> o
-> m DBusObjectManagerServer
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer)
-> o -> IO DBusObjectManagerServer
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer
DBusObjectManagerServer
instance B.GValue.IsGValue (Maybe DBusObjectManagerServer) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_object_manager_server_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusObjectManagerServer -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusObjectManagerServer
P.Nothing = Ptr GValue -> Ptr DBusObjectManagerServer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DBusObjectManagerServer
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusObjectManagerServer)
gvalueSet_ Ptr GValue
gv (P.Just DBusObjectManagerServer
obj) = DBusObjectManagerServer
-> (Ptr DBusObjectManagerServer -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusObjectManagerServer
obj (Ptr GValue -> Ptr DBusObjectManagerServer -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObjectManagerServer)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusObjectManagerServer)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusObjectManagerServer)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DBusObjectManagerServer ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusObjectManagerServerMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusObjectManagerServerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusObjectManagerServerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusObjectManagerServerMethod "export" o = DBusObjectManagerServerExportMethodInfo
ResolveDBusObjectManagerServerMethod "exportUniquely" o = DBusObjectManagerServerExportUniquelyMethodInfo
ResolveDBusObjectManagerServerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusObjectManagerServerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusObjectManagerServerMethod "isExported" o = DBusObjectManagerServerIsExportedMethodInfo
ResolveDBusObjectManagerServerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusObjectManagerServerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusObjectManagerServerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusObjectManagerServerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusObjectManagerServerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusObjectManagerServerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusObjectManagerServerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusObjectManagerServerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "unexport" o = DBusObjectManagerServerUnexportMethodInfo
ResolveDBusObjectManagerServerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusObjectManagerServerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusObjectManagerServerMethod "getConnection" o = DBusObjectManagerServerGetConnectionMethodInfo
ResolveDBusObjectManagerServerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusObjectManagerServerMethod "getInterface" o = Gio.DBusObjectManager.DBusObjectManagerGetInterfaceMethodInfo
ResolveDBusObjectManagerServerMethod "getObject" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectMethodInfo
ResolveDBusObjectManagerServerMethod "getObjectPath" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectPathMethodInfo
ResolveDBusObjectManagerServerMethod "getObjects" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectsMethodInfo
ResolveDBusObjectManagerServerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusObjectManagerServerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusObjectManagerServerMethod "setConnection" o = DBusObjectManagerServerSetConnectionMethodInfo
ResolveDBusObjectManagerServerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusObjectManagerServerMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusObjectManagerServerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectManagerServerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectManagerServerMethod t DBusObjectManagerServer, O.OverloadedMethod info DBusObjectManagerServer p) => OL.IsLabel t (DBusObjectManagerServer -> 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 ~ ResolveDBusObjectManagerServerMethod t DBusObjectManagerServer, O.OverloadedMethod info DBusObjectManagerServer p, R.HasField t DBusObjectManagerServer p) => R.HasField t DBusObjectManagerServer p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusObjectManagerServerMethod t DBusObjectManagerServer, O.OverloadedMethodInfo info DBusObjectManagerServer) => OL.IsLabel t (O.MethodProxy info DBusObjectManagerServer) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe Gio.DBusConnection.DBusConnection)
getDBusObjectManagerServerConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectManagerServer o) =>
o -> m (Maybe DBusConnection)
getDBusObjectManagerServerConnection o
obj = IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DBusConnection) -> m (Maybe DBusConnection))
-> IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DBusConnection -> DBusConnection)
-> IO (Maybe DBusConnection)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"connection" ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection
setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, Gio.DBusConnection.IsDBusConnection a) => o -> a -> m ()
setDBusObjectManagerServerConnection :: forall (m :: * -> *) o a.
(MonadIO m, IsDBusObjectManagerServer o, IsDBusConnection a) =>
o -> a -> m ()
setDBusObjectManagerServerConnection o
obj a
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 a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"connection" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, MIO.MonadIO m, Gio.DBusConnection.IsDBusConnection a) => a -> m (GValueConstruct o)
constructDBusObjectManagerServerConnection :: forall o (m :: * -> *) a.
(IsDBusObjectManagerServer o, MonadIO m, IsDBusConnection a) =>
a -> m (GValueConstruct o)
constructDBusObjectManagerServerConnection a
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 a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"connection" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m ()
clearDBusObjectManagerServerConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectManagerServer o) =>
o -> m ()
clearDBusObjectManagerServerConnection o
obj = 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
$ o -> String -> Maybe DBusConnection -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj String
"connection" (Maybe DBusConnection
forall a. Maybe a
Nothing :: Maybe Gio.DBusConnection.DBusConnection)
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerConnectionPropertyInfo
instance AttrInfo DBusObjectManagerServerConnectionPropertyInfo where
type AttrAllowedOps DBusObjectManagerServerConnectionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusObjectManagerServerConnectionPropertyInfo = IsDBusObjectManagerServer
type AttrSetTypeConstraint DBusObjectManagerServerConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferTypeConstraint DBusObjectManagerServerConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferType DBusObjectManagerServerConnectionPropertyInfo = Gio.DBusConnection.DBusConnection
type AttrGetType DBusObjectManagerServerConnectionPropertyInfo = (Maybe Gio.DBusConnection.DBusConnection)
type AttrLabel DBusObjectManagerServerConnectionPropertyInfo = "connection"
type AttrOrigin DBusObjectManagerServerConnectionPropertyInfo = DBusObjectManagerServer
attrGet = getDBusObjectManagerServerConnection
attrSet = setDBusObjectManagerServerConnection
attrTransfer _ v = do
unsafeCastTo Gio.DBusConnection.DBusConnection v
attrConstruct = constructDBusObjectManagerServerConnection
attrClear = clearDBusObjectManagerServerConnection
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.connection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#g:attr:connection"
})
#endif
getDBusObjectManagerServerObjectPath :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe T.Text)
getDBusObjectManagerServerObjectPath :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectManagerServer o) =>
o -> m (Maybe Text)
getDBusObjectManagerServerObjectPath o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe 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
"object-path"
constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusObjectManagerServerObjectPath :: forall o (m :: * -> *).
(IsDBusObjectManagerServer o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusObjectManagerServerObjectPath 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
"object-path" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerObjectPathPropertyInfo
instance AttrInfo DBusObjectManagerServerObjectPathPropertyInfo where
type AttrAllowedOps DBusObjectManagerServerObjectPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusObjectManagerServerObjectPathPropertyInfo = IsDBusObjectManagerServer
type AttrSetTypeConstraint DBusObjectManagerServerObjectPathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusObjectManagerServerObjectPathPropertyInfo = (~) T.Text
type AttrTransferType DBusObjectManagerServerObjectPathPropertyInfo = T.Text
type AttrGetType DBusObjectManagerServerObjectPathPropertyInfo = (Maybe T.Text)
type AttrLabel DBusObjectManagerServerObjectPathPropertyInfo = "object-path"
type AttrOrigin DBusObjectManagerServerObjectPathPropertyInfo = DBusObjectManagerServer
attrGet = getDBusObjectManagerServerObjectPath
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusObjectManagerServerObjectPath
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.objectPath"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#g:attr:objectPath"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusObjectManagerServer
type instance O.AttributeList DBusObjectManagerServer = DBusObjectManagerServerAttributeList
type DBusObjectManagerServerAttributeList = ('[ '("connection", DBusObjectManagerServerConnectionPropertyInfo), '("objectPath", DBusObjectManagerServerObjectPathPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
dBusObjectManagerServerConnection :: AttrLabelProxy "connection"
dBusObjectManagerServerConnection = AttrLabelProxy
dBusObjectManagerServerObjectPath :: AttrLabelProxy "objectPath"
dBusObjectManagerServerObjectPath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusObjectManagerServer = DBusObjectManagerServerSignalList
type DBusObjectManagerServerSignalList = ('[ '("interfaceAdded", Gio.DBusObjectManager.DBusObjectManagerInterfaceAddedSignalInfo), '("interfaceRemoved", Gio.DBusObjectManager.DBusObjectManagerInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("objectAdded", Gio.DBusObjectManager.DBusObjectManagerObjectAddedSignalInfo), '("objectRemoved", Gio.DBusObjectManager.DBusObjectManagerObjectRemovedSignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_object_manager_server_new" g_dbus_object_manager_server_new ::
CString ->
IO (Ptr DBusObjectManagerServer)
dBusObjectManagerServerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m DBusObjectManagerServer
dBusObjectManagerServerNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m DBusObjectManagerServer
dBusObjectManagerServerNew Text
objectPath = IO DBusObjectManagerServer -> m DBusObjectManagerServer
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusObjectManagerServer -> m DBusObjectManagerServer)
-> IO DBusObjectManagerServer -> m DBusObjectManagerServer
forall a b. (a -> b) -> a -> b
$ do
objectPath' <- Text -> IO CString
textToCString Text
objectPath
result <- g_dbus_object_manager_server_new objectPath'
checkUnexpectedReturnNULL "dBusObjectManagerServerNew" result
result' <- (wrapObject DBusObjectManagerServer) result
freeMem objectPath'
return result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_object_manager_server_export" g_dbus_object_manager_server_export ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO ()
dBusObjectManagerServerExport ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m ()
dBusObjectManagerServerExport :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a,
IsDBusObjectSkeleton b) =>
a -> b -> m ()
dBusObjectManagerServerExport a
manager b
object = 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
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
object' <- unsafeManagedPtrCastPtr object
g_dbus_object_manager_server_export manager' object'
touchManagedPtr manager
touchManagedPtr object
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerExportMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.OverloadedMethod DBusObjectManagerServerExportMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerExport
instance O.OverloadedMethodInfo DBusObjectManagerServerExportMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerExport",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerExport"
})
#endif
foreign import ccall "g_dbus_object_manager_server_export_uniquely" g_dbus_object_manager_server_export_uniquely ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO ()
dBusObjectManagerServerExportUniquely ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m ()
dBusObjectManagerServerExportUniquely :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a,
IsDBusObjectSkeleton b) =>
a -> b -> m ()
dBusObjectManagerServerExportUniquely a
manager b
object = 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
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
object' <- unsafeManagedPtrCastPtr object
g_dbus_object_manager_server_export_uniquely manager' object'
touchManagedPtr manager
touchManagedPtr object
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerExportUniquelyMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.OverloadedMethod DBusObjectManagerServerExportUniquelyMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerExportUniquely
instance O.OverloadedMethodInfo DBusObjectManagerServerExportUniquelyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerExportUniquely",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerExportUniquely"
})
#endif
foreign import ccall "g_dbus_object_manager_server_get_connection" g_dbus_object_manager_server_get_connection ::
Ptr DBusObjectManagerServer ->
IO (Ptr Gio.DBusConnection.DBusConnection)
dBusObjectManagerServerGetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a
-> m (Maybe Gio.DBusConnection.DBusConnection)
dBusObjectManagerServerGetConnection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a -> m (Maybe DBusConnection)
dBusObjectManagerServerGetConnection a
manager = IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusConnection) -> m (Maybe DBusConnection))
-> IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a b. (a -> b) -> a -> b
$ do
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
result <- g_dbus_object_manager_server_get_connection manager'
maybeResult <- convertIfNonNull result $ \Ptr DBusConnection
result' -> do
result'' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
result'
return result''
touchManagedPtr manager
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerGetConnectionMethodInfo
instance (signature ~ (m (Maybe Gio.DBusConnection.DBusConnection)), MonadIO m, IsDBusObjectManagerServer a) => O.OverloadedMethod DBusObjectManagerServerGetConnectionMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerGetConnection
instance O.OverloadedMethodInfo DBusObjectManagerServerGetConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerGetConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerGetConnection"
})
#endif
foreign import ccall "g_dbus_object_manager_server_is_exported" g_dbus_object_manager_server_is_exported ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO CInt
dBusObjectManagerServerIsExported ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m Bool
dBusObjectManagerServerIsExported :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a,
IsDBusObjectSkeleton b) =>
a -> b -> m Bool
dBusObjectManagerServerIsExported a
manager b
object = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
object' <- unsafeManagedPtrCastPtr object
result <- g_dbus_object_manager_server_is_exported manager' object'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr manager
touchManagedPtr object
return result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerIsExportedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.OverloadedMethod DBusObjectManagerServerIsExportedMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerIsExported
instance O.OverloadedMethodInfo DBusObjectManagerServerIsExportedMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerIsExported",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerIsExported"
})
#endif
foreign import ccall "g_dbus_object_manager_server_set_connection" g_dbus_object_manager_server_set_connection ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusConnection.DBusConnection ->
IO ()
dBusObjectManagerServerSetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusConnection.IsDBusConnection b) =>
a
-> Maybe (b)
-> m ()
dBusObjectManagerServerSetConnection :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a,
IsDBusConnection b) =>
a -> Maybe b -> m ()
dBusObjectManagerServerSetConnection a
manager Maybe b
connection = 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
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
maybeConnection <- case connection of
Maybe b
Nothing -> Ptr DBusConnection -> IO (Ptr DBusConnection)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusConnection
forall a. Ptr a
FP.nullPtr
Just b
jConnection -> do
jConnection' <- b -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
return jConnection'
g_dbus_object_manager_server_set_connection manager' maybeConnection
touchManagedPtr manager
whenJust connection touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerSetConnectionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusConnection.IsDBusConnection b) => O.OverloadedMethod DBusObjectManagerServerSetConnectionMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerSetConnection
instance O.OverloadedMethodInfo DBusObjectManagerServerSetConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerSetConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerSetConnection"
})
#endif
foreign import ccall "g_dbus_object_manager_server_unexport" g_dbus_object_manager_server_unexport ::
Ptr DBusObjectManagerServer ->
CString ->
IO CInt
dBusObjectManagerServerUnexport ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a
-> T.Text
-> m Bool
dBusObjectManagerServerUnexport :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a -> Text -> m Bool
dBusObjectManagerServerUnexport a
manager Text
objectPath = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
objectPath' <- textToCString objectPath
result <- g_dbus_object_manager_server_unexport manager' objectPath'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr manager
freeMem objectPath'
return result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerUnexportMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsDBusObjectManagerServer a) => O.OverloadedMethod DBusObjectManagerServerUnexportMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerUnexport
instance O.OverloadedMethodInfo DBusObjectManagerServerUnexportMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectManagerServer.dBusObjectManagerServerUnexport",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusObjectManagerServer.html#v:dBusObjectManagerServerUnexport"
})
#endif