{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DBusProxy
(
DBusProxy(..) ,
IsDBusProxy ,
toDBusProxy ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusProxyMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusProxyCallMethodInfo ,
#endif
dBusProxyCall ,
#if defined(ENABLE_OVERLOADING)
DBusProxyCallFinishMethodInfo ,
#endif
dBusProxyCallFinish ,
#if defined(ENABLE_OVERLOADING)
DBusProxyCallSyncMethodInfo ,
#endif
dBusProxyCallSync ,
#if defined(ENABLE_OVERLOADING)
DBusProxyCallWithUnixFdListMethodInfo ,
#endif
dBusProxyCallWithUnixFdList ,
#if defined(ENABLE_OVERLOADING)
DBusProxyCallWithUnixFdListFinishMethodInfo,
#endif
dBusProxyCallWithUnixFdListFinish ,
#if defined(ENABLE_OVERLOADING)
DBusProxyCallWithUnixFdListSyncMethodInfo,
#endif
dBusProxyCallWithUnixFdListSync ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetCachedPropertyMethodInfo ,
#endif
dBusProxyGetCachedProperty ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetCachedPropertyNamesMethodInfo,
#endif
dBusProxyGetCachedPropertyNames ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetConnectionMethodInfo ,
#endif
dBusProxyGetConnection ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetDefaultTimeoutMethodInfo ,
#endif
dBusProxyGetDefaultTimeout ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetFlagsMethodInfo ,
#endif
dBusProxyGetFlags ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetInterfaceInfoMethodInfo ,
#endif
dBusProxyGetInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetInterfaceNameMethodInfo ,
#endif
dBusProxyGetInterfaceName ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetNameMethodInfo ,
#endif
dBusProxyGetName ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetNameOwnerMethodInfo ,
#endif
dBusProxyGetNameOwner ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGetObjectPathMethodInfo ,
#endif
dBusProxyGetObjectPath ,
dBusProxyNew ,
dBusProxyNewFinish ,
dBusProxyNewForBus ,
dBusProxyNewForBusFinish ,
dBusProxyNewForBusSync ,
dBusProxyNewSync ,
#if defined(ENABLE_OVERLOADING)
DBusProxySetCachedPropertyMethodInfo ,
#endif
dBusProxySetCachedProperty ,
#if defined(ENABLE_OVERLOADING)
DBusProxySetDefaultTimeoutMethodInfo ,
#endif
dBusProxySetDefaultTimeout ,
#if defined(ENABLE_OVERLOADING)
DBusProxySetInterfaceInfoMethodInfo ,
#endif
dBusProxySetInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGBusTypePropertyInfo ,
#endif
constructDBusProxyGBusType ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGBusType ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusProxyGConnectionPropertyInfo ,
#endif
constructDBusProxyGConnection ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGConnection ,
#endif
getDBusProxyGConnection ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGDefaultTimeoutPropertyInfo ,
#endif
constructDBusProxyGDefaultTimeout ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGDefaultTimeout ,
#endif
getDBusProxyGDefaultTimeout ,
setDBusProxyGDefaultTimeout ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGFlagsPropertyInfo ,
#endif
constructDBusProxyGFlags ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGFlags ,
#endif
getDBusProxyGFlags ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGInterfaceInfoPropertyInfo ,
#endif
clearDBusProxyGInterfaceInfo ,
constructDBusProxyGInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGInterfaceInfo ,
#endif
getDBusProxyGInterfaceInfo ,
setDBusProxyGInterfaceInfo ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGInterfaceNamePropertyInfo ,
#endif
constructDBusProxyGInterfaceName ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGInterfaceName ,
#endif
getDBusProxyGInterfaceName ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGNamePropertyInfo ,
#endif
constructDBusProxyGName ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGName ,
#endif
getDBusProxyGName ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGNameOwnerPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dBusProxyGNameOwner ,
#endif
getDBusProxyGNameOwner ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGObjectPathPropertyInfo ,
#endif
constructDBusProxyGObjectPath ,
#if defined(ENABLE_OVERLOADING)
dBusProxyGObjectPath ,
#endif
getDBusProxyGObjectPath ,
DBusProxyGPropertiesChangedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGPropertiesChangedSignalInfo ,
#endif
afterDBusProxyGPropertiesChanged ,
onDBusProxyGPropertiesChanged ,
DBusProxyGSignalCallback ,
#if defined(ENABLE_OVERLOADING)
DBusProxyGSignalSignalInfo ,
#endif
afterDBusProxyGSignal ,
onDBusProxyGSignal ,
) 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.DBusInterface as Gio.DBusInterface
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusObject as Gio.DBusObject
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 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.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.DBusInterface as Gio.DBusInterface
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.DBusConnection as Gio.DBusConnection
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
#endif
newtype DBusProxy = DBusProxy (SP.ManagedPtr DBusProxy)
deriving (DBusProxy -> DBusProxy -> Bool
(DBusProxy -> DBusProxy -> Bool)
-> (DBusProxy -> DBusProxy -> Bool) -> Eq DBusProxy
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusProxy -> DBusProxy -> Bool
== :: DBusProxy -> DBusProxy -> Bool
$c/= :: DBusProxy -> DBusProxy -> Bool
/= :: DBusProxy -> DBusProxy -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusProxy where
toManagedPtr :: DBusProxy -> ManagedPtr DBusProxy
toManagedPtr (DBusProxy ManagedPtr DBusProxy
p) = ManagedPtr DBusProxy
p
foreign import ccall "g_dbus_proxy_get_type"
c_g_dbus_proxy_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusProxy where
glibType :: IO GType
glibType = IO GType
c_g_dbus_proxy_get_type
instance B.Types.GObject DBusProxy
class (SP.GObject o, O.IsDescendantOf DBusProxy o) => IsDBusProxy o
instance (SP.GObject o, O.IsDescendantOf DBusProxy o) => IsDBusProxy o
instance O.HasParentTypes DBusProxy
type instance O.ParentTypes DBusProxy = '[GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.DBusInterface.DBusInterface, Gio.Initable.Initable]
toDBusProxy :: (MIO.MonadIO m, IsDBusProxy o) => o -> m DBusProxy
toDBusProxy :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m DBusProxy
toDBusProxy = IO DBusProxy -> m DBusProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DBusProxy -> m DBusProxy)
-> (o -> IO DBusProxy) -> o -> m DBusProxy
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusProxy -> DBusProxy) -> o -> IO DBusProxy
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusProxy -> DBusProxy
DBusProxy
instance B.GValue.IsGValue (Maybe DBusProxy) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_proxy_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusProxy -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusProxy
P.Nothing = Ptr GValue -> Ptr DBusProxy -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DBusProxy
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusProxy)
gvalueSet_ Ptr GValue
gv (P.Just DBusProxy
obj) = DBusProxy -> (Ptr DBusProxy -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusProxy
obj (Ptr GValue -> Ptr DBusProxy -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusProxy)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusProxy)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusProxy)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DBusProxy ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusProxyMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusProxyMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusProxyMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusProxyMethod "call" o = DBusProxyCallMethodInfo
ResolveDBusProxyMethod "callFinish" o = DBusProxyCallFinishMethodInfo
ResolveDBusProxyMethod "callSync" o = DBusProxyCallSyncMethodInfo
ResolveDBusProxyMethod "callWithUnixFdList" o = DBusProxyCallWithUnixFdListMethodInfo
ResolveDBusProxyMethod "callWithUnixFdListFinish" o = DBusProxyCallWithUnixFdListFinishMethodInfo
ResolveDBusProxyMethod "callWithUnixFdListSync" o = DBusProxyCallWithUnixFdListSyncMethodInfo
ResolveDBusProxyMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusProxyMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusProxyMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusProxyMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveDBusProxyMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo
ResolveDBusProxyMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo
ResolveDBusProxyMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusProxyMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusProxyMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusProxyMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusProxyMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusProxyMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusProxyMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusProxyMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusProxyMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusProxyMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusProxyMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusProxyMethod "getCachedProperty" o = DBusProxyGetCachedPropertyMethodInfo
ResolveDBusProxyMethod "getCachedPropertyNames" o = DBusProxyGetCachedPropertyNamesMethodInfo
ResolveDBusProxyMethod "getConnection" o = DBusProxyGetConnectionMethodInfo
ResolveDBusProxyMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusProxyMethod "getDefaultTimeout" o = DBusProxyGetDefaultTimeoutMethodInfo
ResolveDBusProxyMethod "getFlags" o = DBusProxyGetFlagsMethodInfo
ResolveDBusProxyMethod "getInfo" o = Gio.DBusInterface.DBusInterfaceGetInfoMethodInfo
ResolveDBusProxyMethod "getInterfaceInfo" o = DBusProxyGetInterfaceInfoMethodInfo
ResolveDBusProxyMethod "getInterfaceName" o = DBusProxyGetInterfaceNameMethodInfo
ResolveDBusProxyMethod "getName" o = DBusProxyGetNameMethodInfo
ResolveDBusProxyMethod "getNameOwner" o = DBusProxyGetNameOwnerMethodInfo
ResolveDBusProxyMethod "getObject" o = Gio.DBusInterface.DBusInterfaceGetObjectMethodInfo
ResolveDBusProxyMethod "getObjectPath" o = DBusProxyGetObjectPathMethodInfo
ResolveDBusProxyMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusProxyMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusProxyMethod "setCachedProperty" o = DBusProxySetCachedPropertyMethodInfo
ResolveDBusProxyMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusProxyMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusProxyMethod "setDefaultTimeout" o = DBusProxySetDefaultTimeoutMethodInfo
ResolveDBusProxyMethod "setInterfaceInfo" o = DBusProxySetInterfaceInfoMethodInfo
ResolveDBusProxyMethod "setObject" o = Gio.DBusInterface.DBusInterfaceSetObjectMethodInfo
ResolveDBusProxyMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusProxyMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusProxyMethod t DBusProxy, O.OverloadedMethod info DBusProxy p) => OL.IsLabel t (DBusProxy -> 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 ~ ResolveDBusProxyMethod t DBusProxy, O.OverloadedMethod info DBusProxy p, R.HasField t DBusProxy p) => R.HasField t DBusProxy p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusProxyMethod t DBusProxy, O.OverloadedMethodInfo info DBusProxy) => OL.IsLabel t (O.MethodProxy info DBusProxy) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DBusProxyGPropertiesChangedCallback =
GVariant
-> [T.Text]
-> IO ()
type C_DBusProxyGPropertiesChangedCallback =
Ptr DBusProxy ->
Ptr GVariant ->
Ptr CString ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusProxyGPropertiesChangedCallback :: C_DBusProxyGPropertiesChangedCallback -> IO (FunPtr C_DBusProxyGPropertiesChangedCallback)
wrap_DBusProxyGPropertiesChangedCallback ::
GObject a => (a -> DBusProxyGPropertiesChangedCallback) ->
C_DBusProxyGPropertiesChangedCallback
wrap_DBusProxyGPropertiesChangedCallback :: forall a.
GObject a =>
(a -> DBusProxyGPropertiesChangedCallback)
-> C_DBusProxyGPropertiesChangedCallback
wrap_DBusProxyGPropertiesChangedCallback a -> DBusProxyGPropertiesChangedCallback
gi'cb Ptr DBusProxy
gi'selfPtr Ptr GVariant
changedProperties Ptr CString
invalidatedProperties Ptr ()
_ = do
changedProperties' <- Ptr GVariant -> IO GVariant
B.GVariant.newGVariantFromPtr Ptr GVariant
changedProperties
invalidatedProperties' <- unpackZeroTerminatedUTF8CArray invalidatedProperties
B.ManagedPtr.withNewObject gi'selfPtr $ \DBusProxy
gi'self -> a -> DBusProxyGPropertiesChangedCallback
gi'cb (DBusProxy -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusProxy
gi'self) GVariant
changedProperties' [Text]
invalidatedProperties'
onDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId
onDBusProxyGPropertiesChanged :: forall a (m :: * -> *).
(IsDBusProxy a, MonadIO m) =>
a
-> ((?self::a) => DBusProxyGPropertiesChangedCallback)
-> m SignalHandlerId
onDBusProxyGPropertiesChanged a
obj (?self::a) => DBusProxyGPropertiesChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusProxyGPropertiesChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusProxyGPropertiesChangedCallback
DBusProxyGPropertiesChangedCallback
cb
let wrapped' :: C_DBusProxyGPropertiesChangedCallback
wrapped' = (a -> DBusProxyGPropertiesChangedCallback)
-> C_DBusProxyGPropertiesChangedCallback
forall a.
GObject a =>
(a -> DBusProxyGPropertiesChangedCallback)
-> C_DBusProxyGPropertiesChangedCallback
wrap_DBusProxyGPropertiesChangedCallback a -> DBusProxyGPropertiesChangedCallback
wrapped
wrapped'' <- C_DBusProxyGPropertiesChangedCallback
-> IO (FunPtr C_DBusProxyGPropertiesChangedCallback)
mk_DBusProxyGPropertiesChangedCallback C_DBusProxyGPropertiesChangedCallback
wrapped'
connectSignalFunPtr obj "g-properties-changed" wrapped'' SignalConnectBefore Nothing
afterDBusProxyGPropertiesChanged :: (IsDBusProxy a, MonadIO m) => a -> ((?self :: a) => DBusProxyGPropertiesChangedCallback) -> m SignalHandlerId
afterDBusProxyGPropertiesChanged :: forall a (m :: * -> *).
(IsDBusProxy a, MonadIO m) =>
a
-> ((?self::a) => DBusProxyGPropertiesChangedCallback)
-> m SignalHandlerId
afterDBusProxyGPropertiesChanged a
obj (?self::a) => DBusProxyGPropertiesChangedCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusProxyGPropertiesChangedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusProxyGPropertiesChangedCallback
DBusProxyGPropertiesChangedCallback
cb
let wrapped' :: C_DBusProxyGPropertiesChangedCallback
wrapped' = (a -> DBusProxyGPropertiesChangedCallback)
-> C_DBusProxyGPropertiesChangedCallback
forall a.
GObject a =>
(a -> DBusProxyGPropertiesChangedCallback)
-> C_DBusProxyGPropertiesChangedCallback
wrap_DBusProxyGPropertiesChangedCallback a -> DBusProxyGPropertiesChangedCallback
wrapped
wrapped'' <- C_DBusProxyGPropertiesChangedCallback
-> IO (FunPtr C_DBusProxyGPropertiesChangedCallback)
mk_DBusProxyGPropertiesChangedCallback C_DBusProxyGPropertiesChangedCallback
wrapped'
connectSignalFunPtr obj "g-properties-changed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DBusProxyGPropertiesChangedSignalInfo
instance SignalInfo DBusProxyGPropertiesChangedSignalInfo where
type HaskellCallbackType DBusProxyGPropertiesChangedSignalInfo = DBusProxyGPropertiesChangedCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusProxyGPropertiesChangedCallback cb
cb'' <- mk_DBusProxyGPropertiesChangedCallback cb'
connectSignalFunPtr obj "g-properties-changed" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy::g-properties-changed"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:signal:gPropertiesChanged"})
#endif
type DBusProxyGSignalCallback =
Maybe T.Text
-> T.Text
-> GVariant
-> IO ()
type C_DBusProxyGSignalCallback =
Ptr DBusProxy ->
CString ->
CString ->
Ptr GVariant ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusProxyGSignalCallback :: C_DBusProxyGSignalCallback -> IO (FunPtr C_DBusProxyGSignalCallback)
wrap_DBusProxyGSignalCallback ::
GObject a => (a -> DBusProxyGSignalCallback) ->
C_DBusProxyGSignalCallback
wrap_DBusProxyGSignalCallback :: forall a.
GObject a =>
(a -> DBusProxyGSignalCallback) -> C_DBusProxyGSignalCallback
wrap_DBusProxyGSignalCallback a -> DBusProxyGSignalCallback
gi'cb Ptr DBusProxy
gi'selfPtr CString
senderName CString
signalName Ptr GVariant
parameters Ptr ()
_ = do
maybeSenderName <-
if CString
senderName CString -> CString -> Bool
forall a. Eq a => a -> a -> Bool
== CString
forall a. Ptr a
FP.nullPtr
then Maybe Text -> IO (Maybe Text)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Text
forall a. Maybe a
Nothing
else do
senderName' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
senderName
return $ Just senderName'
signalName' <- cstringToText signalName
parameters' <- B.GVariant.newGVariantFromPtr parameters
B.ManagedPtr.withNewObject gi'selfPtr $ \DBusProxy
gi'self -> a -> DBusProxyGSignalCallback
gi'cb (DBusProxy -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusProxy
gi'self) Maybe Text
maybeSenderName Text
signalName' GVariant
parameters'
onDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => DBusProxyGSignalCallback) -> m SignalHandlerId
onDBusProxyGSignal :: forall a (m :: * -> *).
(IsDBusProxy a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => DBusProxyGSignalCallback)
-> m SignalHandlerId
onDBusProxyGSignal a
obj Maybe Text
detail (?self::a) => DBusProxyGSignalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusProxyGSignalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusProxyGSignalCallback
DBusProxyGSignalCallback
cb
let wrapped' :: C_DBusProxyGSignalCallback
wrapped' = (a -> DBusProxyGSignalCallback) -> C_DBusProxyGSignalCallback
forall a.
GObject a =>
(a -> DBusProxyGSignalCallback) -> C_DBusProxyGSignalCallback
wrap_DBusProxyGSignalCallback a -> DBusProxyGSignalCallback
wrapped
wrapped'' <- C_DBusProxyGSignalCallback
-> IO (FunPtr C_DBusProxyGSignalCallback)
mk_DBusProxyGSignalCallback C_DBusProxyGSignalCallback
wrapped'
connectSignalFunPtr obj "g-signal" wrapped'' SignalConnectBefore detail
afterDBusProxyGSignal :: (IsDBusProxy a, MonadIO m) => a -> P.Maybe T.Text -> ((?self :: a) => DBusProxyGSignalCallback) -> m SignalHandlerId
afterDBusProxyGSignal :: forall a (m :: * -> *).
(IsDBusProxy a, MonadIO m) =>
a
-> Maybe Text
-> ((?self::a) => DBusProxyGSignalCallback)
-> m SignalHandlerId
afterDBusProxyGSignal a
obj Maybe Text
detail (?self::a) => DBusProxyGSignalCallback
cb = IO SignalHandlerId -> m SignalHandlerId
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO SignalHandlerId -> m SignalHandlerId)
-> IO SignalHandlerId -> m SignalHandlerId
forall a b. (a -> b) -> a -> b
$ do
let wrapped :: a -> DBusProxyGSignalCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusProxyGSignalCallback
DBusProxyGSignalCallback
cb
let wrapped' :: C_DBusProxyGSignalCallback
wrapped' = (a -> DBusProxyGSignalCallback) -> C_DBusProxyGSignalCallback
forall a.
GObject a =>
(a -> DBusProxyGSignalCallback) -> C_DBusProxyGSignalCallback
wrap_DBusProxyGSignalCallback a -> DBusProxyGSignalCallback
wrapped
wrapped'' <- C_DBusProxyGSignalCallback
-> IO (FunPtr C_DBusProxyGSignalCallback)
mk_DBusProxyGSignalCallback C_DBusProxyGSignalCallback
wrapped'
connectSignalFunPtr obj "g-signal" wrapped'' SignalConnectAfter detail
#if defined(ENABLE_OVERLOADING)
data DBusProxyGSignalSignalInfo
instance SignalInfo DBusProxyGSignalSignalInfo where
type HaskellCallbackType DBusProxyGSignalSignalInfo = DBusProxyGSignalCallback
connectSignal obj cb connectMode detail = do
let cb' = wrap_DBusProxyGSignalCallback cb
cb'' <- mk_DBusProxyGSignalCallback cb'
connectSignalFunPtr obj "g-signal" cb'' connectMode detail
dbgSignalInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy::g-signal"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:signal:gSignal"})
#endif
constructDBusProxyGBusType :: (IsDBusProxy o, MIO.MonadIO m) => Gio.Enums.BusType -> m (GValueConstruct o)
constructDBusProxyGBusType :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
BusType -> m (GValueConstruct o)
constructDBusProxyGBusType BusType
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> BusType -> IO (GValueConstruct o)
forall a o.
(Enum a, BoxedEnum a) =>
String -> a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyEnum String
"g-bus-type" BusType
val
#if defined(ENABLE_OVERLOADING)
data DBusProxyGBusTypePropertyInfo
instance AttrInfo DBusProxyGBusTypePropertyInfo where
type AttrAllowedOps DBusProxyGBusTypePropertyInfo = '[ 'AttrConstruct]
type AttrBaseTypeConstraint DBusProxyGBusTypePropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGBusTypePropertyInfo = (~) Gio.Enums.BusType
type AttrTransferTypeConstraint DBusProxyGBusTypePropertyInfo = (~) Gio.Enums.BusType
type AttrTransferType DBusProxyGBusTypePropertyInfo = Gio.Enums.BusType
type AttrGetType DBusProxyGBusTypePropertyInfo = ()
type AttrLabel DBusProxyGBusTypePropertyInfo = "g-bus-type"
type AttrOrigin DBusProxyGBusTypePropertyInfo = DBusProxy
attrGet = undefined
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGBusType
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gBusType"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gBusType"
})
#endif
getDBusProxyGConnection :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Gio.DBusConnection.DBusConnection)
getDBusProxyGConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe DBusConnection)
getDBusProxyGConnection o
obj = IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DBusConnection) -> m (Maybe DBusConnection))
-> IO (Maybe DBusConnection) -> m (Maybe DBusConnection)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DBusConnection -> DBusConnection)
-> IO (Maybe DBusConnection)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"g-connection" ManagedPtr DBusConnection -> DBusConnection
Gio.DBusConnection.DBusConnection
constructDBusProxyGConnection :: (IsDBusProxy o, MIO.MonadIO m, Gio.DBusConnection.IsDBusConnection a) => a -> m (GValueConstruct o)
constructDBusProxyGConnection :: forall o (m :: * -> *) a.
(IsDBusProxy o, MonadIO m, IsDBusConnection a) =>
a -> m (GValueConstruct o)
constructDBusProxyGConnection a
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe a -> IO (GValueConstruct o)
forall a o.
GObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyObject String
"g-connection" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DBusProxyGConnectionPropertyInfo
instance AttrInfo DBusProxyGConnectionPropertyInfo where
type AttrAllowedOps DBusProxyGConnectionPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGConnectionPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferTypeConstraint DBusProxyGConnectionPropertyInfo = Gio.DBusConnection.IsDBusConnection
type AttrTransferType DBusProxyGConnectionPropertyInfo = Gio.DBusConnection.DBusConnection
type AttrGetType DBusProxyGConnectionPropertyInfo = (Maybe Gio.DBusConnection.DBusConnection)
type AttrLabel DBusProxyGConnectionPropertyInfo = "g-connection"
type AttrOrigin DBusProxyGConnectionPropertyInfo = DBusProxy
attrGet = getDBusProxyGConnection
attrSet = undefined
attrTransfer _ v = do
unsafeCastTo Gio.DBusConnection.DBusConnection v
attrConstruct = constructDBusProxyGConnection
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gConnection"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gConnection"
})
#endif
getDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> m Int32
getDBusProxyGDefaultTimeout :: forall (m :: * -> *) o. (MonadIO m, IsDBusProxy o) => o -> m Int32
getDBusProxyGDefaultTimeout o
obj = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Int32
forall a. GObject a => a -> String -> IO Int32
B.Properties.getObjectPropertyInt32 o
obj String
"g-default-timeout"
setDBusProxyGDefaultTimeout :: (MonadIO m, IsDBusProxy o) => o -> Int32 -> m ()
setDBusProxyGDefaultTimeout :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> Int32 -> m ()
setDBusProxyGDefaultTimeout o
obj Int32
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Int32 -> IO ()
forall a. GObject a => a -> String -> Int32 -> IO ()
B.Properties.setObjectPropertyInt32 o
obj String
"g-default-timeout" Int32
val
constructDBusProxyGDefaultTimeout :: (IsDBusProxy o, MIO.MonadIO m) => Int32 -> m (GValueConstruct o)
constructDBusProxyGDefaultTimeout :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
Int32 -> m (GValueConstruct o)
constructDBusProxyGDefaultTimeout Int32
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Int32 -> IO (GValueConstruct o)
forall o. String -> Int32 -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyInt32 String
"g-default-timeout" Int32
val
#if defined(ENABLE_OVERLOADING)
data DBusProxyGDefaultTimeoutPropertyInfo
instance AttrInfo DBusProxyGDefaultTimeoutPropertyInfo where
type AttrAllowedOps DBusProxyGDefaultTimeoutPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DBusProxyGDefaultTimeoutPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGDefaultTimeoutPropertyInfo = (~) Int32
type AttrTransferTypeConstraint DBusProxyGDefaultTimeoutPropertyInfo = (~) Int32
type AttrTransferType DBusProxyGDefaultTimeoutPropertyInfo = Int32
type AttrGetType DBusProxyGDefaultTimeoutPropertyInfo = Int32
type AttrLabel DBusProxyGDefaultTimeoutPropertyInfo = "g-default-timeout"
type AttrOrigin DBusProxyGDefaultTimeoutPropertyInfo = DBusProxy
attrGet = getDBusProxyGDefaultTimeout
attrSet = setDBusProxyGDefaultTimeout
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGDefaultTimeout
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gDefaultTimeout"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gDefaultTimeout"
})
#endif
getDBusProxyGFlags :: (MonadIO m, IsDBusProxy o) => o -> m [Gio.Flags.DBusProxyFlags]
getDBusProxyGFlags :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m [DBusProxyFlags]
getDBusProxyGFlags o
obj = IO [DBusProxyFlags] -> m [DBusProxyFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DBusProxyFlags] -> m [DBusProxyFlags])
-> IO [DBusProxyFlags] -> m [DBusProxyFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DBusProxyFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"g-flags"
constructDBusProxyGFlags :: (IsDBusProxy o, MIO.MonadIO m) => [Gio.Flags.DBusProxyFlags] -> m (GValueConstruct o)
constructDBusProxyGFlags :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
[DBusProxyFlags] -> m (GValueConstruct o)
constructDBusProxyGFlags [DBusProxyFlags]
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> [DBusProxyFlags] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"g-flags" [DBusProxyFlags]
val
#if defined(ENABLE_OVERLOADING)
data DBusProxyGFlagsPropertyInfo
instance AttrInfo DBusProxyGFlagsPropertyInfo where
type AttrAllowedOps DBusProxyGFlagsPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DBusProxyGFlagsPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGFlagsPropertyInfo = (~) [Gio.Flags.DBusProxyFlags]
type AttrTransferTypeConstraint DBusProxyGFlagsPropertyInfo = (~) [Gio.Flags.DBusProxyFlags]
type AttrTransferType DBusProxyGFlagsPropertyInfo = [Gio.Flags.DBusProxyFlags]
type AttrGetType DBusProxyGFlagsPropertyInfo = [Gio.Flags.DBusProxyFlags]
type AttrLabel DBusProxyGFlagsPropertyInfo = "g-flags"
type AttrOrigin DBusProxyGFlagsPropertyInfo = DBusProxy
attrGet = getDBusProxyGFlags
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGFlags
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gFlags"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gFlags"
})
#endif
getDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)
getDBusProxyGInterfaceInfo :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe DBusInterfaceInfo)
getDBusProxyGInterfaceInfo o
obj = IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo))
-> IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo)
-> IO (Maybe DBusInterfaceInfo)
forall a b.
(GObject a, GBoxed b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj String
"g-interface-info" ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo
Gio.DBusInterfaceInfo.DBusInterfaceInfo
setDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> Gio.DBusInterfaceInfo.DBusInterfaceInfo -> m ()
setDBusProxyGInterfaceInfo :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> DBusInterfaceInfo -> m ()
setDBusProxyGInterfaceInfo o
obj DBusInterfaceInfo
val = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
o -> String -> Maybe DBusInterfaceInfo -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"g-interface-info" (DBusInterfaceInfo -> Maybe DBusInterfaceInfo
forall a. a -> Maybe a
Just DBusInterfaceInfo
val)
constructDBusProxyGInterfaceInfo :: (IsDBusProxy o, MIO.MonadIO m) => Gio.DBusInterfaceInfo.DBusInterfaceInfo -> m (GValueConstruct o)
constructDBusProxyGInterfaceInfo :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
DBusInterfaceInfo -> m (GValueConstruct o)
constructDBusProxyGInterfaceInfo DBusInterfaceInfo
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe DBusInterfaceInfo -> IO (GValueConstruct o)
forall a o. GBoxed a => String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed String
"g-interface-info" (DBusInterfaceInfo -> Maybe DBusInterfaceInfo
forall a. a -> Maybe a
P.Just DBusInterfaceInfo
val)
clearDBusProxyGInterfaceInfo :: (MonadIO m, IsDBusProxy o) => o -> m ()
clearDBusProxyGInterfaceInfo :: forall (m :: * -> *) o. (MonadIO m, IsDBusProxy o) => o -> m ()
clearDBusProxyGInterfaceInfo o
obj = 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
$ o -> String -> Maybe DBusInterfaceInfo -> IO ()
forall a b.
(GObject a, GBoxed b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj String
"g-interface-info" (Maybe DBusInterfaceInfo
forall a. Maybe a
Nothing :: Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)
#if defined(ENABLE_OVERLOADING)
data DBusProxyGInterfaceInfoPropertyInfo
instance AttrInfo DBusProxyGInterfaceInfoPropertyInfo where
type AttrAllowedOps DBusProxyGInterfaceInfoPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGInterfaceInfoPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGInterfaceInfoPropertyInfo = (~) Gio.DBusInterfaceInfo.DBusInterfaceInfo
type AttrTransferTypeConstraint DBusProxyGInterfaceInfoPropertyInfo = (~) Gio.DBusInterfaceInfo.DBusInterfaceInfo
type AttrTransferType DBusProxyGInterfaceInfoPropertyInfo = Gio.DBusInterfaceInfo.DBusInterfaceInfo
type AttrGetType DBusProxyGInterfaceInfoPropertyInfo = (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)
type AttrLabel DBusProxyGInterfaceInfoPropertyInfo = "g-interface-info"
type AttrOrigin DBusProxyGInterfaceInfoPropertyInfo = DBusProxy
attrGet = getDBusProxyGInterfaceInfo
attrSet = setDBusProxyGInterfaceInfo
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGInterfaceInfo
attrClear = clearDBusProxyGInterfaceInfo
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gInterfaceInfo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gInterfaceInfo"
})
#endif
getDBusProxyGInterfaceName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe T.Text)
getDBusProxyGInterfaceName :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe Text)
getDBusProxyGInterfaceName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"g-interface-name"
constructDBusProxyGInterfaceName :: (IsDBusProxy o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusProxyGInterfaceName :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusProxyGInterfaceName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"g-interface-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusProxyGInterfaceNamePropertyInfo
instance AttrInfo DBusProxyGInterfaceNamePropertyInfo where
type AttrAllowedOps DBusProxyGInterfaceNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGInterfaceNamePropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGInterfaceNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusProxyGInterfaceNamePropertyInfo = (~) T.Text
type AttrTransferType DBusProxyGInterfaceNamePropertyInfo = T.Text
type AttrGetType DBusProxyGInterfaceNamePropertyInfo = (Maybe T.Text)
type AttrLabel DBusProxyGInterfaceNamePropertyInfo = "g-interface-name"
type AttrOrigin DBusProxyGInterfaceNamePropertyInfo = DBusProxy
attrGet = getDBusProxyGInterfaceName
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGInterfaceName
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gInterfaceName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gInterfaceName"
})
#endif
getDBusProxyGName :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe T.Text)
getDBusProxyGName :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe Text)
getDBusProxyGName o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"g-name"
constructDBusProxyGName :: (IsDBusProxy o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusProxyGName :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusProxyGName Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"g-name" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusProxyGNamePropertyInfo
instance AttrInfo DBusProxyGNamePropertyInfo where
type AttrAllowedOps DBusProxyGNamePropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGNamePropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGNamePropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusProxyGNamePropertyInfo = (~) T.Text
type AttrTransferType DBusProxyGNamePropertyInfo = T.Text
type AttrGetType DBusProxyGNamePropertyInfo = (Maybe T.Text)
type AttrLabel DBusProxyGNamePropertyInfo = "g-name"
type AttrOrigin DBusProxyGNamePropertyInfo = DBusProxy
attrGet = getDBusProxyGName
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGName
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gName"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gName"
})
#endif
getDBusProxyGNameOwner :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe T.Text)
getDBusProxyGNameOwner :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe Text)
getDBusProxyGNameOwner o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"g-name-owner"
#if defined(ENABLE_OVERLOADING)
data DBusProxyGNameOwnerPropertyInfo
instance AttrInfo DBusProxyGNameOwnerPropertyInfo where
type AttrAllowedOps DBusProxyGNameOwnerPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGNameOwnerPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGNameOwnerPropertyInfo = (~) ()
type AttrTransferTypeConstraint DBusProxyGNameOwnerPropertyInfo = (~) ()
type AttrTransferType DBusProxyGNameOwnerPropertyInfo = ()
type AttrGetType DBusProxyGNameOwnerPropertyInfo = (Maybe T.Text)
type AttrLabel DBusProxyGNameOwnerPropertyInfo = "g-name-owner"
type AttrOrigin DBusProxyGNameOwnerPropertyInfo = DBusProxy
attrGet = getDBusProxyGNameOwner
attrSet = undefined
attrTransfer _ = undefined
attrConstruct = undefined
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gNameOwner"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gNameOwner"
})
#endif
getDBusProxyGObjectPath :: (MonadIO m, IsDBusProxy o) => o -> m (Maybe T.Text)
getDBusProxyGObjectPath :: forall (m :: * -> *) o.
(MonadIO m, IsDBusProxy o) =>
o -> m (Maybe Text)
getDBusProxyGObjectPath o
obj = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ o -> String -> IO (Maybe Text)
forall a. GObject a => a -> String -> IO (Maybe Text)
B.Properties.getObjectPropertyString o
obj String
"g-object-path"
constructDBusProxyGObjectPath :: (IsDBusProxy o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusProxyGObjectPath :: forall o (m :: * -> *).
(IsDBusProxy o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusProxyGObjectPath Text
val = IO (GValueConstruct o) -> m (GValueConstruct o)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> m (GValueConstruct o))
-> IO (GValueConstruct o) -> m (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ do
IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a. IO a -> IO a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO (GValueConstruct o) -> IO (GValueConstruct o))
-> IO (GValueConstruct o) -> IO (GValueConstruct o)
forall a b. (a -> b) -> a -> b
$ String -> Maybe Text -> IO (GValueConstruct o)
forall o. String -> Maybe Text -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyString String
"g-object-path" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusProxyGObjectPathPropertyInfo
instance AttrInfo DBusProxyGObjectPathPropertyInfo where
type AttrAllowedOps DBusProxyGObjectPathPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusProxyGObjectPathPropertyInfo = IsDBusProxy
type AttrSetTypeConstraint DBusProxyGObjectPathPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusProxyGObjectPathPropertyInfo = (~) T.Text
type AttrTransferType DBusProxyGObjectPathPropertyInfo = T.Text
type AttrGetType DBusProxyGObjectPathPropertyInfo = (Maybe T.Text)
type AttrLabel DBusProxyGObjectPathPropertyInfo = "g-object-path"
type AttrOrigin DBusProxyGObjectPathPropertyInfo = DBusProxy
attrGet = getDBusProxyGObjectPath
attrSet = undefined
attrTransfer _ v = do
return v
attrConstruct = constructDBusProxyGObjectPath
attrClear = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.gObjectPath"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#g:attr:gObjectPath"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusProxy
type instance O.AttributeList DBusProxy = DBusProxyAttributeList
type DBusProxyAttributeList = ('[ '("gBusType", DBusProxyGBusTypePropertyInfo), '("gConnection", DBusProxyGConnectionPropertyInfo), '("gDefaultTimeout", DBusProxyGDefaultTimeoutPropertyInfo), '("gFlags", DBusProxyGFlagsPropertyInfo), '("gInterfaceInfo", DBusProxyGInterfaceInfoPropertyInfo), '("gInterfaceName", DBusProxyGInterfaceNamePropertyInfo), '("gName", DBusProxyGNamePropertyInfo), '("gNameOwner", DBusProxyGNameOwnerPropertyInfo), '("gObjectPath", DBusProxyGObjectPathPropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
dBusProxyGBusType :: AttrLabelProxy "gBusType"
dBusProxyGBusType = AttrLabelProxy
dBusProxyGConnection :: AttrLabelProxy "gConnection"
dBusProxyGConnection = AttrLabelProxy
dBusProxyGDefaultTimeout :: AttrLabelProxy "gDefaultTimeout"
dBusProxyGDefaultTimeout = AttrLabelProxy
dBusProxyGFlags :: AttrLabelProxy "gFlags"
dBusProxyGFlags = AttrLabelProxy
dBusProxyGInterfaceInfo :: AttrLabelProxy "gInterfaceInfo"
dBusProxyGInterfaceInfo = AttrLabelProxy
dBusProxyGInterfaceName :: AttrLabelProxy "gInterfaceName"
dBusProxyGInterfaceName = AttrLabelProxy
dBusProxyGName :: AttrLabelProxy "gName"
dBusProxyGName = AttrLabelProxy
dBusProxyGNameOwner :: AttrLabelProxy "gNameOwner"
dBusProxyGNameOwner = AttrLabelProxy
dBusProxyGObjectPath :: AttrLabelProxy "gObjectPath"
dBusProxyGObjectPath = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusProxy = DBusProxySignalList
type DBusProxySignalList = ('[ '("gPropertiesChanged", DBusProxyGPropertiesChangedSignalInfo), '("gSignal", DBusProxyGSignalSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_proxy_new_finish" g_dbus_proxy_new_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr DBusProxy)
dBusProxyNewFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m DBusProxy
dBusProxyNewFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncResult a) =>
a -> m DBusProxy
dBusProxyNewFinish a
res = IO DBusProxy -> m DBusProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusProxy -> m DBusProxy) -> IO DBusProxy -> m DBusProxy
forall a b. (a -> b) -> a -> b
$ do
res' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
onException (do
result <- propagateGError $ g_dbus_proxy_new_finish res'
checkUnexpectedReturnNULL "dBusProxyNewFinish" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_proxy_new_for_bus_finish" g_dbus_proxy_new_for_bus_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr DBusProxy)
dBusProxyNewForBusFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m DBusProxy
dBusProxyNewForBusFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncResult a) =>
a -> m DBusProxy
dBusProxyNewForBusFinish a
res = IO DBusProxy -> m DBusProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusProxy -> m DBusProxy) -> IO DBusProxy -> m DBusProxy
forall a b. (a -> b) -> a -> b
$ do
res' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
onException (do
result <- propagateGError $ g_dbus_proxy_new_for_bus_finish res'
checkUnexpectedReturnNULL "dBusProxyNewForBusFinish" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_proxy_new_for_bus_sync" g_dbus_proxy_new_for_bus_sync ::
CInt ->
CUInt ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DBusProxy)
dBusProxyNewForBusSync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
Gio.Enums.BusType
-> [Gio.Flags.DBusProxyFlags]
-> Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (a)
-> m DBusProxy
dBusProxyNewForBusSync :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
BusType
-> [DBusProxyFlags]
-> Maybe DBusInterfaceInfo
-> Text
-> Text
-> Text
-> Maybe a
-> m DBusProxy
dBusProxyNewForBusSync BusType
busType [DBusProxyFlags]
flags Maybe DBusInterfaceInfo
info Text
name Text
objectPath Text
interfaceName Maybe a
cancellable = IO DBusProxy -> m DBusProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusProxy -> m DBusProxy) -> IO DBusProxy -> m DBusProxy
forall a b. (a -> b) -> a -> b
$ do
let busType' :: CInt
busType' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BusType -> Int) -> BusType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BusType -> Int
forall a. Enum a => a -> Int
fromEnum) BusType
busType
let flags' :: CUInt
flags' = [DBusProxyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusProxyFlags]
flags
maybeInfo <- case Maybe DBusInterfaceInfo
info of
Maybe DBusInterfaceInfo
Nothing -> Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
forall a. Ptr a
FP.nullPtr
Just DBusInterfaceInfo
jInfo -> do
jInfo' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceInfo
jInfo
return jInfo'
name' <- textToCString name
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
maybeCancellable <- case cancellable of
Maybe a
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just a
jCancellable -> do
jCancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_new_for_bus_sync busType' flags' maybeInfo name' objectPath' interfaceName' maybeCancellable
checkUnexpectedReturnNULL "dBusProxyNewForBusSync" result
result' <- (wrapObject DBusProxy) result
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem name'
freeMem objectPath'
freeMem interfaceName'
return result'
) (do
freeMem name'
freeMem objectPath'
freeMem interfaceName'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_proxy_new_sync" g_dbus_proxy_new_sync ::
Ptr Gio.DBusConnection.DBusConnection ->
CUInt ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DBusProxy)
dBusProxyNewSync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> [Gio.Flags.DBusProxyFlags]
-> Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo)
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> Maybe (b)
-> m DBusProxy
dBusProxyNewSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> [DBusProxyFlags]
-> Maybe DBusInterfaceInfo
-> Maybe Text
-> Text
-> Text
-> Maybe b
-> m DBusProxy
dBusProxyNewSync a
connection [DBusProxyFlags]
flags Maybe DBusInterfaceInfo
info Maybe Text
name Text
objectPath Text
interfaceName Maybe b
cancellable = IO DBusProxy -> m DBusProxy
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusProxy -> m DBusProxy) -> IO DBusProxy -> m DBusProxy
forall a b. (a -> b) -> a -> b
$ do
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
let flags' = [DBusProxyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusProxyFlags]
flags
maybeInfo <- case info of
Maybe DBusInterfaceInfo
Nothing -> Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
forall a. Ptr a
FP.nullPtr
Just DBusInterfaceInfo
jInfo -> do
jInfo' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceInfo
jInfo
return jInfo'
maybeName <- case name of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jName -> do
jName' <- Text -> IO CString
textToCString Text
jName
return jName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_new_sync connection' flags' maybeInfo maybeName objectPath' interfaceName' maybeCancellable
checkUnexpectedReturnNULL "dBusProxyNewSync" result
result' <- (wrapObject DBusProxy) result
touchManagedPtr connection
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeName
freeMem objectPath'
freeMem interfaceName'
return result'
) (do
freeMem maybeName
freeMem objectPath'
freeMem interfaceName'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_proxy_call" g_dbus_proxy_call ::
Ptr DBusProxy ->
CString ->
Ptr GVariant ->
CUInt ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusProxyCall ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (GVariant)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusProxyCall :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) =>
a
-> Text
-> Maybe GVariant
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
dBusProxyCall a
proxy Text
methodName Maybe GVariant
parameters [DBusCallFlags]
flags Int32
timeoutMsec Maybe b
cancellable Maybe AsyncReadyCallback
callback = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
methodName' <- textToCString methodName
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'
let flags' = [DBusCallFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusCallFlags]
flags
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = Ptr a
forall a. Ptr a
nullPtr
g_dbus_proxy_call proxy' methodName' maybeParameters flags' timeoutMsec maybeCancellable maybeCallback userData
touchManagedPtr proxy
whenJust parameters touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem methodName'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusProxy a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusProxyCallMethodInfo a signature where
overloadedMethod = dBusProxyCall
instance O.OverloadedMethodInfo DBusProxyCallMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCall",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCall"
})
#endif
foreign import ccall "g_dbus_proxy_call_finish" g_dbus_proxy_call_finish ::
Ptr DBusProxy ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusProxyCallFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m GVariant
dBusProxyCallFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) =>
a -> b -> m GVariant
dBusProxyCallFinish a
proxy b
res = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
res' <- unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_call_finish proxy' res'
checkUnexpectedReturnNULL "dBusProxyCallFinish" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr proxy
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallFinishMethodInfo
instance (signature ~ (b -> m GVariant), MonadIO m, IsDBusProxy a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusProxyCallFinishMethodInfo a signature where
overloadedMethod = dBusProxyCallFinish
instance O.OverloadedMethodInfo DBusProxyCallFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCallFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCallFinish"
})
#endif
foreign import ccall "g_dbus_proxy_call_sync" g_dbus_proxy_call_sync ::
Ptr DBusProxy ->
CString ->
Ptr GVariant ->
CUInt ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusProxyCallSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.Cancellable.IsCancellable b) =>
a
-> T.Text
-> Maybe (GVariant)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> m GVariant
dBusProxyCallSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusProxy a, IsCancellable b) =>
a
-> Text
-> Maybe GVariant
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> m GVariant
dBusProxyCallSync a
proxy Text
methodName Maybe GVariant
parameters [DBusCallFlags]
flags Int32
timeoutMsec Maybe b
cancellable = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
methodName' <- textToCString methodName
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'
let flags' = [DBusCallFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusCallFlags]
flags
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_call_sync proxy' methodName' maybeParameters flags' timeoutMsec maybeCancellable
checkUnexpectedReturnNULL "dBusProxyCallSync" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr proxy
whenJust parameters touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem methodName'
return result'
) (do
freeMem methodName'
)
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallSyncMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> m GVariant), MonadIO m, IsDBusProxy a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusProxyCallSyncMethodInfo a signature where
overloadedMethod = dBusProxyCallSync
instance O.OverloadedMethodInfo DBusProxyCallSyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCallSync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCallSync"
})
#endif
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list" g_dbus_proxy_call_with_unix_fd_list ::
Ptr DBusProxy ->
CString ->
Ptr GVariant ->
CUInt ->
Int32 ->
Ptr Gio.UnixFDList.UnixFDList ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusProxyCallWithUnixFdList ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe (GVariant)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusProxyCallWithUnixFdList :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b,
IsCancellable c) =>
a
-> Text
-> Maybe GVariant
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
dBusProxyCallWithUnixFdList a
proxy Text
methodName Maybe GVariant
parameters [DBusCallFlags]
flags Int32
timeoutMsec Maybe b
fdList Maybe c
cancellable Maybe AsyncReadyCallback
callback = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
methodName' <- textToCString methodName
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'
let flags' = [DBusCallFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusCallFlags]
flags
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'
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = Ptr a
forall a. Ptr a
nullPtr
g_dbus_proxy_call_with_unix_fd_list proxy' methodName' maybeParameters flags' timeoutMsec maybeFdList maybeCancellable maybeCallback userData
touchManagedPtr proxy
whenJust parameters touchManagedPtr
whenJust fdList touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem methodName'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallWithUnixFdListMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusProxy a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusProxyCallWithUnixFdListMethodInfo a signature where
overloadedMethod = dBusProxyCallWithUnixFdList
instance O.OverloadedMethodInfo DBusProxyCallWithUnixFdListMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCallWithUnixFdList",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCallWithUnixFdList"
})
#endif
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list_finish" g_dbus_proxy_call_with_unix_fd_list_finish ::
Ptr DBusProxy ->
Ptr (Ptr Gio.UnixFDList.UnixFDList) ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusProxyCallWithUnixFdListFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ((GVariant, Gio.UnixFDList.UnixFDList))
dBusProxyCallWithUnixFdListFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusProxy a, IsAsyncResult b) =>
a -> b -> m (GVariant, UnixFDList)
dBusProxyCallWithUnixFdListFinish a
proxy b
res = IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList))
-> IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
outFdList <- callocMem :: IO (Ptr (Ptr Gio.UnixFDList.UnixFDList))
res' <- unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_proxy_call_with_unix_fd_list_finish proxy' outFdList res'
checkUnexpectedReturnNULL "dBusProxyCallWithUnixFdListFinish" result
result' <- B.GVariant.wrapGVariantPtr result
outFdList' <- peek outFdList
outFdList'' <- (wrapObject Gio.UnixFDList.UnixFDList) outFdList'
touchManagedPtr proxy
touchManagedPtr res
freeMem outFdList
return (result', outFdList'')
) (do
freeMem outFdList
)
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallWithUnixFdListFinishMethodInfo
instance (signature ~ (b -> m ((GVariant, Gio.UnixFDList.UnixFDList))), MonadIO m, IsDBusProxy a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusProxyCallWithUnixFdListFinishMethodInfo a signature where
overloadedMethod = dBusProxyCallWithUnixFdListFinish
instance O.OverloadedMethodInfo DBusProxyCallWithUnixFdListFinishMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCallWithUnixFdListFinish",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCallWithUnixFdListFinish"
})
#endif
foreign import ccall "g_dbus_proxy_call_with_unix_fd_list_sync" g_dbus_proxy_call_with_unix_fd_list_sync ::
Ptr DBusProxy ->
CString ->
Ptr GVariant ->
CUInt ->
Int32 ->
Ptr Gio.UnixFDList.UnixFDList ->
Ptr (Ptr Gio.UnixFDList.UnixFDList) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusProxyCallWithUnixFdListSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) =>
a
-> T.Text
-> Maybe (GVariant)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (c)
-> m ((GVariant, Gio.UnixFDList.UnixFDList))
dBusProxyCallWithUnixFdListSync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusProxy a, IsUnixFDList b,
IsCancellable c) =>
a
-> Text
-> Maybe GVariant
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> m (GVariant, UnixFDList)
dBusProxyCallWithUnixFdListSync a
proxy Text
methodName Maybe GVariant
parameters [DBusCallFlags]
flags Int32
timeoutMsec Maybe b
fdList Maybe c
cancellable = IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList))
-> IO (GVariant, UnixFDList) -> m (GVariant, UnixFDList)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
methodName' <- textToCString methodName
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'
let flags' = [DBusCallFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusCallFlags]
flags
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'
outFdList <- callocMem :: IO (Ptr (Ptr Gio.UnixFDList.UnixFDList))
maybeCancellable <- case cancellable of
Maybe c
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just c
jCancellable -> do
jCancellable' <- c -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr c
jCancellable
return jCancellable'
onException (do
result <- propagateGError $ g_dbus_proxy_call_with_unix_fd_list_sync proxy' methodName' maybeParameters flags' timeoutMsec maybeFdList outFdList maybeCancellable
checkUnexpectedReturnNULL "dBusProxyCallWithUnixFdListSync" result
result' <- B.GVariant.wrapGVariantPtr result
outFdList' <- peek outFdList
outFdList'' <- (wrapObject Gio.UnixFDList.UnixFDList) outFdList'
touchManagedPtr proxy
whenJust parameters touchManagedPtr
whenJust fdList touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem methodName'
freeMem outFdList
return (result', outFdList'')
) (do
freeMem methodName'
freeMem outFdList
)
#if defined(ENABLE_OVERLOADING)
data DBusProxyCallWithUnixFdListSyncMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> m ((GVariant, Gio.UnixFDList.UnixFDList))), MonadIO m, IsDBusProxy a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusProxyCallWithUnixFdListSyncMethodInfo a signature where
overloadedMethod = dBusProxyCallWithUnixFdListSync
instance O.OverloadedMethodInfo DBusProxyCallWithUnixFdListSyncMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyCallWithUnixFdListSync",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyCallWithUnixFdListSync"
})
#endif
foreign import ccall "g_dbus_proxy_get_cached_property" g_dbus_proxy_get_cached_property ::
Ptr DBusProxy ->
CString ->
IO (Ptr GVariant)
dBusProxyGetCachedProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> T.Text
-> m (Maybe GVariant)
dBusProxyGetCachedProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> Text -> m (Maybe GVariant)
dBusProxyGetCachedProperty a
proxy Text
propertyName = IO (Maybe GVariant) -> m (Maybe GVariant)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe GVariant) -> m (Maybe GVariant))
-> IO (Maybe GVariant) -> m (Maybe GVariant)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
propertyName' <- textToCString propertyName
result <- g_dbus_proxy_get_cached_property proxy' propertyName'
maybeResult <- convertIfNonNull result $ \Ptr GVariant
result' -> do
result'' <- Ptr GVariant -> IO GVariant
B.GVariant.wrapGVariantPtr Ptr GVariant
result'
return result''
touchManagedPtr proxy
freeMem propertyName'
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetCachedPropertyMethodInfo
instance (signature ~ (T.Text -> m (Maybe GVariant)), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetCachedPropertyMethodInfo a signature where
overloadedMethod = dBusProxyGetCachedProperty
instance O.OverloadedMethodInfo DBusProxyGetCachedPropertyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetCachedProperty",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetCachedProperty"
})
#endif
foreign import ccall "g_dbus_proxy_get_cached_property_names" g_dbus_proxy_get_cached_property_names ::
Ptr DBusProxy ->
IO (Ptr CString)
dBusProxyGetCachedPropertyNames ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m (Maybe [T.Text])
dBusProxyGetCachedPropertyNames :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m (Maybe [Text])
dBusProxyGetCachedPropertyNames a
proxy = IO (Maybe [Text]) -> m (Maybe [Text])
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe [Text]) -> m (Maybe [Text]))
-> IO (Maybe [Text]) -> m (Maybe [Text])
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_cached_property_names proxy'
maybeResult <- convertIfNonNull result $ \Ptr CString
result' -> do
result'' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result'
mapZeroTerminatedCArray freeMem result'
freeMem result'
return result''
touchManagedPtr proxy
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetCachedPropertyNamesMethodInfo
instance (signature ~ (m (Maybe [T.Text])), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetCachedPropertyNamesMethodInfo a signature where
overloadedMethod = dBusProxyGetCachedPropertyNames
instance O.OverloadedMethodInfo DBusProxyGetCachedPropertyNamesMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetCachedPropertyNames",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetCachedPropertyNames"
})
#endif
foreign import ccall "g_dbus_proxy_get_connection" g_dbus_proxy_get_connection ::
Ptr DBusProxy ->
IO (Ptr Gio.DBusConnection.DBusConnection)
dBusProxyGetConnection ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m Gio.DBusConnection.DBusConnection
dBusProxyGetConnection :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m DBusConnection
dBusProxyGetConnection a
proxy = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_connection proxy'
checkUnexpectedReturnNULL "dBusProxyGetConnection" result
result' <- (newObject Gio.DBusConnection.DBusConnection) result
touchManagedPtr proxy
return result'
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetConnectionMethodInfo
instance (signature ~ (m Gio.DBusConnection.DBusConnection), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetConnectionMethodInfo a signature where
overloadedMethod = dBusProxyGetConnection
instance O.OverloadedMethodInfo DBusProxyGetConnectionMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetConnection",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetConnection"
})
#endif
foreign import ccall "g_dbus_proxy_get_default_timeout" g_dbus_proxy_get_default_timeout ::
Ptr DBusProxy ->
IO Int32
dBusProxyGetDefaultTimeout ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m Int32
dBusProxyGetDefaultTimeout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m Int32
dBusProxyGetDefaultTimeout a
proxy = IO Int32 -> m Int32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_default_timeout proxy'
touchManagedPtr proxy
return result
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetDefaultTimeoutMethodInfo
instance (signature ~ (m Int32), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetDefaultTimeoutMethodInfo a signature where
overloadedMethod = dBusProxyGetDefaultTimeout
instance O.OverloadedMethodInfo DBusProxyGetDefaultTimeoutMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetDefaultTimeout",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetDefaultTimeout"
})
#endif
foreign import ccall "g_dbus_proxy_get_flags" g_dbus_proxy_get_flags ::
Ptr DBusProxy ->
IO CUInt
dBusProxyGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m [Gio.Flags.DBusProxyFlags]
dBusProxyGetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m [DBusProxyFlags]
dBusProxyGetFlags a
proxy = IO [DBusProxyFlags] -> m [DBusProxyFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusProxyFlags] -> m [DBusProxyFlags])
-> IO [DBusProxyFlags] -> m [DBusProxyFlags]
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_flags proxy'
let result' = CUInt -> [DBusProxyFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr proxy
return result'
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetFlagsMethodInfo
instance (signature ~ (m [Gio.Flags.DBusProxyFlags]), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetFlagsMethodInfo a signature where
overloadedMethod = dBusProxyGetFlags
instance O.OverloadedMethodInfo DBusProxyGetFlagsMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetFlags",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetFlags"
})
#endif
foreign import ccall "g_dbus_proxy_get_interface_info" g_dbus_proxy_get_interface_info ::
Ptr DBusProxy ->
IO (Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo)
dBusProxyGetInterfaceInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)
dBusProxyGetInterfaceInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m (Maybe DBusInterfaceInfo)
dBusProxyGetInterfaceInfo a
proxy = IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo))
-> IO (Maybe DBusInterfaceInfo) -> m (Maybe DBusInterfaceInfo)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_interface_info proxy'
maybeResult <- convertIfNonNull result $ \Ptr DBusInterfaceInfo
result' -> do
result'' <- ((ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo)
-> Ptr DBusInterfaceInfo -> IO DBusInterfaceInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr DBusInterfaceInfo -> DBusInterfaceInfo
Gio.DBusInterfaceInfo.DBusInterfaceInfo) Ptr DBusInterfaceInfo
result'
return result''
touchManagedPtr proxy
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetInterfaceInfoMethodInfo
instance (signature ~ (m (Maybe Gio.DBusInterfaceInfo.DBusInterfaceInfo)), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetInterfaceInfoMethodInfo a signature where
overloadedMethod = dBusProxyGetInterfaceInfo
instance O.OverloadedMethodInfo DBusProxyGetInterfaceInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetInterfaceInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetInterfaceInfo"
})
#endif
foreign import ccall "g_dbus_proxy_get_interface_name" g_dbus_proxy_get_interface_name ::
Ptr DBusProxy ->
IO CString
dBusProxyGetInterfaceName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m T.Text
dBusProxyGetInterfaceName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m Text
dBusProxyGetInterfaceName a
proxy = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_interface_name proxy'
checkUnexpectedReturnNULL "dBusProxyGetInterfaceName" result
result' <- cstringToText result
touchManagedPtr proxy
return result'
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetInterfaceNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetInterfaceNameMethodInfo a signature where
overloadedMethod = dBusProxyGetInterfaceName
instance O.OverloadedMethodInfo DBusProxyGetInterfaceNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetInterfaceName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetInterfaceName"
})
#endif
foreign import ccall "g_dbus_proxy_get_name" g_dbus_proxy_get_name ::
Ptr DBusProxy ->
IO CString
dBusProxyGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m (Maybe T.Text)
dBusProxyGetName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m (Maybe Text)
dBusProxyGetName a
proxy = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_name proxy'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr proxy
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetNameMethodInfo a signature where
overloadedMethod = dBusProxyGetName
instance O.OverloadedMethodInfo DBusProxyGetNameMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetName",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetName"
})
#endif
foreign import ccall "g_dbus_proxy_get_name_owner" g_dbus_proxy_get_name_owner ::
Ptr DBusProxy ->
IO CString
dBusProxyGetNameOwner ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m (Maybe T.Text)
dBusProxyGetNameOwner :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m (Maybe Text)
dBusProxyGetNameOwner a
proxy = IO (Maybe Text) -> m (Maybe Text)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Text) -> m (Maybe Text))
-> IO (Maybe Text) -> m (Maybe Text)
forall a b. (a -> b) -> a -> b
$ do
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_name_owner proxy'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
freeMem result'
return result''
touchManagedPtr proxy
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetNameOwnerMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetNameOwnerMethodInfo a signature where
overloadedMethod = dBusProxyGetNameOwner
instance O.OverloadedMethodInfo DBusProxyGetNameOwnerMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetNameOwner",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetNameOwner"
})
#endif
foreign import ccall "g_dbus_proxy_get_object_path" g_dbus_proxy_get_object_path ::
Ptr DBusProxy ->
IO CString
dBusProxyGetObjectPath ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> m T.Text
dBusProxyGetObjectPath :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> m Text
dBusProxyGetObjectPath a
proxy = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
result <- g_dbus_proxy_get_object_path proxy'
checkUnexpectedReturnNULL "dBusProxyGetObjectPath" result
result' <- cstringToText result
touchManagedPtr proxy
return result'
#if defined(ENABLE_OVERLOADING)
data DBusProxyGetObjectPathMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxyGetObjectPathMethodInfo a signature where
overloadedMethod = dBusProxyGetObjectPath
instance O.OverloadedMethodInfo DBusProxyGetObjectPathMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxyGetObjectPath",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxyGetObjectPath"
})
#endif
foreign import ccall "g_dbus_proxy_set_cached_property" g_dbus_proxy_set_cached_property ::
Ptr DBusProxy ->
CString ->
Ptr GVariant ->
IO ()
dBusProxySetCachedProperty ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> T.Text
-> Maybe (GVariant)
-> m ()
dBusProxySetCachedProperty :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> Text -> Maybe GVariant -> m ()
dBusProxySetCachedProperty a
proxy Text
propertyName Maybe GVariant
value = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
propertyName' <- textToCString propertyName
maybeValue <- case value 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
jValue -> do
jValue' <- GVariant -> IO (Ptr GVariant)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr GVariant
jValue
return jValue'
g_dbus_proxy_set_cached_property proxy' propertyName' maybeValue
touchManagedPtr proxy
whenJust value touchManagedPtr
freeMem propertyName'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusProxySetCachedPropertyMethodInfo
instance (signature ~ (T.Text -> Maybe (GVariant) -> m ()), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxySetCachedPropertyMethodInfo a signature where
overloadedMethod = dBusProxySetCachedProperty
instance O.OverloadedMethodInfo DBusProxySetCachedPropertyMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxySetCachedProperty",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxySetCachedProperty"
})
#endif
foreign import ccall "g_dbus_proxy_set_default_timeout" g_dbus_proxy_set_default_timeout ::
Ptr DBusProxy ->
Int32 ->
IO ()
dBusProxySetDefaultTimeout ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> Int32
-> m ()
dBusProxySetDefaultTimeout :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> Int32 -> m ()
dBusProxySetDefaultTimeout a
proxy Int32
timeoutMsec = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
g_dbus_proxy_set_default_timeout proxy' timeoutMsec
touchManagedPtr proxy
return ()
#if defined(ENABLE_OVERLOADING)
data DBusProxySetDefaultTimeoutMethodInfo
instance (signature ~ (Int32 -> m ()), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxySetDefaultTimeoutMethodInfo a signature where
overloadedMethod = dBusProxySetDefaultTimeout
instance O.OverloadedMethodInfo DBusProxySetDefaultTimeoutMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxySetDefaultTimeout",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxySetDefaultTimeout"
})
#endif
foreign import ccall "g_dbus_proxy_set_interface_info" g_dbus_proxy_set_interface_info ::
Ptr DBusProxy ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
IO ()
dBusProxySetInterfaceInfo ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusProxy a) =>
a
-> Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo)
-> m ()
dBusProxySetInterfaceInfo :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusProxy a) =>
a -> Maybe DBusInterfaceInfo -> m ()
dBusProxySetInterfaceInfo a
proxy Maybe DBusInterfaceInfo
info = 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
proxy' <- a -> IO (Ptr DBusProxy)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
proxy
maybeInfo <- case info of
Maybe DBusInterfaceInfo
Nothing -> Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
forall a. Ptr a
FP.nullPtr
Just DBusInterfaceInfo
jInfo -> do
jInfo' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceInfo
jInfo
return jInfo'
g_dbus_proxy_set_interface_info proxy' maybeInfo
touchManagedPtr proxy
whenJust info touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusProxySetInterfaceInfoMethodInfo
instance (signature ~ (Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo) -> m ()), MonadIO m, IsDBusProxy a) => O.OverloadedMethod DBusProxySetInterfaceInfoMethodInfo a signature where
overloadedMethod = dBusProxySetInterfaceInfo
instance O.OverloadedMethodInfo DBusProxySetInterfaceInfoMethodInfo a where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.Gio.Objects.DBusProxy.dBusProxySetInterfaceInfo",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gio-2.0.35/docs/GI-Gio-Objects-DBusProxy.html#v:dBusProxySetInterfaceInfo"
})
#endif
foreign import ccall "g_dbus_proxy_new" g_dbus_proxy_new ::
Ptr Gio.DBusConnection.DBusConnection ->
CUInt ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusProxyNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusConnection.IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> [Gio.Flags.DBusProxyFlags]
-> Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo)
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusProxyNew :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> [DBusProxyFlags]
-> Maybe DBusInterfaceInfo
-> Maybe Text
-> Text
-> Text
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
dBusProxyNew a
connection [DBusProxyFlags]
flags Maybe DBusInterfaceInfo
info Maybe Text
name Text
objectPath Text
interfaceName Maybe b
cancellable Maybe AsyncReadyCallback
callback = 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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
let flags' = [DBusProxyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusProxyFlags]
flags
maybeInfo <- case info of
Maybe DBusInterfaceInfo
Nothing -> Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
forall a. Ptr a
FP.nullPtr
Just DBusInterfaceInfo
jInfo -> do
jInfo' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceInfo
jInfo
return jInfo'
maybeName <- case name of
Maybe Text
Nothing -> CString -> IO CString
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
FP.nullPtr
Just Text
jName -> do
jName' <- Text -> IO CString
textToCString Text
jName
return jName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
maybeCancellable <- case cancellable of
Maybe b
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just b
jCancellable -> do
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = Ptr a
forall a. Ptr a
nullPtr
g_dbus_proxy_new connection' flags' maybeInfo maybeName objectPath' interfaceName' maybeCancellable maybeCallback userData
touchManagedPtr connection
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeName
freeMem objectPath'
freeMem interfaceName'
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_proxy_new_for_bus" g_dbus_proxy_new_for_bus ::
CInt ->
CUInt ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
CString ->
CString ->
CString ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusProxyNewForBus ::
(B.CallStack.HasCallStack, MonadIO m, Gio.Cancellable.IsCancellable a) =>
Gio.Enums.BusType
-> [Gio.Flags.DBusProxyFlags]
-> Maybe (Gio.DBusInterfaceInfo.DBusInterfaceInfo)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (a)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusProxyNewForBus :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsCancellable a) =>
BusType
-> [DBusProxyFlags]
-> Maybe DBusInterfaceInfo
-> Text
-> Text
-> Text
-> Maybe a
-> Maybe AsyncReadyCallback
-> m ()
dBusProxyNewForBus BusType
busType [DBusProxyFlags]
flags Maybe DBusInterfaceInfo
info Text
name Text
objectPath Text
interfaceName Maybe a
cancellable Maybe AsyncReadyCallback
callback = 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
let busType' :: CInt
busType' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (BusType -> Int) -> BusType -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BusType -> Int
forall a. Enum a => a -> Int
fromEnum) BusType
busType
let flags' :: CUInt
flags' = [DBusProxyFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusProxyFlags]
flags
maybeInfo <- case Maybe DBusInterfaceInfo
info of
Maybe DBusInterfaceInfo
Nothing -> Ptr DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusInterfaceInfo
forall a. Ptr a
FP.nullPtr
Just DBusInterfaceInfo
jInfo -> do
jInfo' <- DBusInterfaceInfo -> IO (Ptr DBusInterfaceInfo)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr DBusInterfaceInfo
jInfo
return jInfo'
name' <- textToCString name
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
maybeCancellable <- case cancellable of
Maybe a
Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
FP.nullPtr
Just a
jCancellable -> do
jCancellable' <- a -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jCancellable
return jCancellable'
maybeCallback <- case callback of
Maybe AsyncReadyCallback
Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
forall a. FunPtr a
FP.nullFunPtr
Just AsyncReadyCallback
jCallback -> do
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
jCallback' <- Gio.Callbacks.mk_AsyncReadyCallback (Gio.Callbacks.wrap_AsyncReadyCallback (Just ptrcallback) (Gio.Callbacks.drop_closures_AsyncReadyCallback jCallback))
poke ptrcallback jCallback'
return jCallback'
let userData = Ptr a
forall a. Ptr a
nullPtr
g_dbus_proxy_new_for_bus busType' flags' maybeInfo name' objectPath' interfaceName' maybeCancellable maybeCallback userData
whenJust info touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem name'
freeMem objectPath'
freeMem interfaceName'
return ()
#if defined(ENABLE_OVERLOADING)
#endif