{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DBusMethodInvocation
(
DBusMethodInvocation(..) ,
IsDBusMethodInvocation ,
toDBusMethodInvocation ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusMethodInvocationMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetConnectionMethodInfo,
#endif
dBusMethodInvocationGetConnection ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetInterfaceNameMethodInfo,
#endif
dBusMethodInvocationGetInterfaceName ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetMessageMethodInfo,
#endif
dBusMethodInvocationGetMessage ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetMethodInfoMethodInfo,
#endif
dBusMethodInvocationGetMethodInfo ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetMethodNameMethodInfo,
#endif
dBusMethodInvocationGetMethodName ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetObjectPathMethodInfo,
#endif
dBusMethodInvocationGetObjectPath ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetParametersMethodInfo,
#endif
dBusMethodInvocationGetParameters ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetPropertyInfoMethodInfo,
#endif
dBusMethodInvocationGetPropertyInfo ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationGetSenderMethodInfo ,
#endif
dBusMethodInvocationGetSender ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationReturnDbusErrorMethodInfo,
#endif
dBusMethodInvocationReturnDbusError ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationReturnErrorLiteralMethodInfo,
#endif
dBusMethodInvocationReturnErrorLiteral ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationReturnGerrorMethodInfo,
#endif
dBusMethodInvocationReturnGerror ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationReturnValueMethodInfo,
#endif
dBusMethodInvocationReturnValue ,
#if defined(ENABLE_OVERLOADING)
DBusMethodInvocationReturnValueWithUnixFdListMethodInfo,
#endif
dBusMethodInvocationReturnValueWithUnixFdList,
) 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.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 Control.Monad.IO.Class as MIO
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.Objects.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMessage as Gio.DBusMessage
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
newtype DBusMethodInvocation = DBusMethodInvocation (SP.ManagedPtr DBusMethodInvocation)
deriving (DBusMethodInvocation -> DBusMethodInvocation -> Bool
(DBusMethodInvocation -> DBusMethodInvocation -> Bool)
-> (DBusMethodInvocation -> DBusMethodInvocation -> Bool)
-> Eq DBusMethodInvocation
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
$c/= :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
== :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
$c== :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusMethodInvocation where
toManagedPtr :: DBusMethodInvocation -> ManagedPtr DBusMethodInvocation
toManagedPtr (DBusMethodInvocation ManagedPtr DBusMethodInvocation
p) = ManagedPtr DBusMethodInvocation
p
foreign import ccall "g_dbus_method_invocation_get_type"
c_g_dbus_method_invocation_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusMethodInvocation where
glibType :: IO GType
glibType = IO GType
c_g_dbus_method_invocation_get_type
instance B.Types.GObject DBusMethodInvocation
instance B.GValue.IsGValue DBusMethodInvocation where
toGValue :: DBusMethodInvocation -> IO GValue
toGValue DBusMethodInvocation
o = do
GType
gtype <- IO GType
c_g_dbus_method_invocation_get_type
DBusMethodInvocation
-> (Ptr DBusMethodInvocation -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusMethodInvocation
o (GType
-> (GValue -> Ptr DBusMethodInvocation -> IO ())
-> Ptr DBusMethodInvocation
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr DBusMethodInvocation -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO DBusMethodInvocation
fromGValue GValue
gv = do
Ptr DBusMethodInvocation
ptr <- GValue -> IO (Ptr DBusMethodInvocation)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr DBusMethodInvocation)
(ManagedPtr DBusMethodInvocation -> DBusMethodInvocation)
-> Ptr DBusMethodInvocation -> IO DBusMethodInvocation
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
DBusMethodInvocation Ptr DBusMethodInvocation
ptr
class (SP.GObject o, O.IsDescendantOf DBusMethodInvocation o) => IsDBusMethodInvocation o
instance (SP.GObject o, O.IsDescendantOf DBusMethodInvocation o) => IsDBusMethodInvocation o
instance O.HasParentTypes DBusMethodInvocation
type instance O.ParentTypes DBusMethodInvocation = '[GObject.Object.Object]
toDBusMethodInvocation :: (MonadIO m, IsDBusMethodInvocation o) => o -> m DBusMethodInvocation
toDBusMethodInvocation :: o -> m DBusMethodInvocation
toDBusMethodInvocation = IO DBusMethodInvocation -> m DBusMethodInvocation
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusMethodInvocation -> m DBusMethodInvocation)
-> (o -> IO DBusMethodInvocation) -> o -> m DBusMethodInvocation
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusMethodInvocation -> DBusMethodInvocation)
-> o -> IO DBusMethodInvocation
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
DBusMethodInvocation
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusMethodInvocationMethod (t :: Symbol) (o :: *) :: * where
ResolveDBusMethodInvocationMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusMethodInvocationMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusMethodInvocationMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusMethodInvocationMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusMethodInvocationMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusMethodInvocationMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusMethodInvocationMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusMethodInvocationMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusMethodInvocationMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusMethodInvocationMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusMethodInvocationMethod "returnDbusError" o = DBusMethodInvocationReturnDbusErrorMethodInfo
ResolveDBusMethodInvocationMethod "returnErrorLiteral" o = DBusMethodInvocationReturnErrorLiteralMethodInfo
ResolveDBusMethodInvocationMethod "returnGerror" o = DBusMethodInvocationReturnGerrorMethodInfo
ResolveDBusMethodInvocationMethod "returnValue" o = DBusMethodInvocationReturnValueMethodInfo
ResolveDBusMethodInvocationMethod "returnValueWithUnixFdList" o = DBusMethodInvocationReturnValueWithUnixFdListMethodInfo
ResolveDBusMethodInvocationMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusMethodInvocationMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusMethodInvocationMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusMethodInvocationMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusMethodInvocationMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusMethodInvocationMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusMethodInvocationMethod "getConnection" o = DBusMethodInvocationGetConnectionMethodInfo
ResolveDBusMethodInvocationMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusMethodInvocationMethod "getInterfaceName" o = DBusMethodInvocationGetInterfaceNameMethodInfo
ResolveDBusMethodInvocationMethod "getMessage" o = DBusMethodInvocationGetMessageMethodInfo
ResolveDBusMethodInvocationMethod "getMethodInfo" o = DBusMethodInvocationGetMethodInfoMethodInfo
ResolveDBusMethodInvocationMethod "getMethodName" o = DBusMethodInvocationGetMethodNameMethodInfo
ResolveDBusMethodInvocationMethod "getObjectPath" o = DBusMethodInvocationGetObjectPathMethodInfo
ResolveDBusMethodInvocationMethod "getParameters" o = DBusMethodInvocationGetParametersMethodInfo
ResolveDBusMethodInvocationMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusMethodInvocationMethod "getPropertyInfo" o = DBusMethodInvocationGetPropertyInfoMethodInfo
ResolveDBusMethodInvocationMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusMethodInvocationMethod "getSender" o = DBusMethodInvocationGetSenderMethodInfo
ResolveDBusMethodInvocationMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusMethodInvocationMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusMethodInvocationMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusMethodInvocationMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusMethodInvocationMethod t DBusMethodInvocation, O.MethodInfo info DBusMethodInvocation p) => OL.IsLabel t (DBusMethodInvocation -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusMethodInvocation
type instance O.AttributeList DBusMethodInvocation = DBusMethodInvocationAttributeList
type DBusMethodInvocationAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusMethodInvocation = DBusMethodInvocationSignalList
type DBusMethodInvocationSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_dbus_method_invocation_get_connection" g_dbus_method_invocation_get_connection ::
Ptr DBusMethodInvocation ->
IO (Ptr Gio.DBusConnection.DBusConnection)
dBusMethodInvocationGetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m Gio.DBusConnection.DBusConnection
dBusMethodInvocationGetConnection :: a -> m DBusConnection
dBusMethodInvocationGetConnection a
invocation = IO DBusConnection -> m DBusConnection
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusConnection -> m DBusConnection)
-> IO DBusConnection -> m DBusConnection
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
Ptr DBusConnection
result <- Ptr DBusMethodInvocation -> IO (Ptr DBusConnection)
g_dbus_method_invocation_get_connection Ptr DBusMethodInvocation
invocation'
Text -> Ptr DBusConnection -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetConnection" Ptr DBusConnection
result
DBusConnection
result' <- ((ManagedPtr DBusConnection -> DBusConnection)
-> Ptr DBusConnection -> IO DBusConnection
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection) Ptr DBusConnection
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
DBusConnection -> IO DBusConnection
forall (m :: * -> *) a. Monad m => a -> m a
return DBusConnection
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetConnectionMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetConnection
#endif
foreign import ccall "g_dbus_method_invocation_get_interface_name" g_dbus_method_invocation_get_interface_name ::
Ptr DBusMethodInvocation ->
IO CString
dBusMethodInvocationGetInterfaceName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m T.Text
dBusMethodInvocationGetInterfaceName :: a -> m Text
dBusMethodInvocationGetInterfaceName a
invocation = 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 DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
CString
result <- Ptr DBusMethodInvocation -> IO CString
g_dbus_method_invocation_get_interface_name Ptr DBusMethodInvocation
invocation'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetInterfaceName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetInterfaceNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetInterfaceNameMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetInterfaceName
#endif
foreign import ccall "g_dbus_method_invocation_get_message" g_dbus_method_invocation_get_message ::
Ptr DBusMethodInvocation ->
IO (Ptr Gio.DBusMessage.DBusMessage)
dBusMethodInvocationGetMessage ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m Gio.DBusMessage.DBusMessage
dBusMethodInvocationGetMessage :: a -> m DBusMessage
dBusMethodInvocationGetMessage a
invocation = IO DBusMessage -> m DBusMessage
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusMessage -> m DBusMessage)
-> IO DBusMessage -> m DBusMessage
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
Ptr DBusMessage
result <- Ptr DBusMethodInvocation -> IO (Ptr DBusMessage)
g_dbus_method_invocation_get_message Ptr DBusMethodInvocation
invocation'
Text -> Ptr DBusMessage -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetMessage" Ptr DBusMessage
result
DBusMessage
result' <- ((ManagedPtr DBusMessage -> DBusMessage)
-> Ptr DBusMessage -> IO DBusMessage
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr DBusMessage -> DBusMessage
Gio.DBusMessage.DBusMessage) Ptr DBusMessage
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
DBusMessage -> IO DBusMessage
forall (m :: * -> *) a. Monad m => a -> m a
return DBusMessage
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMessageMethodInfo
instance (signature ~ (m Gio.DBusMessage.DBusMessage), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetMessageMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMessage
#endif
foreign import ccall "g_dbus_method_invocation_get_method_info" g_dbus_method_invocation_get_method_info ::
Ptr DBusMethodInvocation ->
IO (Ptr Gio.DBusMethodInfo.DBusMethodInfo)
dBusMethodInvocationGetMethodInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m Gio.DBusMethodInfo.DBusMethodInfo
dBusMethodInvocationGetMethodInfo :: a -> m DBusMethodInfo
dBusMethodInvocationGetMethodInfo a
invocation = IO DBusMethodInfo -> m DBusMethodInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusMethodInfo -> m DBusMethodInfo)
-> IO DBusMethodInfo -> m DBusMethodInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
Ptr DBusMethodInfo
result <- Ptr DBusMethodInvocation -> IO (Ptr DBusMethodInfo)
g_dbus_method_invocation_get_method_info Ptr DBusMethodInvocation
invocation'
Text -> Ptr DBusMethodInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetMethodInfo" Ptr DBusMethodInfo
result
DBusMethodInfo
result' <- ((ManagedPtr DBusMethodInfo -> DBusMethodInfo)
-> Ptr DBusMethodInfo -> IO DBusMethodInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusMethodInfo -> DBusMethodInfo
Gio.DBusMethodInfo.DBusMethodInfo) Ptr DBusMethodInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
DBusMethodInfo -> IO DBusMethodInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DBusMethodInfo
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMethodInfoMethodInfo
instance (signature ~ (m Gio.DBusMethodInfo.DBusMethodInfo), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetMethodInfoMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMethodInfo
#endif
foreign import ccall "g_dbus_method_invocation_get_method_name" g_dbus_method_invocation_get_method_name ::
Ptr DBusMethodInvocation ->
IO CString
dBusMethodInvocationGetMethodName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m T.Text
dBusMethodInvocationGetMethodName :: a -> m Text
dBusMethodInvocationGetMethodName a
invocation = 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 DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
CString
result <- Ptr DBusMethodInvocation -> IO CString
g_dbus_method_invocation_get_method_name Ptr DBusMethodInvocation
invocation'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetMethodName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMethodNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetMethodNameMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMethodName
#endif
foreign import ccall "g_dbus_method_invocation_get_object_path" g_dbus_method_invocation_get_object_path ::
Ptr DBusMethodInvocation ->
IO CString
dBusMethodInvocationGetObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m T.Text
dBusMethodInvocationGetObjectPath :: a -> m Text
dBusMethodInvocationGetObjectPath a
invocation = 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 DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
CString
result <- Ptr DBusMethodInvocation -> IO CString
g_dbus_method_invocation_get_object_path Ptr DBusMethodInvocation
invocation'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetObjectPath" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetObjectPathMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetObjectPath
#endif
foreign import ccall "g_dbus_method_invocation_get_parameters" g_dbus_method_invocation_get_parameters ::
Ptr DBusMethodInvocation ->
IO (Ptr GVariant)
dBusMethodInvocationGetParameters ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m GVariant
dBusMethodInvocationGetParameters :: a -> m GVariant
dBusMethodInvocationGetParameters a
invocation = IO GVariant -> m GVariant
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO GVariant -> m GVariant) -> IO GVariant -> m GVariant
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
Ptr GVariant
result <- Ptr DBusMethodInvocation -> IO (Ptr GVariant)
g_dbus_method_invocation_get_parameters Ptr DBusMethodInvocation
invocation'
Text -> Ptr GVariant -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetParameters" Ptr GVariant
result
GVariant
result' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
GVariant -> IO GVariant
forall (m :: * -> *) a. Monad m => a -> m a
return GVariant
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetParametersMethodInfo
instance (signature ~ (m GVariant), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetParametersMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetParameters
#endif
foreign import ccall "g_dbus_method_invocation_get_property_info" g_dbus_method_invocation_get_property_info ::
Ptr DBusMethodInvocation ->
IO (Ptr Gio.DBusPropertyInfo.DBusPropertyInfo)
dBusMethodInvocationGetPropertyInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m Gio.DBusPropertyInfo.DBusPropertyInfo
dBusMethodInvocationGetPropertyInfo :: a -> m DBusPropertyInfo
dBusMethodInvocationGetPropertyInfo a
invocation = IO DBusPropertyInfo -> m DBusPropertyInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusPropertyInfo -> m DBusPropertyInfo)
-> IO DBusPropertyInfo -> m DBusPropertyInfo
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
Ptr DBusPropertyInfo
result <- Ptr DBusMethodInvocation -> IO (Ptr DBusPropertyInfo)
g_dbus_method_invocation_get_property_info Ptr DBusMethodInvocation
invocation'
Text -> Ptr DBusPropertyInfo -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetPropertyInfo" Ptr DBusPropertyInfo
result
DBusPropertyInfo
result' <- ((ManagedPtr DBusPropertyInfo -> DBusPropertyInfo)
-> Ptr DBusPropertyInfo -> IO DBusPropertyInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusPropertyInfo -> DBusPropertyInfo
Gio.DBusPropertyInfo.DBusPropertyInfo) Ptr DBusPropertyInfo
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
DBusPropertyInfo -> IO DBusPropertyInfo
forall (m :: * -> *) a. Monad m => a -> m a
return DBusPropertyInfo
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetPropertyInfoMethodInfo
instance (signature ~ (m Gio.DBusPropertyInfo.DBusPropertyInfo), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetPropertyInfoMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetPropertyInfo
#endif
foreign import ccall "g_dbus_method_invocation_get_sender" g_dbus_method_invocation_get_sender ::
Ptr DBusMethodInvocation ->
IO CString
dBusMethodInvocationGetSender ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> m T.Text
dBusMethodInvocationGetSender :: a -> m Text
dBusMethodInvocationGetSender a
invocation = 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 DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
CString
result <- Ptr DBusMethodInvocation -> IO CString
g_dbus_method_invocation_get_sender Ptr DBusMethodInvocation
invocation'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"dBusMethodInvocationGetSender" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetSenderMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationGetSenderMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetSender
#endif
foreign import ccall "g_dbus_method_invocation_return_dbus_error" g_dbus_method_invocation_return_dbus_error ::
Ptr DBusMethodInvocation ->
CString ->
CString ->
IO ()
dBusMethodInvocationReturnDbusError ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> T.Text
-> T.Text
-> m ()
dBusMethodInvocationReturnDbusError :: a -> Text -> Text -> m ()
dBusMethodInvocationReturnDbusError a
invocation Text
errorName Text
errorMessage = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
CString
errorName' <- Text -> IO CString
textToCString Text
errorName
CString
errorMessage' <- Text -> IO CString
textToCString Text
errorMessage
Ptr DBusMethodInvocation -> CString -> CString -> IO ()
g_dbus_method_invocation_return_dbus_error Ptr DBusMethodInvocation
invocation' CString
errorName' CString
errorMessage'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
errorName'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
errorMessage'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnDbusErrorMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationReturnDbusErrorMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnDbusError
#endif
foreign import ccall "g_dbus_method_invocation_return_error_literal" g_dbus_method_invocation_return_error_literal ::
Ptr DBusMethodInvocation ->
Word32 ->
Int32 ->
CString ->
IO ()
dBusMethodInvocationReturnErrorLiteral ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> Word32
-> Int32
-> T.Text
-> m ()
dBusMethodInvocationReturnErrorLiteral :: a -> Word32 -> Int32 -> Text -> m ()
dBusMethodInvocationReturnErrorLiteral a
invocation Word32
domain Int32
code Text
message = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
CString
message' <- Text -> IO CString
textToCString Text
message
Ptr DBusMethodInvocation -> Word32 -> Int32 -> CString -> IO ()
g_dbus_method_invocation_return_error_literal Ptr DBusMethodInvocation
invocation' Word32
domain Int32
code CString
message'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
message'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnErrorLiteralMethodInfo
instance (signature ~ (Word32 -> Int32 -> T.Text -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationReturnErrorLiteralMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnErrorLiteral
#endif
foreign import ccall "g_dbus_method_invocation_return_gerror" g_dbus_method_invocation_return_gerror ::
Ptr DBusMethodInvocation ->
Ptr GError ->
IO ()
dBusMethodInvocationReturnGerror ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> GError
-> m ()
dBusMethodInvocationReturnGerror :: a -> GError -> m ()
dBusMethodInvocationReturnGerror a
invocation GError
error_ = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
Ptr GError
error_' <- GError -> IO (Ptr GError)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GError
error_
Ptr DBusMethodInvocation -> Ptr GError -> IO ()
g_dbus_method_invocation_return_gerror Ptr DBusMethodInvocation
invocation' Ptr GError
error_'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
GError -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr GError
error_
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnGerrorMethodInfo
instance (signature ~ (GError -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationReturnGerrorMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnGerror
#endif
foreign import ccall "g_dbus_method_invocation_return_value" g_dbus_method_invocation_return_value ::
Ptr DBusMethodInvocation ->
Ptr GVariant ->
IO ()
dBusMethodInvocationReturnValue ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a
-> Maybe (GVariant)
-> m ()
dBusMethodInvocationReturnValue :: a -> Maybe GVariant -> m ()
dBusMethodInvocationReturnValue a
invocation Maybe GVariant
parameters = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
Ptr GVariant
maybeParameters <- case Maybe GVariant
parameters of
Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
nullPtr
Just GVariant
jParameters -> do
Ptr GVariant
jParameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameters
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParameters'
Ptr DBusMethodInvocation -> Ptr GVariant -> IO ()
g_dbus_method_invocation_return_value Ptr DBusMethodInvocation
invocation' Ptr GVariant
maybeParameters
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
parameters GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnValueMethodInfo
instance (signature ~ (Maybe (GVariant) -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.MethodInfo DBusMethodInvocationReturnValueMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnValue
#endif
foreign import ccall "g_dbus_method_invocation_return_value_with_unix_fd_list" g_dbus_method_invocation_return_value_with_unix_fd_list ::
Ptr DBusMethodInvocation ->
Ptr GVariant ->
Ptr Gio.UnixFDList.UnixFDList ->
IO ()
dBusMethodInvocationReturnValueWithUnixFdList ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusMethodInvocation a, Gio.UnixFDList.IsUnixFDList b) =>
a
-> Maybe (GVariant)
-> Maybe (b)
-> m ()
dBusMethodInvocationReturnValueWithUnixFdList :: a -> Maybe GVariant -> Maybe b -> m ()
dBusMethodInvocationReturnValueWithUnixFdList a
invocation Maybe GVariant
parameters Maybe b
fdList = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr DBusMethodInvocation
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
Ptr GVariant
maybeParameters <- case Maybe GVariant
parameters of
Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
nullPtr
Just GVariant
jParameters -> do
Ptr GVariant
jParameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameters
Ptr GVariant -> IO (Ptr GVariant)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
jParameters'
Ptr UnixFDList
maybeFdList <- case Maybe b
fdList of
Maybe b
Nothing -> Ptr UnixFDList -> IO (Ptr UnixFDList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr UnixFDList
forall a. Ptr a
nullPtr
Just b
jFdList -> do
Ptr UnixFDList
jFdList' <- b -> IO (Ptr UnixFDList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFdList
Ptr UnixFDList -> IO (Ptr UnixFDList)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr UnixFDList
jFdList'
Ptr DBusMethodInvocation -> Ptr GVariant -> Ptr UnixFDList -> IO ()
g_dbus_method_invocation_return_value_with_unix_fd_list Ptr DBusMethodInvocation
invocation' Ptr GVariant
maybeParameters Ptr UnixFDList
maybeFdList
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
invocation
Maybe GVariant -> (GVariant -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe GVariant
parameters GVariant -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
fdList b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnValueWithUnixFdListMethodInfo
instance (signature ~ (Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsDBusMethodInvocation a, Gio.UnixFDList.IsUnixFDList b) => O.MethodInfo DBusMethodInvocationReturnValueWithUnixFdListMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnValueWithUnixFdList
#endif