#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.Gio.Objects.DBusObjectManagerServer
(
DBusObjectManagerServer(..) ,
IsDBusObjectManagerServer ,
toDBusObjectManagerServer ,
noDBusObjectManagerServer ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerExportMethodInfo ,
#endif
dBusObjectManagerServerExport ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerExportUniquelyMethodInfo,
#endif
dBusObjectManagerServerExportUniquely ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerGetConnectionMethodInfo,
#endif
dBusObjectManagerServerGetConnection ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerIsExportedMethodInfo,
#endif
dBusObjectManagerServerIsExported ,
dBusObjectManagerServerNew ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerSetConnectionMethodInfo,
#endif
dBusObjectManagerServerSetConnection ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerUnexportMethodInfo,
#endif
dBusObjectManagerServerUnexport ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerConnectionPropertyInfo,
#endif
clearDBusObjectManagerServerConnection ,
constructDBusObjectManagerServerConnection,
#if ENABLE_OVERLOADING
dBusObjectManagerServerConnection ,
#endif
getDBusObjectManagerServerConnection ,
setDBusObjectManagerServerConnection ,
#if ENABLE_OVERLOADING
DBusObjectManagerServerObjectPathPropertyInfo,
#endif
constructDBusObjectManagerServerObjectPath,
#if ENABLE_OVERLOADING
dBusObjectManagerServerObjectPath ,
#endif
getDBusObjectManagerServerObjectPath ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.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.DBusObjectManager as Gio.DBusObjectManager
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusObjectSkeleton as Gio.DBusObjectSkeleton
newtype DBusObjectManagerServer = DBusObjectManagerServer (ManagedPtr DBusObjectManagerServer)
foreign import ccall "g_dbus_object_manager_server_get_type"
c_g_dbus_object_manager_server_get_type :: IO GType
instance GObject DBusObjectManagerServer where
gobjectType _ = c_g_dbus_object_manager_server_get_type
class GObject o => IsDBusObjectManagerServer o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DBusObjectManagerServer a) =>
IsDBusObjectManagerServer a
#endif
instance IsDBusObjectManagerServer DBusObjectManagerServer
instance GObject.Object.IsObject DBusObjectManagerServer
instance Gio.DBusObjectManager.IsDBusObjectManager DBusObjectManagerServer
toDBusObjectManagerServer :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m DBusObjectManagerServer
toDBusObjectManagerServer = liftIO . unsafeCastTo DBusObjectManagerServer
noDBusObjectManagerServer :: Maybe DBusObjectManagerServer
noDBusObjectManagerServer = Nothing
#if ENABLE_OVERLOADING
type family ResolveDBusObjectManagerServerMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusObjectManagerServerMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusObjectManagerServerMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusObjectManagerServerMethod "export" o = DBusObjectManagerServerExportMethodInfo
ResolveDBusObjectManagerServerMethod "exportUniquely" o = DBusObjectManagerServerExportUniquelyMethodInfo
ResolveDBusObjectManagerServerMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusObjectManagerServerMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusObjectManagerServerMethod "isExported" o = DBusObjectManagerServerIsExportedMethodInfo
ResolveDBusObjectManagerServerMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusObjectManagerServerMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusObjectManagerServerMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusObjectManagerServerMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusObjectManagerServerMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusObjectManagerServerMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusObjectManagerServerMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusObjectManagerServerMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusObjectManagerServerMethod "unexport" o = DBusObjectManagerServerUnexportMethodInfo
ResolveDBusObjectManagerServerMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusObjectManagerServerMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusObjectManagerServerMethod "getConnection" o = DBusObjectManagerServerGetConnectionMethodInfo
ResolveDBusObjectManagerServerMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusObjectManagerServerMethod "getInterface" o = Gio.DBusObjectManager.DBusObjectManagerGetInterfaceMethodInfo
ResolveDBusObjectManagerServerMethod "getObject" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectMethodInfo
ResolveDBusObjectManagerServerMethod "getObjectPath" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectPathMethodInfo
ResolveDBusObjectManagerServerMethod "getObjects" o = Gio.DBusObjectManager.DBusObjectManagerGetObjectsMethodInfo
ResolveDBusObjectManagerServerMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusObjectManagerServerMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusObjectManagerServerMethod "setConnection" o = DBusObjectManagerServerSetConnectionMethodInfo
ResolveDBusObjectManagerServerMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusObjectManagerServerMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusObjectManagerServerMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusObjectManagerServerMethod t DBusObjectManagerServer, O.MethodInfo info DBusObjectManagerServer p) => O.IsLabelProxy t (DBusObjectManagerServer -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDBusObjectManagerServerMethod t DBusObjectManagerServer, O.MethodInfo info DBusObjectManagerServer p) => O.IsLabel t (DBusObjectManagerServer -> 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
getDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe Gio.DBusConnection.DBusConnection)
getDBusObjectManagerServerConnection obj = liftIO $ getObjectPropertyObject obj "connection" Gio.DBusConnection.DBusConnection
setDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o, Gio.DBusConnection.IsDBusConnection a) => o -> a -> m ()
setDBusObjectManagerServerConnection obj val = liftIO $ setObjectPropertyObject obj "connection" (Just val)
constructDBusObjectManagerServerConnection :: (IsDBusObjectManagerServer o, Gio.DBusConnection.IsDBusConnection a) => a -> IO (GValueConstruct o)
constructDBusObjectManagerServerConnection val = constructObjectPropertyObject "connection" (Just val)
clearDBusObjectManagerServerConnection :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m ()
clearDBusObjectManagerServerConnection obj = liftIO $ setObjectPropertyObject obj "connection" (Nothing :: Maybe Gio.DBusConnection.DBusConnection)
#if ENABLE_OVERLOADING
data DBusObjectManagerServerConnectionPropertyInfo
instance AttrInfo DBusObjectManagerServerConnectionPropertyInfo where
type AttrAllowedOps DBusObjectManagerServerConnectionPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusObjectManagerServerConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrBaseTypeConstraint DBusObjectManagerServerConnectionPropertyInfo = IsDBusObjectManagerServer
type AttrGetType DBusObjectManagerServerConnectionPropertyInfo = (Maybe Gio.DBusConnection.DBusConnection)
type AttrLabel DBusObjectManagerServerConnectionPropertyInfo = "connection"
type AttrOrigin DBusObjectManagerServerConnectionPropertyInfo = DBusObjectManagerServer
attrGet _ = getDBusObjectManagerServerConnection
attrSet _ = setDBusObjectManagerServerConnection
attrConstruct _ = constructDBusObjectManagerServerConnection
attrClear _ = clearDBusObjectManagerServerConnection
#endif
getDBusObjectManagerServerObjectPath :: (MonadIO m, IsDBusObjectManagerServer o) => o -> m (Maybe T.Text)
getDBusObjectManagerServerObjectPath obj = liftIO $ getObjectPropertyString obj "object-path"
constructDBusObjectManagerServerObjectPath :: (IsDBusObjectManagerServer o) => T.Text -> IO (GValueConstruct o)
constructDBusObjectManagerServerObjectPath val = constructObjectPropertyString "object-path" (Just val)
#if ENABLE_OVERLOADING
data DBusObjectManagerServerObjectPathPropertyInfo
instance AttrInfo DBusObjectManagerServerObjectPathPropertyInfo where
type AttrAllowedOps DBusObjectManagerServerObjectPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint DBusObjectManagerServerObjectPathPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint DBusObjectManagerServerObjectPathPropertyInfo = IsDBusObjectManagerServer
type AttrGetType DBusObjectManagerServerObjectPathPropertyInfo = (Maybe T.Text)
type AttrLabel DBusObjectManagerServerObjectPathPropertyInfo = "object-path"
type AttrOrigin DBusObjectManagerServerObjectPathPropertyInfo = DBusObjectManagerServer
attrGet _ = getDBusObjectManagerServerObjectPath
attrSet _ = undefined
attrConstruct _ = constructDBusObjectManagerServerObjectPath
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList DBusObjectManagerServer
type instance O.AttributeList DBusObjectManagerServer = DBusObjectManagerServerAttributeList
type DBusObjectManagerServerAttributeList = ('[ '("connection", DBusObjectManagerServerConnectionPropertyInfo), '("objectPath", DBusObjectManagerServerObjectPathPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
dBusObjectManagerServerConnection :: AttrLabelProxy "connection"
dBusObjectManagerServerConnection = AttrLabelProxy
dBusObjectManagerServerObjectPath :: AttrLabelProxy "objectPath"
dBusObjectManagerServerObjectPath = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList DBusObjectManagerServer = DBusObjectManagerServerSignalList
type DBusObjectManagerServerSignalList = ('[ '("interfaceAdded", Gio.DBusObjectManager.DBusObjectManagerInterfaceAddedSignalInfo), '("interfaceRemoved", Gio.DBusObjectManager.DBusObjectManagerInterfaceRemovedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo), '("objectAdded", Gio.DBusObjectManager.DBusObjectManagerObjectAddedSignalInfo), '("objectRemoved", Gio.DBusObjectManager.DBusObjectManagerObjectRemovedSignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_object_manager_server_new" g_dbus_object_manager_server_new ::
CString ->
IO (Ptr DBusObjectManagerServer)
dBusObjectManagerServerNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m DBusObjectManagerServer
dBusObjectManagerServerNew objectPath = liftIO $ do
objectPath' <- textToCString objectPath
result <- g_dbus_object_manager_server_new objectPath'
checkUnexpectedReturnNULL "dBusObjectManagerServerNew" result
result' <- (wrapObject DBusObjectManagerServer) result
freeMem objectPath'
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "g_dbus_object_manager_server_export" g_dbus_object_manager_server_export ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO ()
dBusObjectManagerServerExport ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m ()
dBusObjectManagerServerExport manager object = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
object' <- unsafeManagedPtrCastPtr object
g_dbus_object_manager_server_export manager' object'
touchManagedPtr manager
touchManagedPtr object
return ()
#if ENABLE_OVERLOADING
data DBusObjectManagerServerExportMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerExportMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerExport
#endif
foreign import ccall "g_dbus_object_manager_server_export_uniquely" g_dbus_object_manager_server_export_uniquely ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO ()
dBusObjectManagerServerExportUniquely ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m ()
dBusObjectManagerServerExportUniquely manager object = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
object' <- unsafeManagedPtrCastPtr object
g_dbus_object_manager_server_export_uniquely manager' object'
touchManagedPtr manager
touchManagedPtr object
return ()
#if ENABLE_OVERLOADING
data DBusObjectManagerServerExportUniquelyMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerExportUniquelyMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerExportUniquely
#endif
foreign import ccall "g_dbus_object_manager_server_get_connection" g_dbus_object_manager_server_get_connection ::
Ptr DBusObjectManagerServer ->
IO (Ptr Gio.DBusConnection.DBusConnection)
dBusObjectManagerServerGetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a
-> m Gio.DBusConnection.DBusConnection
dBusObjectManagerServerGetConnection manager = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
result <- g_dbus_object_manager_server_get_connection manager'
checkUnexpectedReturnNULL "dBusObjectManagerServerGetConnection" result
result' <- (wrapObject Gio.DBusConnection.DBusConnection) result
touchManagedPtr manager
return result'
#if ENABLE_OVERLOADING
data DBusObjectManagerServerGetConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsDBusObjectManagerServer a) => O.MethodInfo DBusObjectManagerServerGetConnectionMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerGetConnection
#endif
foreign import ccall "g_dbus_object_manager_server_is_exported" g_dbus_object_manager_server_is_exported ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusObjectSkeleton.DBusObjectSkeleton ->
IO CInt
dBusObjectManagerServerIsExported ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) =>
a
-> b
-> m Bool
dBusObjectManagerServerIsExported manager object = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
object' <- unsafeManagedPtrCastPtr object
result <- g_dbus_object_manager_server_is_exported manager' object'
let result' = (/= 0) result
touchManagedPtr manager
touchManagedPtr object
return result'
#if ENABLE_OVERLOADING
data DBusObjectManagerServerIsExportedMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusObjectSkeleton.IsDBusObjectSkeleton b) => O.MethodInfo DBusObjectManagerServerIsExportedMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerIsExported
#endif
foreign import ccall "g_dbus_object_manager_server_set_connection" g_dbus_object_manager_server_set_connection ::
Ptr DBusObjectManagerServer ->
Ptr Gio.DBusConnection.DBusConnection ->
IO ()
dBusObjectManagerServerSetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a, Gio.DBusConnection.IsDBusConnection b) =>
a
-> Maybe (b)
-> m ()
dBusObjectManagerServerSetConnection manager connection = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
maybeConnection <- case connection of
Nothing -> return nullPtr
Just jConnection -> do
jConnection' <- unsafeManagedPtrCastPtr jConnection
return jConnection'
g_dbus_object_manager_server_set_connection manager' maybeConnection
touchManagedPtr manager
whenJust connection touchManagedPtr
return ()
#if ENABLE_OVERLOADING
data DBusObjectManagerServerSetConnectionMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDBusObjectManagerServer a, Gio.DBusConnection.IsDBusConnection b) => O.MethodInfo DBusObjectManagerServerSetConnectionMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerSetConnection
#endif
foreign import ccall "g_dbus_object_manager_server_unexport" g_dbus_object_manager_server_unexport ::
Ptr DBusObjectManagerServer ->
CString ->
IO CInt
dBusObjectManagerServerUnexport ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusObjectManagerServer a) =>
a
-> T.Text
-> m Bool
dBusObjectManagerServerUnexport manager objectPath = liftIO $ do
manager' <- unsafeManagedPtrCastPtr manager
objectPath' <- textToCString objectPath
result <- g_dbus_object_manager_server_unexport manager' objectPath'
let result' = (/= 0) result
touchManagedPtr manager
freeMem objectPath'
return result'
#if ENABLE_OVERLOADING
data DBusObjectManagerServerUnexportMethodInfo
instance (signature ~ (T.Text -> m Bool), MonadIO m, IsDBusObjectManagerServer a) => O.MethodInfo DBusObjectManagerServerUnexportMethodInfo a signature where
overloadedMethod _ = dBusObjectManagerServerUnexport
#endif