{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.DBusObject
(
DBusObject(..) ,
noDBusObject ,
IsDBusObject ,
toDBusObject ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusObjectMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusObjectGetInterfaceMethodInfo ,
#endif
dBusObjectGetInterface ,
#if defined(ENABLE_OVERLOADING)
DBusObjectGetInterfacesMethodInfo ,
#endif
dBusObjectGetInterfaces ,
#if defined(ENABLE_OVERLOADING)
DBusObjectGetObjectPathMethodInfo ,
#endif
dBusObjectGetObjectPath ,
C_DBusObjectInterfaceAddedCallback ,
DBusObjectInterfaceAddedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusObjectInterfaceAddedSignalInfo ,
#endif
afterDBusObjectInterfaceAdded ,
genClosure_DBusObjectInterfaceAdded ,
mk_DBusObjectInterfaceAddedCallback ,
noDBusObjectInterfaceAddedCallback ,
onDBusObjectInterfaceAdded ,
wrap_DBusObjectInterfaceAddedCallback ,
C_DBusObjectInterfaceRemovedCallback ,
DBusObjectInterfaceRemovedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusObjectInterfaceRemovedSignalInfo ,
#endif
afterDBusObjectInterfaceRemoved ,
genClosure_DBusObjectInterfaceRemoved ,
mk_DBusObjectInterfaceRemovedCallback ,
noDBusObjectInterfaceRemovedCallback ,
onDBusObjectInterfaceRemoved ,
wrap_DBusObjectInterfaceRemovedCallback ,
) 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.DBusInterface as Gio.DBusInterface
newtype DBusObject = DBusObject (ManagedPtr DBusObject)
deriving (DBusObject -> DBusObject -> Bool
(DBusObject -> DBusObject -> Bool)
-> (DBusObject -> DBusObject -> Bool) -> Eq DBusObject
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBusObject -> DBusObject -> Bool
$c/= :: DBusObject -> DBusObject -> Bool
== :: DBusObject -> DBusObject -> Bool
$c== :: DBusObject -> DBusObject -> Bool
Eq)
noDBusObject :: Maybe DBusObject
noDBusObject :: Maybe DBusObject
noDBusObject = Maybe DBusObject
forall a. Maybe a
Nothing
type DBusObjectInterfaceAddedCallback =
Gio.DBusInterface.DBusInterface
-> IO ()
noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback
noDBusObjectInterfaceAddedCallback :: Maybe DBusObjectInterfaceAddedCallback
noDBusObjectInterfaceAddedCallback = Maybe DBusObjectInterfaceAddedCallback
forall a. Maybe a
Nothing
type C_DBusObjectInterfaceAddedCallback =
Ptr () ->
Ptr Gio.DBusInterface.DBusInterface ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectInterfaceAddedCallback :: C_DBusObjectInterfaceAddedCallback -> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
genClosure_DBusObjectInterfaceAdded :: MonadIO m => DBusObjectInterfaceAddedCallback -> m (GClosure C_DBusObjectInterfaceAddedCallback)
genClosure_DBusObjectInterfaceAdded :: DBusObjectInterfaceAddedCallback
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
genClosure_DBusObjectInterfaceAdded cb :: DBusObjectInterfaceAddedCallback
cb = IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback))
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceAddedCallback DBusObjectInterfaceAddedCallback
cb
C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceAddedCallback C_DBusObjectInterfaceAddedCallback
cb' IO (FunPtr C_DBusObjectInterfaceAddedCallback)
-> (FunPtr C_DBusObjectInterfaceAddedCallback
-> IO (GClosure C_DBusObjectInterfaceAddedCallback))
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusObjectInterfaceAddedCallback
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusObjectInterfaceAddedCallback ::
DBusObjectInterfaceAddedCallback ->
C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceAddedCallback :: DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceAddedCallback _cb :: DBusObjectInterfaceAddedCallback
_cb _ interface :: Ptr DBusInterface
interface _ = do
DBusInterface
interface' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
interface
DBusObjectInterfaceAddedCallback
_cb DBusInterface
interface'
onDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
onDBusObjectInterfaceAdded :: a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
onDBusObjectInterfaceAdded obj :: a
obj cb :: DBusObjectInterfaceAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceAddedCallback DBusObjectInterfaceAddedCallback
cb
FunPtr C_DBusObjectInterfaceAddedCallback
cb'' <- C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceAddedCallback C_DBusObjectInterfaceAddedCallback
cb'
a
-> Text
-> FunPtr C_DBusObjectInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "interface-added" FunPtr C_DBusObjectInterfaceAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectInterfaceAdded :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
afterDBusObjectInterfaceAdded :: a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
afterDBusObjectInterfaceAdded obj :: a
obj cb :: DBusObjectInterfaceAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceAddedCallback DBusObjectInterfaceAddedCallback
cb
FunPtr C_DBusObjectInterfaceAddedCallback
cb'' <- C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceAddedCallback C_DBusObjectInterfaceAddedCallback
cb'
a
-> Text
-> FunPtr C_DBusObjectInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "interface-added" FunPtr C_DBusObjectInterfaceAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectInterfaceAddedSignalInfo
instance SignalInfo DBusObjectInterfaceAddedSignalInfo where
type HaskellCallbackType DBusObjectInterfaceAddedSignalInfo = DBusObjectInterfaceAddedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectInterfaceAddedCallback cb
cb'' <- mk_DBusObjectInterfaceAddedCallback cb'
connectSignalFunPtr obj "interface-added" cb'' connectMode detail
#endif
type DBusObjectInterfaceRemovedCallback =
Gio.DBusInterface.DBusInterface
-> IO ()
noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceRemovedCallback
noDBusObjectInterfaceRemovedCallback :: Maybe DBusObjectInterfaceAddedCallback
noDBusObjectInterfaceRemovedCallback = Maybe DBusObjectInterfaceAddedCallback
forall a. Maybe a
Nothing
type C_DBusObjectInterfaceRemovedCallback =
Ptr () ->
Ptr Gio.DBusInterface.DBusInterface ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusObjectInterfaceRemovedCallback :: C_DBusObjectInterfaceRemovedCallback -> IO (FunPtr C_DBusObjectInterfaceRemovedCallback)
genClosure_DBusObjectInterfaceRemoved :: MonadIO m => DBusObjectInterfaceRemovedCallback -> m (GClosure C_DBusObjectInterfaceRemovedCallback)
genClosure_DBusObjectInterfaceRemoved :: DBusObjectInterfaceAddedCallback
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
genClosure_DBusObjectInterfaceRemoved cb :: DBusObjectInterfaceAddedCallback
cb = IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback))
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
-> m (GClosure C_DBusObjectInterfaceAddedCallback)
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceRemovedCallback DBusObjectInterfaceAddedCallback
cb
C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceRemovedCallback C_DBusObjectInterfaceAddedCallback
cb' IO (FunPtr C_DBusObjectInterfaceAddedCallback)
-> (FunPtr C_DBusObjectInterfaceAddedCallback
-> IO (GClosure C_DBusObjectInterfaceAddedCallback))
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= FunPtr C_DBusObjectInterfaceAddedCallback
-> IO (GClosure C_DBusObjectInterfaceAddedCallback)
forall (m :: * -> *) a. MonadIO m => FunPtr a -> m (GClosure a)
B.GClosure.newGClosure
wrap_DBusObjectInterfaceRemovedCallback ::
DBusObjectInterfaceRemovedCallback ->
C_DBusObjectInterfaceRemovedCallback
wrap_DBusObjectInterfaceRemovedCallback :: DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceRemovedCallback _cb :: DBusObjectInterfaceAddedCallback
_cb _ interface :: Ptr DBusInterface
interface _ = do
DBusInterface
interface' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
interface
DBusObjectInterfaceAddedCallback
_cb DBusInterface
interface'
onDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
onDBusObjectInterfaceRemoved :: a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
onDBusObjectInterfaceRemoved obj :: a
obj cb :: DBusObjectInterfaceAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceRemovedCallback DBusObjectInterfaceAddedCallback
cb
FunPtr C_DBusObjectInterfaceAddedCallback
cb'' <- C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceRemovedCallback C_DBusObjectInterfaceAddedCallback
cb'
a
-> Text
-> FunPtr C_DBusObjectInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "interface-removed" FunPtr C_DBusObjectInterfaceAddedCallback
cb'' SignalConnectMode
SignalConnectBefore Maybe Text
forall a. Maybe a
Nothing
afterDBusObjectInterfaceRemoved :: (IsDBusObject a, MonadIO m) => a -> DBusObjectInterfaceRemovedCallback -> m SignalHandlerId
afterDBusObjectInterfaceRemoved :: a -> DBusObjectInterfaceAddedCallback -> m SignalHandlerId
afterDBusObjectInterfaceRemoved obj :: a
obj cb :: DBusObjectInterfaceAddedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let cb' :: C_DBusObjectInterfaceAddedCallback
cb' = DBusObjectInterfaceAddedCallback
-> C_DBusObjectInterfaceAddedCallback
wrap_DBusObjectInterfaceRemovedCallback DBusObjectInterfaceAddedCallback
cb
FunPtr C_DBusObjectInterfaceAddedCallback
cb'' <- C_DBusObjectInterfaceAddedCallback
-> IO (FunPtr C_DBusObjectInterfaceAddedCallback)
mk_DBusObjectInterfaceRemovedCallback C_DBusObjectInterfaceAddedCallback
cb'
a
-> Text
-> FunPtr C_DBusObjectInterfaceAddedCallback
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj "interface-removed" FunPtr C_DBusObjectInterfaceAddedCallback
cb'' SignalConnectMode
SignalConnectAfter Maybe Text
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectInterfaceRemovedSignalInfo
instance SignalInfo DBusObjectInterfaceRemovedSignalInfo where
type HaskellCallbackType DBusObjectInterfaceRemovedSignalInfo = DBusObjectInterfaceRemovedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectInterfaceRemovedCallback cb
cb'' <- mk_DBusObjectInterfaceRemovedCallback cb'
connectSignalFunPtr obj "interface-removed" cb'' connectMode detail
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusObject = DBusObjectSignalList
type DBusObjectSignalList = ('[ '("interfaceAdded", DBusObjectInterfaceAddedSignalInfo), '("interfaceRemoved", DBusObjectInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_object_get_type"
c_g_dbus_object_get_type :: IO GType
instance GObject DBusObject where
gobjectType :: IO GType
gobjectType = IO GType
c_g_dbus_object_get_type
instance B.GValue.IsGValue DBusObject where
toGValue :: DBusObject -> IO GValue
toGValue o :: DBusObject
o = do
GType
gtype <- IO GType
c_g_dbus_object_get_type
DBusObject -> (Ptr DBusObject -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusObject
o (GType
-> (GValue -> Ptr DBusObject -> IO ())
-> Ptr DBusObject
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DBusObject -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO DBusObject
fromGValue gv :: GValue
gv = do
Ptr DBusObject
ptr <- GValue -> IO (Ptr DBusObject)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DBusObject)
(ManagedPtr DBusObject -> DBusObject)
-> Ptr DBusObject -> IO DBusObject
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DBusObject -> DBusObject
DBusObject Ptr DBusObject
ptr
class (GObject o, O.IsDescendantOf DBusObject o) => IsDBusObject o
instance (GObject o, O.IsDescendantOf DBusObject o) => IsDBusObject o
instance O.HasParentTypes DBusObject
type instance O.ParentTypes DBusObject = '[GObject.Object.Object]
toDBusObject :: (MonadIO m, IsDBusObject o) => o -> m DBusObject
toDBusObject :: o -> m DBusObject
toDBusObject = IO DBusObject -> m DBusObject
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusObject -> m DBusObject)
-> (o -> IO DBusObject) -> o -> m DBusObject
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusObject -> DBusObject) -> o -> IO DBusObject
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DBusObject -> DBusObject
DBusObject
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusObject
type instance O.AttributeList DBusObject = DBusObjectAttributeList
type DBusObjectAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusObjectMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusObjectMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusObjectMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusObjectMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusObjectMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusObjectMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusObjectMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusObjectMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusObjectMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusObjectMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusObjectMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusObjectMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusObjectMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusObjectMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusObjectMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusObjectMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusObjectMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusObjectMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusObjectMethod "getInterface" o = DBusObjectGetInterfaceMethodInfo
ResolveDBusObjectMethod "getInterfaces" o = DBusObjectGetInterfacesMethodInfo
ResolveDBusObjectMethod "getObjectPath" o = DBusObjectGetObjectPathMethodInfo
ResolveDBusObjectMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusObjectMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusObjectMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusObjectMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusObjectMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectMethod t DBusObject, O.MethodInfo info DBusObject p) => OL.IsLabel t (DBusObject -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "g_dbus_object_get_interface" g_dbus_object_get_interface ::
Ptr DBusObject ->
CString ->
IO (Ptr Gio.DBusInterface.DBusInterface)
dBusObjectGetInterface ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObject a) =>
a
-> T.Text
-> m Gio.DBusInterface.DBusInterface
dBusObjectGetInterface :: a -> Text -> m DBusInterface
dBusObjectGetInterface object :: a
object interfaceName :: Text
interfaceName = IO DBusInterface -> m DBusInterface
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusInterface -> m DBusInterface)
-> IO DBusInterface -> m DBusInterface
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObject
object' <- a -> IO (Ptr DBusObject)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
Ptr DBusInterface
result <- Ptr DBusObject -> CString -> IO (Ptr DBusInterface)
g_dbus_object_get_interface Ptr DBusObject
object' CString
interfaceName'
Text -> Ptr DBusInterface -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusObjectGetInterface" Ptr DBusInterface
result
DBusInterface
result' <- ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) Ptr DBusInterface
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
DBusInterface -> IO DBusInterface
forall (m :: * -> *) a. Monad m => a -> m a
return DBusInterface
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectGetInterfaceMethodInfo
instance (signature ~ (T.Text -> m Gio.DBusInterface.DBusInterface), MonadIO m, IsDBusObject a) => O.MethodInfo DBusObjectGetInterfaceMethodInfo a signature where
overloadedMethod = dBusObjectGetInterface
#endif
foreign import ccall "g_dbus_object_get_interfaces" g_dbus_object_get_interfaces ::
Ptr DBusObject ->
IO (Ptr (GList (Ptr Gio.DBusInterface.DBusInterface)))
dBusObjectGetInterfaces ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObject a) =>
a
-> m [Gio.DBusInterface.DBusInterface]
dBusObjectGetInterfaces :: a -> m [DBusInterface]
dBusObjectGetInterfaces object :: a
object = IO [DBusInterface] -> m [DBusInterface]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusInterface] -> m [DBusInterface])
-> IO [DBusInterface] -> m [DBusInterface]
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObject
object' <- a -> IO (Ptr DBusObject)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
Ptr (GList (Ptr DBusInterface))
result <- Ptr DBusObject -> IO (Ptr (GList (Ptr DBusInterface)))
g_dbus_object_get_interfaces Ptr DBusObject
object'
[Ptr DBusInterface]
result' <- Ptr (GList (Ptr DBusInterface)) -> IO [Ptr DBusInterface]
forall a. Ptr (GList (Ptr a)) -> IO [Ptr a]
unpackGList Ptr (GList (Ptr DBusInterface))
result
[DBusInterface]
result'' <- (Ptr DBusInterface -> IO DBusInterface)
-> [Ptr DBusInterface] -> IO [DBusInterface]
forall (t :: * -> *) (m :: * -> *) a b.
(Traversable t, Monad m) =>
(a -> m b) -> t a -> m (t b)
mapM ((ManagedPtr DBusInterface -> DBusInterface)
-> Ptr DBusInterface -> IO DBusInterface
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusInterface -> DBusInterface
Gio.DBusInterface.DBusInterface) [Ptr DBusInterface]
result'
Ptr (GList (Ptr DBusInterface)) -> IO ()
forall a. Ptr (GList a) -> IO ()
g_list_free Ptr (GList (Ptr DBusInterface))
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
[DBusInterface] -> IO [DBusInterface]
forall (m :: * -> *) a. Monad m => a -> m a
return [DBusInterface]
result''
#if defined(ENABLE_OVERLOADING)
data DBusObjectGetInterfacesMethodInfo
instance (signature ~ (m [Gio.DBusInterface.DBusInterface]), MonadIO m, IsDBusObject a) => O.MethodInfo DBusObjectGetInterfacesMethodInfo a signature where
overloadedMethod = dBusObjectGetInterfaces
#endif
foreign import ccall "g_dbus_object_get_object_path" g_dbus_object_get_object_path ::
Ptr DBusObject ->
IO CString
dBusObjectGetObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObject a) =>
a
-> m T.Text
dBusObjectGetObjectPath :: a -> m Text
dBusObjectGetObjectPath object :: a
object = IO Text -> m Text
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
Ptr DBusObject
object' <- a -> IO (Ptr DBusObject)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
CString
result <- Ptr DBusObject -> IO CString
g_dbus_object_get_object_path Ptr DBusObject
object'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "dBusObjectGetObjectPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusObjectGetObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusObject a) => O.MethodInfo DBusObjectGetObjectPathMethodInfo a signature where
overloadedMethod = dBusObjectGetObjectPath
#endif