#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.DBusObjectSkeleton
(
DBusObjectSkeleton(..) ,
IsDBusObjectSkeleton ,
toDBusObjectSkeleton ,
noDBusObjectSkeleton ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonAddInterfaceMethodInfo,
#endif
dBusObjectSkeletonAddInterface ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonFlushMethodInfo ,
#endif
dBusObjectSkeletonFlush ,
dBusObjectSkeletonNew ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonRemoveInterfaceMethodInfo,
#endif
dBusObjectSkeletonRemoveInterface ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonRemoveInterfaceByNameMethodInfo,
#endif
dBusObjectSkeletonRemoveInterfaceByName ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonSetObjectPathMethodInfo,
#endif
dBusObjectSkeletonSetObjectPath ,
#if ENABLE_OVERLOADING
DBusObjectSkeletonGObjectPathPropertyInfo,
#endif
clearDBusObjectSkeletonGObjectPath ,
constructDBusObjectSkeletonGObjectPath ,
#if ENABLE_OVERLOADING
dBusObjectSkeletonGObjectPath ,
#endif
getDBusObjectSkeletonGObjectPath ,
setDBusObjectSkeletonGObjectPath ,
C_DBusObjectSkeletonAuthorizeMethodCallback,
DBusObjectSkeletonAuthorizeMethodCallback,
#if ENABLE_OVERLOADING
DBusObjectSkeletonAuthorizeMethodSignalInfo,
#endif
afterDBusObjectSkeletonAuthorizeMethod ,
genClosure_DBusObjectSkeletonAuthorizeMethod,
mk_DBusObjectSkeletonAuthorizeMethodCallback,
noDBusObjectSkeletonAuthorizeMethodCallback,
onDBusObjectSkeletonAuthorizeMethod ,
wrap_DBusObjectSkeletonAuthorizeMethodCallback,
) 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.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.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
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 (ManagedPtr DBusObjectSkeleton)
foreign import ccall "g_dbus_object_skeleton_get_type"
c_g_dbus_object_skeleton_get_type :: IO GType
instance GObject DBusObjectSkeleton where
gobjectType _ = c_g_dbus_object_skeleton_get_type
class GObject o => IsDBusObjectSkeleton o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DBusObjectSkeleton a) =>
IsDBusObjectSkeleton a
#endif
instance IsDBusObjectSkeleton DBusObjectSkeleton
instance GObject.Object.IsObject DBusObjectSkeleton
instance Gio.DBusObject.IsDBusObject DBusObjectSkeleton
toDBusObjectSkeleton :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m DBusObjectSkeleton
toDBusObjectSkeleton = liftIO . unsafeCastTo DBusObjectSkeleton
noDBusObjectSkeleton :: Maybe DBusObjectSkeleton
noDBusObjectSkeleton = Nothing
#if ENABLE_OVERLOADING
type family ResolveDBusObjectSkeletonMethod (t :: Symbol) (o :: *) :: * 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 "setObjectPath" o = DBusObjectSkeletonSetObjectPathMethodInfo
ResolveDBusObjectSkeletonMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectSkeletonMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectSkeletonMethod t DBusObjectSkeleton, O.MethodInfo info DBusObjectSkeleton p) => O.IsLabelProxy t (DBusObjectSkeleton -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDBusObjectSkeletonMethod t DBusObjectSkeleton, O.MethodInfo info DBusObjectSkeleton p) => O.IsLabel t (DBusObjectSkeleton -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#endif
type DBusObjectSkeletonAuthorizeMethodCallback =
Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton
-> Gio.DBusMethodInvocation.DBusMethodInvocation
-> IO Bool
noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback
noDBusObjectSkeletonAuthorizeMethodCallback = Nothing
type C_DBusObjectSkeletonAuthorizeMethodCallback =
Ptr () ->
Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
Ptr () ->
IO CInt
foreign import ccall "wrapper"
mk_DBusObjectSkeletonAuthorizeMethodCallback :: C_DBusObjectSkeletonAuthorizeMethodCallback -> IO (FunPtr C_DBusObjectSkeletonAuthorizeMethodCallback)
genClosure_DBusObjectSkeletonAuthorizeMethod :: DBusObjectSkeletonAuthorizeMethodCallback -> IO Closure
genClosure_DBusObjectSkeletonAuthorizeMethod cb = do
let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
mk_DBusObjectSkeletonAuthorizeMethodCallback cb' >>= newCClosure
wrap_DBusObjectSkeletonAuthorizeMethodCallback ::
DBusObjectSkeletonAuthorizeMethodCallback ->
C_DBusObjectSkeletonAuthorizeMethodCallback
wrap_DBusObjectSkeletonAuthorizeMethodCallback _cb _ interface invocation _ = do
interface' <- (newObject Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton) interface
invocation' <- (newObject Gio.DBusMethodInvocation.DBusMethodInvocation) invocation
result <- _cb interface' invocation'
let result' = (fromIntegral . fromEnum) result
return result'
onDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
onDBusObjectSkeletonAuthorizeMethod obj cb = liftIO $ do
let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
cb'' <- mk_DBusObjectSkeletonAuthorizeMethodCallback cb'
connectSignalFunPtr obj "authorize-method" cb'' SignalConnectBefore
afterDBusObjectSkeletonAuthorizeMethod :: (IsDBusObjectSkeleton a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
afterDBusObjectSkeletonAuthorizeMethod obj cb = liftIO $ do
let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
cb'' <- mk_DBusObjectSkeletonAuthorizeMethodCallback cb'
connectSignalFunPtr obj "authorize-method" cb'' SignalConnectAfter
getDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m (Maybe T.Text)
getDBusObjectSkeletonGObjectPath obj = liftIO $ getObjectPropertyString obj "g-object-path"
setDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> T.Text -> m ()
setDBusObjectSkeletonGObjectPath obj val = liftIO $ setObjectPropertyString obj "g-object-path" (Just val)
constructDBusObjectSkeletonGObjectPath :: (IsDBusObjectSkeleton o) => T.Text -> IO (GValueConstruct o)
constructDBusObjectSkeletonGObjectPath val = constructObjectPropertyString "g-object-path" (Just val)
clearDBusObjectSkeletonGObjectPath :: (MonadIO m, IsDBusObjectSkeleton o) => o -> m ()
clearDBusObjectSkeletonGObjectPath obj = liftIO $ setObjectPropertyString obj "g-object-path" (Nothing :: Maybe T.Text)
#if ENABLE_OVERLOADING
data DBusObjectSkeletonGObjectPathPropertyInfo
instance AttrInfo DBusObjectSkeletonGObjectPathPropertyInfo where
type AttrAllowedOps DBusObjectSkeletonGObjectPathPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusObjectSkeletonGObjectPathPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusObjectSkeletonGObjectPathPropertyInfo = IsDBusObjectSkeleton
type AttrGetType DBusObjectSkeletonGObjectPathPropertyInfo = (Maybe T.Text)
type AttrLabel DBusObjectSkeletonGObjectPathPropertyInfo = "g-object-path"
type AttrOrigin DBusObjectSkeletonGObjectPathPropertyInfo = DBusObjectSkeleton
attrGet _ = getDBusObjectSkeletonGObjectPath
attrSet _ = setDBusObjectSkeletonGObjectPath
attrConstruct _ = constructDBusObjectSkeletonGObjectPath
attrClear _ = clearDBusObjectSkeletonGObjectPath
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DBusObjectSkeleton
type instance O.AttributeList DBusObjectSkeleton = DBusObjectSkeletonAttributeList
type DBusObjectSkeletonAttributeList = ('[ '("gObjectPath", DBusObjectSkeletonGObjectPathPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dBusObjectSkeletonGObjectPath :: AttrLabelProxy "gObjectPath"
dBusObjectSkeletonGObjectPath = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
data DBusObjectSkeletonAuthorizeMethodSignalInfo
instance SignalInfo DBusObjectSkeletonAuthorizeMethodSignalInfo where
type HaskellCallbackType DBusObjectSkeletonAuthorizeMethodSignalInfo = DBusObjectSkeletonAuthorizeMethodCallback
connectSignal _ obj cb connectMode = do
let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
cb'' <- mk_DBusObjectSkeletonAuthorizeMethodCallback cb'
connectSignalFunPtr obj "authorize-method" cb'' connectMode
type instance O.SignalList DBusObjectSkeleton = DBusObjectSkeletonSignalList
type DBusObjectSkeletonSignalList = ('[ '("authorizeMethod", DBusObjectSkeletonAuthorizeMethodSignalInfo), '("interfaceAdded", Gio.DBusObject.DBusObjectInterfaceAddedSignalInfo), '("interfaceRemoved", Gio.DBusObject.DBusObjectInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#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 objectPath = liftIO $ do
objectPath' <- textToCString objectPath
result <- g_dbus_object_skeleton_new objectPath'
checkUnexpectedReturnNULL "dBusObjectSkeletonNew" result
result' <- (wrapObject DBusObjectSkeleton) result
freeMem objectPath'
return result'
#if 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 object interface_ = liftIO $ do
object' <- unsafeManagedPtrCastPtr object
interface_' <- unsafeManagedPtrCastPtr interface_
g_dbus_object_skeleton_add_interface object' interface_'
touchManagedPtr object
touchManagedPtr interface_
return ()
#if ENABLE_OVERLOADING
data DBusObjectSkeletonAddInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.MethodInfo DBusObjectSkeletonAddInterfaceMethodInfo a signature where
overloadedMethod _ = 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 object = liftIO $ do
object' <- unsafeManagedPtrCastPtr object
g_dbus_object_skeleton_flush object'
touchManagedPtr object
return ()
#if ENABLE_OVERLOADING
data DBusObjectSkeletonFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonFlushMethodInfo a signature where
overloadedMethod _ = 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 object interface_ = liftIO $ do
object' <- unsafeManagedPtrCastPtr object
interface_' <- unsafeManagedPtrCastPtr interface_
g_dbus_object_skeleton_remove_interface object' interface_'
touchManagedPtr object
touchManagedPtr interface_
return ()
#if ENABLE_OVERLOADING
data DBusObjectSkeletonRemoveInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.MethodInfo DBusObjectSkeletonRemoveInterfaceMethodInfo a signature where
overloadedMethod _ = 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 object interfaceName = liftIO $ do
object' <- unsafeManagedPtrCastPtr object
interfaceName' <- textToCString interfaceName
g_dbus_object_skeleton_remove_interface_by_name object' interfaceName'
touchManagedPtr object
freeMem interfaceName'
return ()
#if ENABLE_OVERLOADING
data DBusObjectSkeletonRemoveInterfaceByNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonRemoveInterfaceByNameMethodInfo a signature where
overloadedMethod _ = 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 object objectPath = liftIO $ do
object' <- unsafeManagedPtrCastPtr object
objectPath' <- textToCString objectPath
g_dbus_object_skeleton_set_object_path object' objectPath'
touchManagedPtr object
freeMem objectPath'
return ()
#if ENABLE_OVERLOADING
data DBusObjectSkeletonSetObjectPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonSetObjectPathMethodInfo a signature where
overloadedMethod _ = dBusObjectSkeletonSetObjectPath
#endif