{-# 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.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.Parameter as GObject.Parameter
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
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.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.InputStream as Gio.InputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuAttributeIter as Gio.MenuAttributeIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuLinkIter as Gio.MenuLinkIter
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import {-# SOURCE #-} qualified GI.Gio.Objects.OutputStream as Gio.OutputStream
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusAnnotationInfo as Gio.DBusAnnotationInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusArgInfo as Gio.DBusArgInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusMethodInfo as Gio.DBusMethodInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusPropertyInfo as Gio.DBusPropertyInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSignalInfo as Gio.DBusSignalInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSubtreeVTable as Gio.DBusSubtreeVTable
import {-# SOURCE #-} qualified GI.Gio.Structs.OutputVector as Gio.OutputVector
#else
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
#endif
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
$c== :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
== :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
$c/= :: DBusMethodInvocation -> DBusMethodInvocation -> Bool
/= :: 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
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 :: (MIO.MonadIO m, IsDBusMethodInvocation o) => o -> m DBusMethodInvocation
toDBusMethodInvocation :: forall (m :: * -> *) o.
(MonadIO m, IsDBusMethodInvocation o) =>
o -> m DBusMethodInvocation
toDBusMethodInvocation = IO DBusMethodInvocation -> m DBusMethodInvocation
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.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'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusMethodInvocation -> DBusMethodInvocation
DBusMethodInvocation
instance B.GValue.IsGValue (Maybe DBusMethodInvocation) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_method_invocation_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusMethodInvocation -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusMethodInvocation
P.Nothing = Ptr GValue -> Ptr DBusMethodInvocation -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DBusMethodInvocation
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusMethodInvocation)
gvalueSet_ Ptr GValue
gv (P.Just DBusMethodInvocation
obj) = DBusMethodInvocation
-> (Ptr DBusMethodInvocation -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusMethodInvocation
obj (Ptr GValue -> Ptr DBusMethodInvocation -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusMethodInvocation)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusMethodInvocation)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusMethodInvocation)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DBusMethodInvocation ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusMethodInvocationMethod (t :: Symbol) (o :: DK.Type) :: DK.Type 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.OverloadedMethod 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
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDBusMethodInvocationMethod t DBusMethodInvocation, O.OverloadedMethod info DBusMethodInvocation p, R.HasField t DBusMethodInvocation p) => R.HasField t DBusMethodInvocation p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusMethodInvocationMethod t DBusMethodInvocation, O.OverloadedMethodInfo info DBusMethodInvocation) => OL.IsLabel t (O.MethodProxy info DBusMethodInvocation) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusMethodInvocation
type instance O.AttributeList DBusMethodInvocation = DBusMethodInvocationAttributeList
type DBusMethodInvocationAttributeList = ('[ ] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusMethodInvocation = DBusMethodInvocationSignalList
type DBusMethodInvocationSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m DBusConnection
dBusMethodInvocationGetConnection a
invocation = IO DBusConnection -> m DBusConnection
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_connection invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetConnection" result
result' <- (newObject Gio.DBusConnection.DBusConnection) result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetConnectionMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetConnection
instance O.OverloadedMethodInfo DBusMethodInvocationGetConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m Text
dBusMethodInvocationGetInterfaceName a
invocation = IO Text -> m Text
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_interface_name invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetInterfaceName" result
result' <- cstringToText result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetInterfaceNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetInterfaceNameMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetInterfaceName
instance O.OverloadedMethodInfo DBusMethodInvocationGetInterfaceNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetInterfaceName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m DBusMessage
dBusMethodInvocationGetMessage a
invocation = IO DBusMessage -> m DBusMessage
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_message invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetMessage" result
result' <- (newObject Gio.DBusMessage.DBusMessage) result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMessageMethodInfo
instance (signature ~ (m Gio.DBusMessage.DBusMessage), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetMessageMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMessage
instance O.OverloadedMethodInfo DBusMethodInvocationGetMessageMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetMessage",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 (Maybe Gio.DBusMethodInfo.DBusMethodInfo)
dBusMethodInvocationGetMethodInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m (Maybe DBusMethodInfo)
dBusMethodInvocationGetMethodInfo a
invocation = IO (Maybe DBusMethodInfo) -> m (Maybe DBusMethodInfo)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusMethodInfo) -> m (Maybe DBusMethodInfo))
-> IO (Maybe DBusMethodInfo) -> m (Maybe DBusMethodInfo)
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_method_info invocation'
maybeResult <- convertIfNonNull result $ \Ptr DBusMethodInfo
result' -> do
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'
return result''
touchManagedPtr invocation
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMethodInfoMethodInfo
instance (signature ~ (m (Maybe Gio.DBusMethodInfo.DBusMethodInfo)), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetMethodInfoMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMethodInfo
instance O.OverloadedMethodInfo DBusMethodInvocationGetMethodInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetMethodInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m Text
dBusMethodInvocationGetMethodName a
invocation = IO Text -> m Text
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_method_name invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetMethodName" result
result' <- cstringToText result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetMethodNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetMethodNameMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetMethodName
instance O.OverloadedMethodInfo DBusMethodInvocationGetMethodNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetMethodName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m Text
dBusMethodInvocationGetObjectPath a
invocation = IO Text -> m Text
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_object_path invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetObjectPath" result
result' <- cstringToText result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetObjectPathMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetObjectPath
instance O.OverloadedMethodInfo DBusMethodInvocationGetObjectPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetObjectPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m GVariant
dBusMethodInvocationGetParameters a
invocation = IO GVariant -> m GVariant
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_parameters invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetParameters" result
result' <- B.GVariant.newGVariantFromPtr result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetParametersMethodInfo
instance (signature ~ (m GVariant), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetParametersMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetParameters
instance O.OverloadedMethodInfo DBusMethodInvocationGetParametersMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetParameters",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 (Maybe Gio.DBusPropertyInfo.DBusPropertyInfo)
dBusMethodInvocationGetPropertyInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m (Maybe DBusPropertyInfo)
dBusMethodInvocationGetPropertyInfo a
invocation = IO (Maybe DBusPropertyInfo) -> m (Maybe DBusPropertyInfo)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusPropertyInfo) -> m (Maybe DBusPropertyInfo))
-> IO (Maybe DBusPropertyInfo) -> m (Maybe DBusPropertyInfo)
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_property_info invocation'
maybeResult <- convertIfNonNull result $ \Ptr DBusPropertyInfo
result' -> do
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'
return result''
touchManagedPtr invocation
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetPropertyInfoMethodInfo
instance (signature ~ (m (Maybe Gio.DBusPropertyInfo.DBusPropertyInfo)), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetPropertyInfoMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetPropertyInfo
instance O.OverloadedMethodInfo DBusMethodInvocationGetPropertyInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetPropertyInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> m Text
dBusMethodInvocationGetSender a
invocation = IO Text -> m Text
forall a. IO a -> m a
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
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
invocation
result <- g_dbus_method_invocation_get_sender invocation'
checkUnexpectedReturnNULL "dBusMethodInvocationGetSender" result
result' <- cstringToText result
touchManagedPtr invocation
return result'
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationGetSenderMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationGetSenderMethodInfo a signature where
overloadedMethod = dBusMethodInvocationGetSender
instance O.OverloadedMethodInfo DBusMethodInvocationGetSenderMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationGetSender",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> Text -> Text -> m ()
dBusMethodInvocationReturnDbusError a
invocation Text
errorName Text
errorMessage = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
errorName' <- textToCString errorName
errorMessage' <- textToCString errorMessage
g_dbus_method_invocation_return_dbus_error invocation' errorName' errorMessage'
touchManagedPtr invocation
freeMem errorName'
freeMem errorMessage'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnDbusErrorMethodInfo
instance (signature ~ (T.Text -> T.Text -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationReturnDbusErrorMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnDbusError
instance O.OverloadedMethodInfo DBusMethodInvocationReturnDbusErrorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationReturnDbusError",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> Word32 -> Int32 -> Text -> m ()
dBusMethodInvocationReturnErrorLiteral a
invocation Word32
domain Int32
code Text
message = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
message' <- textToCString message
g_dbus_method_invocation_return_error_literal invocation' domain code message'
touchManagedPtr invocation
freeMem message'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnErrorLiteralMethodInfo
instance (signature ~ (Word32 -> Int32 -> T.Text -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationReturnErrorLiteralMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnErrorLiteral
instance O.OverloadedMethodInfo DBusMethodInvocationReturnErrorLiteralMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationReturnErrorLiteral",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> GError -> m ()
dBusMethodInvocationReturnGerror a
invocation GError
error_ = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
error_' <- unsafeManagedPtrGetPtr error_
g_dbus_method_invocation_return_gerror invocation' error_'
touchManagedPtr invocation
touchManagedPtr error_
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnGerrorMethodInfo
instance (signature ~ (GError -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationReturnGerrorMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnGerror
instance O.OverloadedMethodInfo DBusMethodInvocationReturnGerrorMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationReturnGerror",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a) =>
a -> Maybe GVariant -> m ()
dBusMethodInvocationReturnValue a
invocation Maybe GVariant
parameters = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
maybeParameters <- case parameters of
Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
FP.nullPtr
Just GVariant
jParameters -> do
jParameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameters
return jParameters'
g_dbus_method_invocation_return_value invocation' maybeParameters
touchManagedPtr invocation
whenJust parameters touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnValueMethodInfo
instance (signature ~ (Maybe (GVariant) -> m ()), MonadIO m, IsDBusMethodInvocation a) => O.OverloadedMethod DBusMethodInvocationReturnValueMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnValue
instance O.OverloadedMethodInfo DBusMethodInvocationReturnValueMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationReturnValue",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v: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 :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusMethodInvocation a,
IsUnixFDList b) =>
a -> Maybe GVariant -> Maybe b -> m ()
dBusMethodInvocationReturnValueWithUnixFdList a
invocation Maybe GVariant
parameters Maybe b
fdList = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
invocation' <- a -> IO (Ptr DBusMethodInvocation)
forall a b. (HasCallStack, GObject a) => a -> IO (Ptr b)
B.ManagedPtr.disownObject a
invocation
maybeParameters <- case parameters of
Maybe GVariant
Nothing -> Ptr GVariant -> IO (Ptr GVariant)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr GVariant
forall a. Ptr a
FP.nullPtr
Just GVariant
jParameters -> do
jParameters' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jParameters
return jParameters'
maybeFdList <- case fdList of
Maybe b
Nothing -> Ptr UnixFDList -> IO (Ptr UnixFDList)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr UnixFDList
forall a. Ptr a
FP.nullPtr
Just b
jFdList -> do
jFdList' <- b -> IO (Ptr UnixFDList)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jFdList
return jFdList'
g_dbus_method_invocation_return_value_with_unix_fd_list invocation' maybeParameters maybeFdList
touchManagedPtr invocation
whenJust parameters touchManagedPtr
whenJust fdList touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusMethodInvocationReturnValueWithUnixFdListMethodInfo
instance (signature ~ (Maybe (GVariant) -> Maybe (b) -> m ()), MonadIO m, IsDBusMethodInvocation a, Gio.UnixFDList.IsUnixFDList b) => O.OverloadedMethod DBusMethodInvocationReturnValueWithUnixFdListMethodInfo a signature where
overloadedMethod = dBusMethodInvocationReturnValueWithUnixFdList
instance O.OverloadedMethodInfo DBusMethodInvocationReturnValueWithUnixFdListMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusMethodInvocation.dBusMethodInvocationReturnValueWithUnixFdList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusMethodInvocation.html#v:dBusMethodInvocationReturnValueWithUnixFdList"
})
#endif