{-# 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 ,
noDBusObjectManagerServer ,
#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.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
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 Data.Text as T
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 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
newtype DBusObjectManagerServer = DBusObjectManagerServer (ManagedPtr DBusObjectManagerServer)
deriving (DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
(DBusObjectManagerServer -> DBusObjectManagerServer -> Bool)
-> (DBusObjectManagerServer -> DBusObjectManagerServer -> Bool)
-> Eq DBusObjectManagerServer
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
$c/= :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
== :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
$c== :: DBusObjectManagerServer -> DBusObjectManagerServer -> Bool
Eq)
foreign import ccall "g_dbus_object_manager_server_get_type"
c_g_dbus_object_manager_server_get_type :: IO GType
instance GObject DBusObjectManagerServer where
gobjectType :: IO GType
gobjectType = IO GType
c_g_dbus_object_manager_server_get_type
instance B.GValue.IsGValue DBusObjectManagerServer where
toGValue :: DBusObjectManagerServer -> IO GValue
toGValue o :: DBusObjectManagerServer
o = do
GType
gtype <- IO GType
c_g_dbus_object_manager_server_get_type
DBusObjectManagerServer
-> (Ptr DBusObjectManagerServer -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusObjectManagerServer
o (GType
-> (GValue -> Ptr DBusObjectManagerServer -> IO ())
-> Ptr DBusObjectManagerServer
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DBusObjectManagerServer -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO DBusObjectManagerServer
fromGValue gv :: GValue
gv = do
Ptr DBusObjectManagerServer
ptr <- GValue -> IO (Ptr DBusObjectManagerServer)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DBusObjectManagerServer)
(ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer)
-> Ptr DBusObjectManagerServer -> IO DBusObjectManagerServer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer
DBusObjectManagerServer Ptr DBusObjectManagerServer
ptr
class (GObject o, O.IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o
instance (GObject o, O.IsDescendantOf DBusObjectManagerServer o) => IsDBusObjectManagerServer o
instance O.HasParentTypes DBusObjectManagerServer
type instance O.ParentTypes DBusObjectManagerServer = '[GObject.Object.Object, Gio.DBusObjectManager.DBusObjectManager]
toDBusObjectManagerServer :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m DBusObjectManagerServer
toDBusObjectManagerServer :: o -> m DBusObjectManagerServer
toDBusObjectManagerServer = IO DBusObjectManagerServer -> m DBusObjectManagerServer
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer
DBusObjectManagerServer
noDBusObjectManagerServer :: Maybe DBusObjectManagerServer
noDBusObjectManagerServer :: Maybe DBusObjectManagerServer
noDBusObjectManagerServer = Maybe DBusObjectManagerServer
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusObjectManagerServerMethod (t :: Symbol) (o :: *) :: * 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.MethodInfo 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
#endif
getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe Gio.DBusConnection.DBusConnection)
getDBusObjectManagerServerConnection :: o -> m (Maybe DBusConnection)
getDBusObjectManagerServerConnection obj :: o
obj = IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
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
$ 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 "connection" ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection
setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, Gio.DBusConnection.IsDBusConnection a) => o -> a -> m ()
setDBusObjectManagerServerConnection :: o -> a -> m ()
setDBusObjectManagerServerConnection obj :: o
obj val :: a
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe a -> IO ()
forall a b.
(GObject a, GObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyObject o
obj "connection" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, Gio.DBusConnection.IsDBusConnection a) => a -> IO (GValueConstruct o)
constructDBusObjectManagerServerConnection :: a -> IO (GValueConstruct o)
constructDBusObjectManagerServerConnection val :: a
val = String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject "connection" (a -> Maybe a
forall a. a -> Maybe a
Just a
val)
clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m ()
clearDBusObjectManagerServerConnection :: o -> m ()
clearDBusObjectManagerServerConnection obj :: o
obj = IO () -> m ()
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 "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
#endif
getDBusObjectManagerServerObjectPath :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe T.Text)
getDBusObjectManagerServerObjectPath :: o -> m (Maybe Text)
getDBusObjectManagerServerObjectPath obj :: o
obj = IO (Maybe Text) -> m (Maybe Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
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 "object-path"
constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o) => T.Text -> IO (GValueConstruct o)
constructDBusObjectManagerServerObjectPath :: Text -> IO (GValueConstruct o)
constructDBusObjectManagerServerObjectPath val :: Text
val = String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString "object-path" (Text -> Maybe Text
forall a. a -> Maybe a
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
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusObjectManagerServer
type instance O.AttributeList DBusObjectManagerServer = DBusObjectManagerServerAttributeList
type DBusObjectManagerServerAttributeList = ('[ '("connection", DBusObjectManagerServerConnectionPropertyInfo), '("objectPath", DBusObjectManagerServerObjectPathPropertyInfo)] :: [(Symbol, *)])
#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, *)])
#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 :: Text -> m DBusObjectManagerServer
dBusObjectManagerServerNew objectPath :: Text
objectPath = IO DBusObjectManagerServer -> m DBusObjectManagerServer
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
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
Ptr DBusObjectManagerServer
result <- CString -> IO (Ptr DBusObjectManagerServer)
g_dbus_object_manager_server_new CString
objectPath'
Text -> Ptr DBusObjectManagerServer -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusObjectManagerServerNew" Ptr DBusObjectManagerServer
result
DBusObjectManagerServer
result' <- ((ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer)
-> Ptr DBusObjectManagerServer -> IO DBusObjectManagerServer
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusObjectManagerServer -> DBusObjectManagerServer
DBusObjectManagerServer) Ptr DBusObjectManagerServer
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
DBusObjectManagerServer -> IO DBusObjectManagerServer
forall (m :: * -> *) a. Monad m => a -> m a
return DBusObjectManagerServer
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 :: a -> b -> m ()
dBusObjectManagerServerExport manager :: a
manager object :: b
object = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr DBusObjectSkeleton
object' <- b -> IO (Ptr DBusObjectSkeleton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
Ptr DBusObjectManagerServer -> Ptr DBusObjectSkeleton -> IO ()
g_dbus_object_manager_server_export Ptr DBusObjectManagerServer
manager' Ptr DBusObjectSkeleton
object'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerExportMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerExportMethodInfo a signature where
overloadedMethod = 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 :: a -> b -> m ()
dBusObjectManagerServerExportUniquely manager :: a
manager object :: b
object = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr DBusObjectSkeleton
object' <- b -> IO (Ptr DBusObjectSkeleton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
Ptr DBusObjectManagerServer -> Ptr DBusObjectSkeleton -> IO ()
g_dbus_object_manager_server_export_uniquely Ptr DBusObjectManagerServer
manager' Ptr DBusObjectSkeleton
object'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerExportUniquelyMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerExportUniquelyMethodInfo a signature where
overloadedMethod = 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 Gio.DBusConnection.DBusConnection
dBusObjectManagerServerGetConnection :: a -> m DBusConnection
dBusObjectManagerServerGetConnection manager :: a
manager = IO DBusConnection -> m DBusConnection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusConnection -> m DBusConnection)
-> IO DBusConnection -> m DBusConnection
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr DBusConnection
result <- Ptr DBusObjectManagerServer -> IO (Ptr DBusConnection)
g_dbus_object_manager_server_get_connection Ptr DBusObjectManagerServer
manager'
Text -> Ptr DBusConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusObjectManagerServerGetConnection" Ptr DBusConnection
result
DBusConnection
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
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
DBusConnection -> IO DBusConnection
forall (m :: * -> *) a. Monad m => a -> m a
return DBusConnection
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerGetConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsDBusObjectManagerServer a) => O.MethodInfo DBusObjectManagerServerGetConnectionMethodInfo a signature where
overloadedMethod = 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 :: a -> b -> m Bool
dBusObjectManagerServerIsExported manager :: a
manager object :: b
object = IO Bool -> m Bool
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
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr DBusObjectSkeleton
object' <- b -> IO (Ptr DBusObjectSkeleton)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
object
CInt
result <- Ptr DBusObjectManagerServer -> Ptr DBusObjectSkeleton -> IO CInt
g_dbus_object_manager_server_is_exported Ptr DBusObjectManagerServer
manager' Ptr DBusObjectSkeleton
object'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
object
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerIsExportedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerIsExportedMethodInfo a signature where
overloadedMethod = 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 :: a -> Maybe b -> m ()
dBusObjectManagerServerSetConnection manager :: a
manager connection :: Maybe b
connection = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
Ptr DBusConnection
maybeConnection <- case Maybe b
connection of
Nothing -> Ptr DBusConnection -> IO (Ptr DBusConnection)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusConnection
forall a. Ptr a
nullPtr
Just jConnection :: b
jConnection -> do
Ptr DBusConnection
jConnection' <- b -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jConnection
Ptr DBusConnection -> IO (Ptr DBusConnection)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusConnection
jConnection'
Ptr DBusObjectManagerServer -> Ptr DBusConnection -> IO ()
g_dbus_object_manager_server_set_connection Ptr DBusObjectManagerServer
manager' Ptr DBusConnection
maybeConnection
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
connection b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerSetConnectionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusConnection.IsDBusConnection b) => O.MethodInfo DBusObjectManagerServerSetConnectionMethodInfo a signature where
overloadedMethod = 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 :: a -> Text -> m Bool
dBusObjectManagerServerUnexport manager :: a
manager objectPath :: Text
objectPath = IO Bool -> m Bool
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
Ptr DBusObjectManagerServer
manager' <- a -> IO (Ptr DBusObjectManagerServer)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
manager
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
CInt
result <- Ptr DBusObjectManagerServer -> CString -> IO CInt
g_dbus_object_manager_server_unexport Ptr DBusObjectManagerServer
manager' CString
objectPath'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
manager
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectManagerServerUnexportMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsDBusObjectManagerServer a) => O.MethodInfo DBusObjectManagerServerUnexportMethodInfo a signature where
overloadedMethod = dBusObjectManagerServerUnexport
#endif