{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DBusObjectSkeleton
(
DBusObjectSkeleton(..) ,
IsDBusObjectSkeleton ,
toDBusObjectSkeleton ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusObjectSkeletonMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonAddInterfaceMethodInfo,
#endif
dBusObjectSkeletonAddInterface ,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonFlushMethodInfo ,
#endif
dBusObjectSkeletonFlush ,
dBusObjectSkeletonNew ,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonRemoveInterfaceMethodInfo,
#endif
dBusObjectSkeletonRemoveInterface ,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonRemoveInterfaceByNameMethodInfo,
#endif
dBusObjectSkeletonRemoveInterfaceByName ,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonSetObjectPathMethodInfo,
#endif
dBusObjectSkeletonSetObjectPath ,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonGObjectPathPropertyInfo,
#endif
clearDBusObjectSkeletonGObjectPath ,
constructDBusObjectSkeletonGObjectPath ,
#if defined(ENABLE_OVERLOADING)
dBusObjectSkeletonGObjectPath ,
#endif
getDBusObjectSkeletonGObjectPath ,
setDBusObjectSkeletonGObjectPath ,
DBusObjectSkeletonAuthorizeMethodCallback,
#if defined(ENABLE_OVERLOADING)
DBusObjectSkeletonAuthorizeMethodSignalInfo,
#endif
afterDBusObjectSkeletonAuthorizeMethod ,
onDBusObjectSkeletonAuthorizeMethod ,
) 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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObject as Gio.DBusObject
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusInterfaceSkeleton as Gio.DBusInterfaceSkeleton
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMethodInvocation as Gio.DBusMethodInvocation
newtype DBusObjectSkeleton = DBusObjectSkeleton (SP.ManagedPtr DBusObjectSkeleton)
deriving (DBusObjectSkeleton -> DBusObjectSkeleton -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool
$c/= :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool
== :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool
$c== :: DBusObjectSkeleton -> DBusObjectSkeleton -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusObjectSkeleton where
toManagedPtr :: DBusObjectSkeleton -> ManagedPtr DBusObjectSkeleton
toManagedPtr (DBusObjectSkeleton ManagedPtr DBusObjectSkeleton
p) = ManagedPtr DBusObjectSkeleton
p
foreign import ccall "g_dbus_object_skeleton_get_type"
c_g_dbus_object_skeleton_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusObjectSkeleton where
glibType :: IO GType
glibType = IO GType
c_g_dbus_object_skeleton_get_type
instance B.Types.GObject DBusObjectSkeleton
class (SP.GObject o, O.IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o
instance (SP.GObject o, O.IsDescendantOf DBusObjectSkeleton o) => IsDBusObjectSkeleton o
instance O.HasParentTypes DBusObjectSkeleton
type instance O.ParentTypes DBusObjectSkeleton = '[GObject.Object.Object, Gio.DBusObject.DBusObject]
toDBusObjectSkeleton :: (MIO.MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton
toDBusObjectSkeleton :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectSkeleton o) =>
o -> m DBusObjectSkeleton
toDBusObjectSkeleton = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusObjectSkeleton -> DBusObjectSkeleton
DBusObjectSkeleton
instance B.GValue.IsGValue (Maybe DBusObjectSkeleton) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_object_skeleton_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusObjectSkeleton -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusObjectSkeleton
P.Nothing = forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusObjectSkeleton)
gvalueSet_ Ptr GValue
gv (P.Just DBusObjectSkeleton
obj) = forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusObjectSkeleton
obj (forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusObjectSkeleton)
gvalueGet_ Ptr GValue
gv = do
Ptr DBusObjectSkeleton
ptr <- forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusObjectSkeleton)
if Ptr DBusObjectSkeleton
ptr forall a. Eq a => a -> a -> Bool
/= forall a. Ptr a
FP.nullPtr
then forall a. a -> Maybe a
P.Just forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DBusObjectSkeleton -> DBusObjectSkeleton
DBusObjectSkeleton Ptr DBusObjectSkeleton
ptr
else forall (m :: * -> *) a. Monad m => a -> m a
return forall a. Maybe a
P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusObjectSkeletonMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusObjectSkeletonMethod "addInterface" o = DBusObjectSkeletonAddInterfaceMethodInfo
ResolveDBusObjectSkeletonMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusObjectSkeletonMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusObjectSkeletonMethod "flush" o = DBusObjectSkeletonFlushMethodInfo
ResolveDBusObjectSkeletonMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusObjectSkeletonMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusObjectSkeletonMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusObjectSkeletonMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusObjectSkeletonMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusObjectSkeletonMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusObjectSkeletonMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusObjectSkeletonMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusObjectSkeletonMethod "removeInterface" o = DBusObjectSkeletonRemoveInterfaceMethodInfo
ResolveDBusObjectSkeletonMethod "removeInterfaceByName" o = DBusObjectSkeletonRemoveInterfaceByNameMethodInfo
ResolveDBusObjectSkeletonMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusObjectSkeletonMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusObjectSkeletonMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusObjectSkeletonMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusObjectSkeletonMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusObjectSkeletonMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusObjectSkeletonMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusObjectSkeletonMethod "getInterface" o = Gio.DBusObject.DBusObjectGetInterfaceMethodInfo
ResolveDBusObjectSkeletonMethod "getInterfaces" o = Gio.DBusObject.DBusObjectGetInterfacesMethodInfo
ResolveDBusObjectSkeletonMethod "getObjectPath" o = Gio.DBusObject.DBusObjectGetObjectPathMethodInfo
ResolveDBusObjectSkeletonMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusObjectSkeletonMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusObjectSkeletonMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusObjectSkeletonMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusObjectSkeletonMethod "setObjectPath" o = DBusObjectSkeletonSetObjectPathMethodInfo
ResolveDBusObjectSkeletonMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectSkeletonMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectSkeletonMethod t DBusObjectSkeleton, O.OverloadedMethod info DBusObjectSkeleton p) => OL.IsLabel t (DBusObjectSkeleton -> 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 ~ ResolveDBusObjectSkeletonMethod t DBusObjectSkeleton, O.OverloadedMethod info DBusObjectSkeleton p, R.HasField t DBusObjectSkeleton p) => R.HasField t DBusObjectSkeleton p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusObjectSkeletonMethod t DBusObjectSkeleton, O.OverloadedMethodInfo info DBusObjectSkeleton) => OL.IsLabel t (O.MethodProxy info DBusObjectSkeleton) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DBusObjectSkeletonAuthorizeMethodCallback =
Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton
-> Gio.DBusMethodInvocation.DBusMethodInvocation
-> IO Bool
type C_DBusObjectSkeletonAuthorizeMethodCallback =
Ptr DBusObjectSkeleton ->
Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
wrap_DBusObjectSkeletonAuthorizeMethodCallback ::
GObject a => (a -> DBusObjectSkeletonAuthorizeMethodCallback) ->
C_DBusObjectSkeletonAuthorizeMethodCallback
wrap_DBusObjectSkeletonAuthorizeMethodCallback :: forall a.
GObject a =>
(a -> DBusObjectSkeletonAuthorizeMethodCallback)
-> C_DBusObjectSkeletonAuthorizeMethodCallback
wrap_DBusObjectSkeletonAuthorizeMethodCallback a -> DBusObjectSkeletonAuthorizeMethodCallback
gi'cb Ptr DBusObjectSkeleton
gi'selfPtr Ptr DBusInterfaceSkeleton
interface Ptr DBusMethodInvocation
invocation Ptr ()
_ = do
DBusInterfaceSkeleton
interface' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusInterfaceSkeleton -> DBusInterfaceSkeleton
Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton) Ptr DBusInterfaceSkeleton
interface
DBusMethodInvocation
invocation' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
Gio.DBusMethodInvocation.DBusMethodInvocation) Ptr DBusMethodInvocation
invocation
Bool
result <- forall a b.
(HasCallStack, ManagedPtrNewtype a) =>
Ptr a -> (a -> IO b) -> IO b
B.ManagedPtr.withTransient Ptr DBusObjectSkeleton
gi'selfPtr forall a b. (a -> b) -> a -> b
$ \DBusObjectSkeleton
gi'self -> a -> DBusObjectSkeletonAuthorizeMethodCallback
gi'cb (coerce :: forall a b. Coercible a b => a -> b
Coerce.coerce DBusObjectSkeleton
gi'self) DBusInterfaceSkeleton
interface' DBusMethodInvocation
invocation'
let result' :: CInt
result' = (forall a b. (Integral a, Num b) => a -> b
P.fromIntegral forall b c a. (b -> c) -> (a -> b) -> a -> c
. forall a. Enum a => a -> Int
P.fromEnum) Bool
result
forall (m :: * -> *) a. Monad m => a -> m a
return CInt
result'
onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusObjectSkeletonAuthorizeMethodCallback) -> m SignalHandlerId
onDBusObjectSkeletonAuthorizeMethod :: forall a (m :: * -> *).
(IsDBusObjectSkeleton a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectSkeletonAuthorizeMethodCallback)
-> m SignalHandlerId
onDBusObjectSkeletonAuthorizeMethod a
obj (?self::a) => DBusObjectSkeletonAuthorizeMethodCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusObjectSkeletonAuthorizeMethodCallback
wrapped a
self = let ?self = a
self in (?self::a) => DBusObjectSkeletonAuthorizeMethodCallback
cb
let wrapped' :: C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped' = forall a.
GObject a =>
(a -> DBusObjectSkeletonAuthorizeMethodCallback)
-> C_DBusObjectSkeletonAuthorizeMethodCallback
wrap_DBusObjectSkeletonAuthorizeMethodCallback a -> DBusObjectSkeletonAuthorizeMethodCallback
wrapped
FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'' <- C_DBusObjectSkeletonAuthorizeMethodCallback
-> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
mk_DBusObjectSkeletonAuthorizeMethodCallback C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"authorize-method" FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'' SignalConnectMode
SignalConnectBefore forall a. Maybe a
Nothing
afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> ((?self :: a) => DBusObjectSkeletonAuthorizeMethodCallback) -> m SignalHandlerId
afterDBusObjectSkeletonAuthorizeMethod :: forall a (m :: * -> *).
(IsDBusObjectSkeleton a, MonadIO m) =>
a
-> ((?self::a) => DBusObjectSkeletonAuthorizeMethodCallback)
-> m SignalHandlerId
afterDBusObjectSkeletonAuthorizeMethod a
obj (?self::a) => DBusObjectSkeletonAuthorizeMethodCallback
cb = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusObjectSkeletonAuthorizeMethodCallback
wrapped a
self = let ?self = a
self in (?self::a) => DBusObjectSkeletonAuthorizeMethodCallback
cb
let wrapped' :: C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped' = forall a.
GObject a =>
(a -> DBusObjectSkeletonAuthorizeMethodCallback)
-> C_DBusObjectSkeletonAuthorizeMethodCallback
wrap_DBusObjectSkeletonAuthorizeMethodCallback a -> DBusObjectSkeletonAuthorizeMethodCallback
wrapped
FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'' <- C_DBusObjectSkeletonAuthorizeMethodCallback
-> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
mk_DBusObjectSkeletonAuthorizeMethodCallback C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'
forall o a.
GObject o =>
o
-> Text
-> FunPtr a
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignalFunPtr a
obj Text
"authorize-method" FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback
wrapped'' SignalConnectMode
SignalConnectAfter forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonAuthorizeMethodSignalInfo
instance SignalInfo DBusObjectSkeletonAuthorizeMethodSignalInfo where
type HaskellCallbackType DBusObjectSkeletonAuthorizeMethodSignalInfo = DBusObjectSkeletonAuthorizeMethodCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
cb'' <- mk_DBusObjectSkeletonAuthorizeMethodCallback cb'
connectSignalFunPtr obj "authorize-method" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton::authorize-method"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#g:signal:authorizeMethod"})
#endif
getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe T.Text)
getDBusObjectSkeletonGObjectPath :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectSkeleton o) =>
o -> m (Maybe Text)
getDBusObjectSkeletonGObjectPath o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"g-object-path"
setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> T.Text -> m ()
setDBusObjectSkeletonGObjectPath :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectSkeleton o) =>
o -> Text -> m ()
setDBusObjectSkeletonGObjectPath o
obj Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"g-object-path" (forall a. a -> Maybe a
Just Text
val)
constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusObjectSkeletonGObjectPath :: forall o (m :: * -> *).
(IsDBusObjectSkeleton o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusObjectSkeletonGObjectPath Text
val = forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ do
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO forall a b. (a -> b) -> a -> b
$ forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"g-object-path" (forall a. a -> Maybe a
P.Just Text
val)
clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m ()
clearDBusObjectSkeletonGObjectPath :: forall (m :: * -> *) o.
(MonadIO m, IsDBusObjectSkeleton o) =>
o -> m ()
clearDBusObjectSkeletonGObjectPath o
obj = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ forall a. GObject a => a -> String -> Maybe Text -> IO ()
B.Properties.setObjectPropertyString o
obj String
"g-object-path" (forall a. Maybe a
Nothing :: Maybe T.Text)
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonGObjectPathPropertyInfo
instance AttrInfo DBusObjectSkeletonGObjectPathPropertyInfo where
type AttrAllowedOps DBusObjectSkeletonGObjectPathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusObjectSkeletonGObjectPathPropertyInfo = IsDBusObjectSkeleton
type AttrSetTypeConstraint DBusObjectSkeletonGObjectPathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusObjectSkeletonGObjectPathPropertyInfo = (~) T.Text
type AttrTransferType DBusObjectSkeletonGObjectPathPropertyInfo = T.Text
type AttrGetType DBusObjectSkeletonGObjectPathPropertyInfo = (Maybe T.Text)
type AttrLabel DBusObjectSkeletonGObjectPathPropertyInfo = "g-object-path"
type AttrOrigin DBusObjectSkeletonGObjectPathPropertyInfo = DBusObjectSkeleton
attrGet = getDBusObjectSkeletonGObjectPath
attrSet = setDBusObjectSkeletonGObjectPath
attrTransfer _ v = do
return v
attrConstruct = constructDBusObjectSkeletonGObjectPath
attrClear = clearDBusObjectSkeletonGObjectPath
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.gObjectPath"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#g:attr:gObjectPath"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusObjectSkeleton
type instance O.AttributeList DBusObjectSkeleton = DBusObjectSkeletonAttributeList
type DBusObjectSkeletonAttributeList = ('[ '("gObjectPath", DBusObjectSkeletonGObjectPathPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
dBusObjectSkeletonGObjectPath :: AttrLabelProxy "gObjectPath"
dBusObjectSkeletonGObjectPath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusObjectSkeleton = DBusObjectSkeletonSignalList
type DBusObjectSkeletonSignalList = ('[ '("authorizeMethod", DBusObjectSkeletonAuthorizeMethodSignalInfo), '("interfaceAdded", Gio.DBusObject.DBusObjectInterfaceAddedSignalInfo), '("interfaceRemoved", Gio.DBusObject.DBusObjectInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_object_skeleton_new" g_dbus_object_skeleton_new ::
CString ->
IO (Ptr DBusObjectSkeleton)
dBusObjectSkeletonNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m DBusObjectSkeleton
dBusObjectSkeletonNew :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
Text -> m DBusObjectSkeleton
dBusObjectSkeletonNew Text
objectPath = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
Ptr DBusObjectSkeleton
result <- CString -> IO (Ptr DBusObjectSkeleton)
g_dbus_object_skeleton_new CString
objectPath'
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusObjectSkeletonNew" Ptr DBusObjectSkeleton
result
DBusObjectSkeleton
result' <- (forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr DBusObjectSkeleton -> DBusObjectSkeleton
DBusObjectSkeleton) Ptr DBusObjectSkeleton
result
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
forall (m :: * -> *) a. Monad m => a -> m a
return DBusObjectSkeleton
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_object_skeleton_add_interface" g_dbus_object_skeleton_add_interface ::
Ptr DBusObjectSkeleton ->
Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
IO ()
dBusObjectSkeletonAddInterface ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) =>
a
-> b
-> m ()
dBusObjectSkeletonAddInterface :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectSkeleton a,
IsDBusInterfaceSkeleton b) =>
a -> b -> m ()
dBusObjectSkeletonAddInterface a
object b
interface_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectSkeleton
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
Ptr DBusInterfaceSkeleton
interface_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
interface_
Ptr DBusObjectSkeleton -> Ptr DBusInterfaceSkeleton -> IO ()
g_dbus_object_skeleton_add_interface Ptr DBusObjectSkeleton
object' Ptr DBusInterfaceSkeleton
interface_'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
interface_
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonAddInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.OverloadedMethod DBusObjectSkeletonAddInterfaceMethodInfo a signature where
overloadedMethod = dBusObjectSkeletonAddInterface
instance O.OverloadedMethodInfo DBusObjectSkeletonAddInterfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.dBusObjectSkeletonAddInterface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#v:dBusObjectSkeletonAddInterface"
})
#endif
foreign import ccall "g_dbus_object_skeleton_flush" g_dbus_object_skeleton_flush ::
Ptr DBusObjectSkeleton ->
IO ()
dBusObjectSkeletonFlush ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a
-> m ()
dBusObjectSkeletonFlush :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a -> m ()
dBusObjectSkeletonFlush a
object = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectSkeleton
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
Ptr DBusObjectSkeleton -> IO ()
g_dbus_object_skeleton_flush Ptr DBusObjectSkeleton
object'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusObjectSkeleton a) => O.OverloadedMethod DBusObjectSkeletonFlushMethodInfo a signature where
overloadedMethod = dBusObjectSkeletonFlush
instance O.OverloadedMethodInfo DBusObjectSkeletonFlushMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.dBusObjectSkeletonFlush",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#v:dBusObjectSkeletonFlush"
})
#endif
foreign import ccall "g_dbus_object_skeleton_remove_interface" g_dbus_object_skeleton_remove_interface ::
Ptr DBusObjectSkeleton ->
Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
IO ()
dBusObjectSkeletonRemoveInterface ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) =>
a
-> b
-> m ()
dBusObjectSkeletonRemoveInterface :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusObjectSkeleton a,
IsDBusInterfaceSkeleton b) =>
a -> b -> m ()
dBusObjectSkeletonRemoveInterface a
object b
interface_ = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectSkeleton
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
Ptr DBusInterfaceSkeleton
interface_' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
interface_
Ptr DBusObjectSkeleton -> Ptr DBusInterfaceSkeleton -> IO ()
g_dbus_object_skeleton_remove_interface Ptr DBusObjectSkeleton
object' Ptr DBusInterfaceSkeleton
interface_'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
interface_
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonRemoveInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.OverloadedMethod DBusObjectSkeletonRemoveInterfaceMethodInfo a signature where
overloadedMethod = dBusObjectSkeletonRemoveInterface
instance O.OverloadedMethodInfo DBusObjectSkeletonRemoveInterfaceMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.dBusObjectSkeletonRemoveInterface",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#v:dBusObjectSkeletonRemoveInterface"
})
#endif
foreign import ccall "g_dbus_object_skeleton_remove_interface_by_name" g_dbus_object_skeleton_remove_interface_by_name ::
Ptr DBusObjectSkeleton ->
CString ->
IO ()
dBusObjectSkeletonRemoveInterfaceByName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a
-> T.Text
-> m ()
dBusObjectSkeletonRemoveInterfaceByName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a -> Text -> m ()
dBusObjectSkeletonRemoveInterfaceByName a
object Text
interfaceName = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectSkeleton
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
CString
interfaceName' <- Text -> IO CString
textToCString Text
interfaceName
Ptr DBusObjectSkeleton -> CString -> IO ()
g_dbus_object_skeleton_remove_interface_by_name Ptr DBusObjectSkeleton
object' CString
interfaceName'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
forall a. Ptr a -> IO ()
freeMem CString
interfaceName'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonRemoveInterfaceByNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.OverloadedMethod DBusObjectSkeletonRemoveInterfaceByNameMethodInfo a signature where
overloadedMethod = dBusObjectSkeletonRemoveInterfaceByName
instance O.OverloadedMethodInfo DBusObjectSkeletonRemoveInterfaceByNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.dBusObjectSkeletonRemoveInterfaceByName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#v:dBusObjectSkeletonRemoveInterfaceByName"
})
#endif
foreign import ccall "g_dbus_object_skeleton_set_object_path" g_dbus_object_skeleton_set_object_path ::
Ptr DBusObjectSkeleton ->
CString ->
IO ()
dBusObjectSkeletonSetObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a
-> T.Text
-> m ()
dBusObjectSkeletonSetObjectPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
a -> Text -> m ()
dBusObjectSkeletonSetObjectPath a
object Text
objectPath = forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO forall a b. (a -> b) -> a -> b
$ do
Ptr DBusObjectSkeleton
object' <- forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
object
CString
objectPath' <- Text -> IO CString
textToCString Text
objectPath
Ptr DBusObjectSkeleton -> CString -> IO ()
g_dbus_object_skeleton_set_object_path Ptr DBusObjectSkeleton
object' CString
objectPath'
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
object
forall a. Ptr a -> IO ()
freeMem CString
objectPath'
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusObjectSkeletonSetObjectPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.OverloadedMethod DBusObjectSkeletonSetObjectPathMethodInfo a signature where
overloadedMethod = dBusObjectSkeletonSetObjectPath
instance O.OverloadedMethodInfo DBusObjectSkeletonSetObjectPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusObjectSkeleton.dBusObjectSkeletonSetObjectPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.30/docs/GI-Gio-Objects-DBusObjectSkeleton.html#v:dBusObjectSkeletonSetObjectPath"
})
#endif