{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton' instance is essentially a group of D-Bus
interfaces. The set of exported interfaces on the object may be
dynamic and change at runtime.

This type is intended to be used with 'GI.Gio.Interfaces.DBusObjectManager.DBusObjectManager'.
-}

module GI.Gio.Objects.DBusObjectSkeleton
    ( 

-- * Exported types
    DBusObjectSkeleton(..)                  ,
    IsDBusObjectSkeleton                    ,
    toDBusObjectSkeleton                    ,
    noDBusObjectSkeleton                    ,


 -- * Methods
-- ** addInterface #method:addInterface#
    DBusObjectSkeletonAddInterfaceMethodInfo,
    dBusObjectSkeletonAddInterface          ,


-- ** flush #method:flush#
    DBusObjectSkeletonFlushMethodInfo       ,
    dBusObjectSkeletonFlush                 ,


-- ** new #method:new#
    dBusObjectSkeletonNew                   ,


-- ** removeInterface #method:removeInterface#
    DBusObjectSkeletonRemoveInterfaceMethodInfo,
    dBusObjectSkeletonRemoveInterface       ,


-- ** removeInterfaceByName #method:removeInterfaceByName#
    DBusObjectSkeletonRemoveInterfaceByNameMethodInfo,
    dBusObjectSkeletonRemoveInterfaceByName ,


-- ** setObjectPath #method:setObjectPath#
    DBusObjectSkeletonSetObjectPathMethodInfo,
    dBusObjectSkeletonSetObjectPath         ,




 -- * Properties
-- ** gObjectPath #attr:gObjectPath#
    DBusObjectSkeletonGObjectPathPropertyInfo,
    clearDBusObjectSkeletonGObjectPath      ,
    constructDBusObjectSkeletonGObjectPath  ,
    dBusObjectSkeletonGObjectPath           ,
    getDBusObjectSkeletonGObjectPath        ,
    setDBusObjectSkeletonGObjectPath        ,




 -- * Signals
-- ** authorizeMethod #signal:authorizeMethod#
    C_DBusObjectSkeletonAuthorizeMethodCallback,
    DBusObjectSkeletonAuthorizeMethodCallback,
    DBusObjectSkeletonAuthorizeMethodSignalInfo,
    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.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 :: IsDBusObjectSkeleton o => o -> IO DBusObjectSkeleton
toDBusObjectSkeleton = unsafeCastTo DBusObjectSkeleton

noDBusObjectSkeleton :: Maybe DBusObjectSkeleton
noDBusObjectSkeleton = Nothing

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 "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 "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDBusObjectSkeletonMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    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
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- signal DBusObjectSkeleton::authorize-method
type DBusObjectSkeletonAuthorizeMethodCallback =
    Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
    Gio.DBusMethodInvocation.DBusMethodInvocation ->
    IO Bool

noDBusObjectSkeletonAuthorizeMethodCallback :: Maybe DBusObjectSkeletonAuthorizeMethodCallback
noDBusObjectSkeletonAuthorizeMethodCallback = Nothing

type C_DBusObjectSkeletonAuthorizeMethodCallback =
    Ptr () ->                               -- object
    Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
    Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
    Ptr () ->                               -- user_data
    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 ->
    Ptr () ->
    Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton ->
    Ptr Gio.DBusMethodInvocation.DBusMethodInvocation ->
    Ptr () ->
    IO CInt
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 :: (GObject a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
onDBusObjectSkeletonAuthorizeMethod obj cb = liftIO $ connectDBusObjectSkeletonAuthorizeMethod obj cb SignalConnectBefore
afterDBusObjectSkeletonAuthorizeMethod :: (GObject a, MonadIO m) => a -> DBusObjectSkeletonAuthorizeMethodCallback -> m SignalHandlerId
afterDBusObjectSkeletonAuthorizeMethod obj cb = connectDBusObjectSkeletonAuthorizeMethod obj cb SignalConnectAfter

connectDBusObjectSkeletonAuthorizeMethod :: (GObject a, MonadIO m) =>
                                            a -> DBusObjectSkeletonAuthorizeMethodCallback -> SignalConnectMode -> m SignalHandlerId
connectDBusObjectSkeletonAuthorizeMethod obj cb after = liftIO $ do
    let cb' = wrap_DBusObjectSkeletonAuthorizeMethodCallback cb
    cb'' <- mk_DBusObjectSkeletonAuthorizeMethodCallback cb'
    connectSignalFunPtr obj "authorize-method" cb'' after

-- VVV Prop "g-object-path"
   -- Type: TBasicType TUTF8
   -- Flags: [PropertyReadable,PropertyWritable,PropertyConstruct]
   -- Nullable: (Nothing,Nothing)

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)

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

instance O.HasAttributeList DBusObjectSkeleton
type instance O.AttributeList DBusObjectSkeleton = DBusObjectSkeletonAttributeList
type DBusObjectSkeletonAttributeList = ('[ '("gObjectPath", DBusObjectSkeletonGObjectPathPropertyInfo)] :: [(Symbol, *)])

dBusObjectSkeletonGObjectPath :: AttrLabelProxy "gObjectPath"
dBusObjectSkeletonGObjectPath = AttrLabelProxy

data DBusObjectSkeletonAuthorizeMethodSignalInfo
instance SignalInfo DBusObjectSkeletonAuthorizeMethodSignalInfo where
    type HaskellCallbackType DBusObjectSkeletonAuthorizeMethodSignalInfo = DBusObjectSkeletonAuthorizeMethodCallback
    connectSignal _ = connectDBusObjectSkeletonAuthorizeMethod

type instance O.SignalList DBusObjectSkeleton = DBusObjectSkeletonSignalList
type DBusObjectSkeletonSignalList = ('[ '("authorizeMethod", DBusObjectSkeletonAuthorizeMethodSignalInfo), '("interfaceAdded", Gio.DBusObject.DBusObjectInterfaceAddedSignalInfo), '("interfaceRemoved", Gio.DBusObject.DBusObjectInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DBusObjectSkeleton::new
-- method type : Constructor
-- Args : [Arg {argCName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "An object path.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}))
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_new" g_dbus_object_skeleton_new :: 
    CString ->                              -- object_path : TBasicType TUTF8
    IO (Ptr DBusObjectSkeleton)

{- |
Creates a new 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'.

@since 2.30
-}
dBusObjectSkeletonNew ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    T.Text
    {- ^ /@objectPath@/: An object path. -}
    -> m DBusObjectSkeleton
    {- ^ __Returns:__ A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. Free with 'GI.GObject.Objects.Object.objectUnref'. -}
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'

-- method DBusObjectSkeleton::add_interface
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusObjectSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interface_", argType = TInterface (Name {namespace = "Gio", name = "DBusInterfaceSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusInterfaceSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_add_interface" g_dbus_object_skeleton_add_interface :: 
    Ptr DBusObjectSkeleton ->               -- object : TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"})
    Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton -> -- interface_ : TInterface (Name {namespace = "Gio", name = "DBusInterfaceSkeleton"})
    IO ()

{- |
Adds /@interface_@/ to /@object@/.

If /@object@/ already contains a 'GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton' with the same
interface name, it is removed before /@interface_@/ is added.

Note that /@object@/ takes its own reference on /@interface_@/ and holds
it until removed.

@since 2.30
-}
dBusObjectSkeletonAddInterface ::
    (B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) =>
    a
    {- ^ /@object@/: A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. -}
    -> b
    {- ^ /@interface_@/: A 'GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton'. -}
    -> 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 ()

data DBusObjectSkeletonAddInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.MethodInfo DBusObjectSkeletonAddInterfaceMethodInfo a signature where
    overloadedMethod _ = dBusObjectSkeletonAddInterface

-- method DBusObjectSkeleton::flush
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusObjectSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_flush" g_dbus_object_skeleton_flush :: 
    Ptr DBusObjectSkeleton ->               -- object : TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"})
    IO ()

{- |
This method simply calls 'GI.Gio.Objects.DBusInterfaceSkeleton.dBusInterfaceSkeletonFlush' on all
interfaces belonging to /@object@/. See that method for when flushing
is useful.

@since 2.30
-}
dBusObjectSkeletonFlush ::
    (B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
    a
    {- ^ /@object@/: A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. -}
    -> m ()
dBusObjectSkeletonFlush object = liftIO $ do
    object' <- unsafeManagedPtrCastPtr object
    g_dbus_object_skeleton_flush object'
    touchManagedPtr object
    return ()

data DBusObjectSkeletonFlushMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonFlushMethodInfo a signature where
    overloadedMethod _ = dBusObjectSkeletonFlush

-- method DBusObjectSkeleton::remove_interface
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusObjectSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interface_", argType = TInterface (Name {namespace = "Gio", name = "DBusInterfaceSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusInterfaceSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_remove_interface" g_dbus_object_skeleton_remove_interface :: 
    Ptr DBusObjectSkeleton ->               -- object : TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"})
    Ptr Gio.DBusInterfaceSkeleton.DBusInterfaceSkeleton -> -- interface_ : TInterface (Name {namespace = "Gio", name = "DBusInterfaceSkeleton"})
    IO ()

{- |
Removes /@interface_@/ from /@object@/.

@since 2.30
-}
dBusObjectSkeletonRemoveInterface ::
    (B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) =>
    a
    {- ^ /@object@/: A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. -}
    -> b
    {- ^ /@interface_@/: A 'GI.Gio.Objects.DBusInterfaceSkeleton.DBusInterfaceSkeleton'. -}
    -> 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 ()

data DBusObjectSkeletonRemoveInterfaceMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectSkeleton a, Gio.DBusInterfaceSkeleton.IsDBusInterfaceSkeleton b) => O.MethodInfo DBusObjectSkeletonRemoveInterfaceMethodInfo a signature where
    overloadedMethod _ = dBusObjectSkeletonRemoveInterface

-- method DBusObjectSkeleton::remove_interface_by_name
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusObjectSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "interface_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A D-Bus interface name.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_remove_interface_by_name" g_dbus_object_skeleton_remove_interface_by_name :: 
    Ptr DBusObjectSkeleton ->               -- object : TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"})
    CString ->                              -- interface_name : TBasicType TUTF8
    IO ()

{- |
Removes the 'GI.Gio.Interfaces.DBusInterface.DBusInterface' with /@interfaceName@/ from /@object@/.

If no D-Bus interface of the given interface exists, this function
does nothing.

@since 2.30
-}
dBusObjectSkeletonRemoveInterfaceByName ::
    (B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
    a
    {- ^ /@object@/: A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. -}
    -> T.Text
    {- ^ /@interfaceName@/: A D-Bus interface name. -}
    -> 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 ()

data DBusObjectSkeletonRemoveInterfaceByNameMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonRemoveInterfaceByNameMethodInfo a signature where
    overloadedMethod _ = dBusObjectSkeletonRemoveInterfaceByName

-- method DBusObjectSkeleton::set_object_path
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "object", argType = TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GDBusObjectSkeleton.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "object_path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A valid D-Bus object path.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "g_dbus_object_skeleton_set_object_path" g_dbus_object_skeleton_set_object_path :: 
    Ptr DBusObjectSkeleton ->               -- object : TInterface (Name {namespace = "Gio", name = "DBusObjectSkeleton"})
    CString ->                              -- object_path : TBasicType TUTF8
    IO ()

{- |
Sets the object path for /@object@/.

@since 2.30
-}
dBusObjectSkeletonSetObjectPath ::
    (B.CallStack.HasCallStack, MonadIO m, IsDBusObjectSkeleton a) =>
    a
    {- ^ /@object@/: A 'GI.Gio.Objects.DBusObjectSkeleton.DBusObjectSkeleton'. -}
    -> T.Text
    {- ^ /@objectPath@/: A valid D-Bus object path. -}
    -> 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 ()

data DBusObjectSkeletonSetObjectPathMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m, IsDBusObjectSkeleton a) => O.MethodInfo DBusObjectSkeletonSetObjectPathMethodInfo a signature where
    overloadedMethod _ = dBusObjectSkeletonSetObjectPath