{-# LANGUAGE ImplicitParams, RankNTypes, TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Objects.DBusConnection
(
DBusConnection(..) ,
IsDBusConnection ,
toDBusConnection ,
#if defined(ENABLE_OVERLOADING)
ResolveDBusConnectionMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusConnectionAddFilterMethodInfo ,
#endif
dBusConnectionAddFilter ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallMethodInfo ,
#endif
dBusConnectionCall ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallFinishMethodInfo ,
#endif
dBusConnectionCallFinish ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallSyncMethodInfo ,
#endif
dBusConnectionCallSync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallWithUnixFdListMethodInfo,
#endif
dBusConnectionCallWithUnixFdList ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallWithUnixFdListFinishMethodInfo,
#endif
dBusConnectionCallWithUnixFdListFinish ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCallWithUnixFdListSyncMethodInfo,
#endif
dBusConnectionCallWithUnixFdListSync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCloseMethodInfo ,
#endif
dBusConnectionClose ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCloseFinishMethodInfo ,
#endif
dBusConnectionCloseFinish ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionCloseSyncMethodInfo ,
#endif
dBusConnectionCloseSync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionEmitSignalMethodInfo ,
#endif
dBusConnectionEmitSignal ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionExportActionGroupMethodInfo,
#endif
dBusConnectionExportActionGroup ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionExportMenuModelMethodInfo ,
#endif
dBusConnectionExportMenuModel ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionFlushMethodInfo ,
#endif
dBusConnectionFlush ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionFlushFinishMethodInfo ,
#endif
dBusConnectionFlushFinish ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionFlushSyncMethodInfo ,
#endif
dBusConnectionFlushSync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetCapabilitiesMethodInfo ,
#endif
dBusConnectionGetCapabilities ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetExitOnCloseMethodInfo ,
#endif
dBusConnectionGetExitOnClose ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetFlagsMethodInfo ,
#endif
dBusConnectionGetFlags ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetGuidMethodInfo ,
#endif
dBusConnectionGetGuid ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetLastSerialMethodInfo ,
#endif
dBusConnectionGetLastSerial ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetPeerCredentialsMethodInfo,
#endif
dBusConnectionGetPeerCredentials ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetStreamMethodInfo ,
#endif
dBusConnectionGetStream ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGetUniqueNameMethodInfo ,
#endif
dBusConnectionGetUniqueName ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionIsClosedMethodInfo ,
#endif
dBusConnectionIsClosed ,
dBusConnectionNew ,
dBusConnectionNewFinish ,
dBusConnectionNewForAddress ,
dBusConnectionNewForAddressFinish ,
dBusConnectionNewForAddressSync ,
dBusConnectionNewSync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionRegisterObjectMethodInfo ,
#endif
dBusConnectionRegisterObject ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionRegisterObjectWithClosures2MethodInfo,
#endif
dBusConnectionRegisterObjectWithClosures2,
#if defined(ENABLE_OVERLOADING)
DBusConnectionRegisterSubtreeMethodInfo ,
#endif
dBusConnectionRegisterSubtree ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionRemoveFilterMethodInfo ,
#endif
dBusConnectionRemoveFilter ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSendMessageMethodInfo ,
#endif
dBusConnectionSendMessage ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSendMessageWithReplyMethodInfo,
#endif
dBusConnectionSendMessageWithReply ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSendMessageWithReplyFinishMethodInfo,
#endif
dBusConnectionSendMessageWithReplyFinish,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSendMessageWithReplySyncMethodInfo,
#endif
dBusConnectionSendMessageWithReplySync ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSetExitOnCloseMethodInfo ,
#endif
dBusConnectionSetExitOnClose ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSignalSubscribeMethodInfo ,
#endif
dBusConnectionSignalSubscribe ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionSignalUnsubscribeMethodInfo,
#endif
dBusConnectionSignalUnsubscribe ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionStartMessageProcessingMethodInfo,
#endif
dBusConnectionStartMessageProcessing ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionUnexportActionGroupMethodInfo,
#endif
dBusConnectionUnexportActionGroup ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionUnexportMenuModelMethodInfo,
#endif
dBusConnectionUnexportMenuModel ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionUnregisterObjectMethodInfo,
#endif
dBusConnectionUnregisterObject ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionUnregisterSubtreeMethodInfo,
#endif
dBusConnectionUnregisterSubtree ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionAddressPropertyInfo ,
#endif
constructDBusConnectionAddress ,
#if defined(ENABLE_OVERLOADING)
dBusConnectionAddress ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusConnectionAuthenticationObserverPropertyInfo,
#endif
constructDBusConnectionAuthenticationObserver,
#if defined(ENABLE_OVERLOADING)
dBusConnectionAuthenticationObserver ,
#endif
#if defined(ENABLE_OVERLOADING)
DBusConnectionCapabilitiesPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dBusConnectionCapabilities ,
#endif
getDBusConnectionCapabilities ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionClosedPropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dBusConnectionClosed ,
#endif
getDBusConnectionClosed ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionExitOnClosePropertyInfo ,
#endif
constructDBusConnectionExitOnClose ,
#if defined(ENABLE_OVERLOADING)
dBusConnectionExitOnClose ,
#endif
getDBusConnectionExitOnClose ,
setDBusConnectionExitOnClose ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionFlagsPropertyInfo ,
#endif
constructDBusConnectionFlags ,
#if defined(ENABLE_OVERLOADING)
dBusConnectionFlags ,
#endif
getDBusConnectionFlags ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionGuidPropertyInfo ,
#endif
constructDBusConnectionGuid ,
#if defined(ENABLE_OVERLOADING)
dBusConnectionGuid ,
#endif
getDBusConnectionGuid ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionStreamPropertyInfo ,
#endif
constructDBusConnectionStream ,
#if defined(ENABLE_OVERLOADING)
dBusConnectionStream ,
#endif
getDBusConnectionStream ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionUniqueNamePropertyInfo ,
#endif
#if defined(ENABLE_OVERLOADING)
dBusConnectionUniqueName ,
#endif
getDBusConnectionUniqueName ,
DBusConnectionClosedCallback ,
#if defined(ENABLE_OVERLOADING)
DBusConnectionClosedSignalInfo ,
#endif
afterDBusConnectionClosed ,
onDBusConnectionClosed ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GHashTable as B.GHT
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.Kind as DK
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified Data.Word as DW
import qualified Data.Int as DI
import qualified System.Posix.Types as SPT
import qualified Foreign.C.Types as FCT
#if MIN_VERSION_base(4,18,0)
import qualified GI.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.Bytes as GLib.Bytes
import qualified GI.GLib.Structs.PollFD as GLib.PollFD
import qualified GI.GLib.Structs.Source as GLib.Source
import qualified GI.GLib.Structs.String as GLib.String
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Callbacks as GObject.Callbacks
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.GObject.Structs.Parameter as GObject.Parameter
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Enums as Gio.Enums
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
import {-# SOURCE #-} qualified GI.Gio.Objects.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.GLib.Callbacks as GLib.Callbacks
import qualified GI.GLib.Structs.VariantType as GLib.VariantType
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Flags as Gio.Flags
import {-# SOURCE #-} qualified GI.Gio.Interfaces.ActionGroup as Gio.ActionGroup
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncInitable as Gio.AsyncInitable
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Interfaces.Initable as Gio.Initable
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
import {-# SOURCE #-} qualified GI.Gio.Objects.Credentials as Gio.Credentials
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusAuthObserver as Gio.DBusAuthObserver
import {-# SOURCE #-} qualified GI.Gio.Objects.DBusMessage as Gio.DBusMessage
import {-# SOURCE #-} qualified GI.Gio.Objects.IOStream as Gio.IOStream
import {-# SOURCE #-} qualified GI.Gio.Objects.MenuModel as Gio.MenuModel
import {-# SOURCE #-} qualified GI.Gio.Objects.UnixFDList as Gio.UnixFDList
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusInterfaceInfo as Gio.DBusInterfaceInfo
import {-# SOURCE #-} qualified GI.Gio.Structs.DBusSubtreeVTable as Gio.DBusSubtreeVTable
#endif
newtype DBusConnection = DBusConnection (SP.ManagedPtr DBusConnection)
deriving (DBusConnection -> DBusConnection -> Bool
(DBusConnection -> DBusConnection -> Bool)
-> (DBusConnection -> DBusConnection -> Bool) -> Eq DBusConnection
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
$c== :: DBusConnection -> DBusConnection -> Bool
== :: DBusConnection -> DBusConnection -> Bool
$c/= :: DBusConnection -> DBusConnection -> Bool
/= :: DBusConnection -> DBusConnection -> Bool
Eq)
instance SP.ManagedPtrNewtype DBusConnection where
toManagedPtr :: DBusConnection -> ManagedPtr DBusConnection
toManagedPtr (DBusConnection ManagedPtr DBusConnection
p) = ManagedPtr DBusConnection
p
foreign import ccall "g_dbus_connection_get_type"
c_g_dbus_connection_get_type :: IO B.Types.GType
instance B.Types.TypedObject DBusConnection where
glibType :: IO GType
glibType = IO GType
c_g_dbus_connection_get_type
instance B.Types.GObject DBusConnection
class (SP.GObject o, O.IsDescendantOf DBusConnection o) => IsDBusConnection o
instance (SP.GObject o, O.IsDescendantOf DBusConnection o) => IsDBusConnection o
instance O.HasParentTypes DBusConnection
type instance O.ParentTypes DBusConnection = '[GObject.Object.Object, Gio.AsyncInitable.AsyncInitable, Gio.Initable.Initable]
toDBusConnection :: (MIO.MonadIO m, IsDBusConnection o) => o -> m DBusConnection
toDBusConnection :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m DBusConnection
toDBusConnection = IO DBusConnection -> m DBusConnection
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO DBusConnection -> m DBusConnection)
-> (o -> IO DBusConnection) -> o -> m DBusConnection
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr DBusConnection -> DBusConnection)
-> o -> IO DBusConnection
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
B.ManagedPtr.unsafeCastTo ManagedPtr DBusConnection -> DBusConnection
DBusConnection
instance B.GValue.IsGValue (Maybe DBusConnection) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_g_dbus_connection_get_type
gvalueSet_ :: Ptr GValue -> Maybe DBusConnection -> IO ()
gvalueSet_ Ptr GValue
gv Maybe DBusConnection
P.Nothing = Ptr GValue -> Ptr DBusConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv (Ptr DBusConnection
forall a. Ptr a
FP.nullPtr :: FP.Ptr DBusConnection)
gvalueSet_ Ptr GValue
gv (P.Just DBusConnection
obj) = DBusConnection -> (Ptr DBusConnection -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr DBusConnection
obj (Ptr GValue -> Ptr DBusConnection -> IO ()
forall a. GObject a => Ptr GValue -> Ptr a -> IO ()
B.GValue.set_object Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe DBusConnection)
gvalueGet_ Ptr GValue
gv = do
ptr <- Ptr GValue -> IO (Ptr DBusConnection)
forall a. GObject a => Ptr GValue -> IO (Ptr a)
B.GValue.get_object Ptr GValue
gv :: IO (FP.Ptr DBusConnection)
if ptr /= FP.nullPtr
then P.Just <$> B.ManagedPtr.newObject DBusConnection ptr
else return P.Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveDBusConnectionMethod (t :: Symbol) (o :: DK.Type) :: DK.Type where
ResolveDBusConnectionMethod "addFilter" o = DBusConnectionAddFilterMethodInfo
ResolveDBusConnectionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveDBusConnectionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveDBusConnectionMethod "call" o = DBusConnectionCallMethodInfo
ResolveDBusConnectionMethod "callFinish" o = DBusConnectionCallFinishMethodInfo
ResolveDBusConnectionMethod "callSync" o = DBusConnectionCallSyncMethodInfo
ResolveDBusConnectionMethod "callWithUnixFdList" o = DBusConnectionCallWithUnixFdListMethodInfo
ResolveDBusConnectionMethod "callWithUnixFdListFinish" o = DBusConnectionCallWithUnixFdListFinishMethodInfo
ResolveDBusConnectionMethod "callWithUnixFdListSync" o = DBusConnectionCallWithUnixFdListSyncMethodInfo
ResolveDBusConnectionMethod "close" o = DBusConnectionCloseMethodInfo
ResolveDBusConnectionMethod "closeFinish" o = DBusConnectionCloseFinishMethodInfo
ResolveDBusConnectionMethod "closeSync" o = DBusConnectionCloseSyncMethodInfo
ResolveDBusConnectionMethod "emitSignal" o = DBusConnectionEmitSignalMethodInfo
ResolveDBusConnectionMethod "exportActionGroup" o = DBusConnectionExportActionGroupMethodInfo
ResolveDBusConnectionMethod "exportMenuModel" o = DBusConnectionExportMenuModelMethodInfo
ResolveDBusConnectionMethod "flush" o = DBusConnectionFlushMethodInfo
ResolveDBusConnectionMethod "flushFinish" o = DBusConnectionFlushFinishMethodInfo
ResolveDBusConnectionMethod "flushSync" o = DBusConnectionFlushSyncMethodInfo
ResolveDBusConnectionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveDBusConnectionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveDBusConnectionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveDBusConnectionMethod "init" o = Gio.Initable.InitableInitMethodInfo
ResolveDBusConnectionMethod "initAsync" o = Gio.AsyncInitable.AsyncInitableInitAsyncMethodInfo
ResolveDBusConnectionMethod "initFinish" o = Gio.AsyncInitable.AsyncInitableInitFinishMethodInfo
ResolveDBusConnectionMethod "isClosed" o = DBusConnectionIsClosedMethodInfo
ResolveDBusConnectionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveDBusConnectionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveDBusConnectionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveDBusConnectionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveDBusConnectionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveDBusConnectionMethod "registerObject" o = DBusConnectionRegisterObjectMethodInfo
ResolveDBusConnectionMethod "registerObjectWithClosures2" o = DBusConnectionRegisterObjectWithClosures2MethodInfo
ResolveDBusConnectionMethod "registerSubtree" o = DBusConnectionRegisterSubtreeMethodInfo
ResolveDBusConnectionMethod "removeFilter" o = DBusConnectionRemoveFilterMethodInfo
ResolveDBusConnectionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveDBusConnectionMethod "sendMessage" o = DBusConnectionSendMessageMethodInfo
ResolveDBusConnectionMethod "sendMessageWithReply" o = DBusConnectionSendMessageWithReplyMethodInfo
ResolveDBusConnectionMethod "sendMessageWithReplyFinish" o = DBusConnectionSendMessageWithReplyFinishMethodInfo
ResolveDBusConnectionMethod "sendMessageWithReplySync" o = DBusConnectionSendMessageWithReplySyncMethodInfo
ResolveDBusConnectionMethod "signalSubscribe" o = DBusConnectionSignalSubscribeMethodInfo
ResolveDBusConnectionMethod "signalUnsubscribe" o = DBusConnectionSignalUnsubscribeMethodInfo
ResolveDBusConnectionMethod "startMessageProcessing" o = DBusConnectionStartMessageProcessingMethodInfo
ResolveDBusConnectionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveDBusConnectionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveDBusConnectionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveDBusConnectionMethod "unexportActionGroup" o = DBusConnectionUnexportActionGroupMethodInfo
ResolveDBusConnectionMethod "unexportMenuModel" o = DBusConnectionUnexportMenuModelMethodInfo
ResolveDBusConnectionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveDBusConnectionMethod "unregisterObject" o = DBusConnectionUnregisterObjectMethodInfo
ResolveDBusConnectionMethod "unregisterSubtree" o = DBusConnectionUnregisterSubtreeMethodInfo
ResolveDBusConnectionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveDBusConnectionMethod "getCapabilities" o = DBusConnectionGetCapabilitiesMethodInfo
ResolveDBusConnectionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveDBusConnectionMethod "getExitOnClose" o = DBusConnectionGetExitOnCloseMethodInfo
ResolveDBusConnectionMethod "getFlags" o = DBusConnectionGetFlagsMethodInfo
ResolveDBusConnectionMethod "getGuid" o = DBusConnectionGetGuidMethodInfo
ResolveDBusConnectionMethod "getLastSerial" o = DBusConnectionGetLastSerialMethodInfo
ResolveDBusConnectionMethod "getPeerCredentials" o = DBusConnectionGetPeerCredentialsMethodInfo
ResolveDBusConnectionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveDBusConnectionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveDBusConnectionMethod "getStream" o = DBusConnectionGetStreamMethodInfo
ResolveDBusConnectionMethod "getUniqueName" o = DBusConnectionGetUniqueNameMethodInfo
ResolveDBusConnectionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveDBusConnectionMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveDBusConnectionMethod "setExitOnClose" o = DBusConnectionSetExitOnCloseMethodInfo
ResolveDBusConnectionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveDBusConnectionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveDBusConnectionMethod t DBusConnection, O.OverloadedMethod info DBusConnection p) => OL.IsLabel t (DBusConnection -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: DBusConnection -> p
fromLabel = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveDBusConnectionMethod t DBusConnection, O.OverloadedMethod info DBusConnection p, R.HasField t DBusConnection p) => R.HasField t DBusConnection p where
getField :: DBusConnection -> p
getField = forall {k} (i :: k) o s. OverloadedMethod i o s => o -> s
forall i o s. OverloadedMethod i o s => o -> s
O.overloadedMethod @info
#endif
instance (info ~ ResolveDBusConnectionMethod t DBusConnection, O.OverloadedMethodInfo info DBusConnection) => OL.IsLabel t (O.MethodProxy info DBusConnection) where
#if MIN_VERSION_base(4,10,0)
fromLabel :: MethodProxy info DBusConnection
fromLabel = MethodProxy info DBusConnection
forall info obj. MethodProxy info obj
O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif
type DBusConnectionClosedCallback =
Bool
-> Maybe GError
-> IO ()
type C_DBusConnectionClosedCallback =
Ptr DBusConnection ->
CInt ->
Ptr GError ->
Ptr () ->
IO ()
foreign import ccall "wrapper"
mk_DBusConnectionClosedCallback :: C_DBusConnectionClosedCallback -> IO (FunPtr C_DBusConnectionClosedCallback)
wrap_DBusConnectionClosedCallback ::
GObject a => (a -> DBusConnectionClosedCallback) ->
C_DBusConnectionClosedCallback
wrap_DBusConnectionClosedCallback :: forall a.
GObject a =>
(a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
wrap_DBusConnectionClosedCallback a -> DBusConnectionClosedCallback
gi'cb Ptr DBusConnection
gi'selfPtr CInt
remotePeerVanished Ptr GError
error_ Ptr ()
_ = do
let remotePeerVanished' :: Bool
remotePeerVanished' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
remotePeerVanished
maybeError_ <-
if Ptr GError
error_ Ptr GError -> Ptr GError -> Bool
forall a. Eq a => a -> a -> Bool
== Ptr GError
forall a. Ptr a
FP.nullPtr
then Maybe GError -> IO (Maybe GError)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe GError
forall a. Maybe a
Nothing
else do
error_' <- ((ManagedPtr GError -> GError) -> Ptr GError -> IO GError
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr GError -> GError
GError) Ptr GError
error_
return $ Just error_'
B.ManagedPtr.withNewObject gi'selfPtr $ \DBusConnection
gi'self -> a -> DBusConnectionClosedCallback
gi'cb (DBusConnection -> a
forall a b. Coercible a b => a -> b
Coerce.coerce DBusConnection
gi'self) Bool
remotePeerVanished' Maybe GError
maybeError_
onDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> ((?self :: a) => DBusConnectionClosedCallback) -> m SignalHandlerId
onDBusConnectionClosed :: forall a (m :: * -> *).
(IsDBusConnection a, MonadIO m) =>
a
-> ((?self::a) => DBusConnectionClosedCallback)
-> m SignalHandlerId
onDBusConnectionClosed a
obj (?self::a) => DBusConnectionClosedCallback
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 -> DBusConnectionClosedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusConnectionClosedCallback
DBusConnectionClosedCallback
cb
let wrapped' :: C_DBusConnectionClosedCallback
wrapped' = (a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
forall a.
GObject a =>
(a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
wrap_DBusConnectionClosedCallback a -> DBusConnectionClosedCallback
wrapped
wrapped'' <- C_DBusConnectionClosedCallback
-> IO (FunPtr C_DBusConnectionClosedCallback)
mk_DBusConnectionClosedCallback C_DBusConnectionClosedCallback
wrapped'
connectSignalFunPtr obj "closed" wrapped'' SignalConnectBefore Nothing
afterDBusConnectionClosed :: (IsDBusConnection a, MonadIO m) => a -> ((?self :: a) => DBusConnectionClosedCallback) -> m SignalHandlerId
afterDBusConnectionClosed :: forall a (m :: * -> *).
(IsDBusConnection a, MonadIO m) =>
a
-> ((?self::a) => DBusConnectionClosedCallback)
-> m SignalHandlerId
afterDBusConnectionClosed a
obj (?self::a) => DBusConnectionClosedCallback
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 -> DBusConnectionClosedCallback
wrapped a
self = let ?self = a
?self::a
self in (?self::a) => DBusConnectionClosedCallback
DBusConnectionClosedCallback
cb
let wrapped' :: C_DBusConnectionClosedCallback
wrapped' = (a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
forall a.
GObject a =>
(a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
wrap_DBusConnectionClosedCallback a -> DBusConnectionClosedCallback
wrapped
wrapped'' <- C_DBusConnectionClosedCallback
-> IO (FunPtr C_DBusConnectionClosedCallback)
mk_DBusConnectionClosedCallback C_DBusConnectionClosedCallback
wrapped'
connectSignalFunPtr obj "closed" wrapped'' SignalConnectAfter Nothing
#if defined(ENABLE_OVERLOADING)
data DBusConnectionClosedSignalInfo
instance SignalInfo DBusConnectionClosedSignalInfo where
type HaskellCallbackType DBusConnectionClosedSignalInfo = DBusConnectionClosedCallback
connectSignal :: forall o.
GObject o =>
o
-> (o -> HaskellCallbackType DBusConnectionClosedSignalInfo)
-> SignalConnectMode
-> Maybe Text
-> IO SignalHandlerId
connectSignal o
obj o -> HaskellCallbackType DBusConnectionClosedSignalInfo
cb SignalConnectMode
connectMode Maybe Text
detail = do
let cb' :: C_DBusConnectionClosedCallback
cb' = (o -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
forall a.
GObject a =>
(a -> DBusConnectionClosedCallback)
-> C_DBusConnectionClosedCallback
wrap_DBusConnectionClosedCallback o -> HaskellCallbackType DBusConnectionClosedSignalInfo
o -> DBusConnectionClosedCallback
cb
cb'' <- C_DBusConnectionClosedCallback
-> IO (FunPtr C_DBusConnectionClosedCallback)
mk_DBusConnectionClosedCallback C_DBusConnectionClosedCallback
cb'
connectSignalFunPtr obj "closed" cb'' connectMode detail
dbgSignalInfo :: Maybe ResolvedSymbolInfo
dbgSignalInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection::closed"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:signal:closed"})
#endif
constructDBusConnectionAddress :: (IsDBusConnection o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusConnectionAddress :: forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusConnectionAddress 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
"address" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionAddressPropertyInfo
instance AttrInfo DBusConnectionAddressPropertyInfo where
type AttrAllowedOps DBusConnectionAddressPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionAddressPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusConnectionAddressPropertyInfo = (~) T.Text
type AttrTransferType DBusConnectionAddressPropertyInfo = T.Text
type AttrGetType DBusConnectionAddressPropertyInfo = ()
type AttrLabel DBusConnectionAddressPropertyInfo = "address"
type AttrOrigin DBusConnectionAddressPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionAddressPropertyInfo)
attrGet = o -> IO ()
o -> IO (AttrGetType DBusConnectionAddressPropertyInfo)
forall a. HasCallStack => a
undefined
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo o,
AttrSetTypeConstraint DBusConnectionAddressPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo o,
AttrTransferTypeConstraint DBusConnectionAddressPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionAddressPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo o,
AttrSetTypeConstraint DBusConnectionAddressPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
Text -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusConnectionAddress
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionAddressPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.address"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:address"
})
#endif
constructDBusConnectionAuthenticationObserver :: (IsDBusConnection o, MIO.MonadIO m, Gio.DBusAuthObserver.IsDBusAuthObserver a) => a -> m (GValueConstruct o)
constructDBusConnectionAuthenticationObserver :: forall o (m :: * -> *) a.
(IsDBusConnection o, MonadIO m, IsDBusAuthObserver a) =>
a -> m (GValueConstruct o)
constructDBusConnectionAuthenticationObserver 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
"authentication-observer" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionAuthenticationObserverPropertyInfo
instance AttrInfo DBusConnectionAuthenticationObserverPropertyInfo where
type AttrAllowedOps DBusConnectionAuthenticationObserverPropertyInfo = '[ 'AttrConstruct, 'AttrClear]
type AttrBaseTypeConstraint DBusConnectionAuthenticationObserverPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionAuthenticationObserverPropertyInfo = Gio.DBusAuthObserver.IsDBusAuthObserver
type AttrTransferTypeConstraint DBusConnectionAuthenticationObserverPropertyInfo = Gio.DBusAuthObserver.IsDBusAuthObserver
type AttrTransferType DBusConnectionAuthenticationObserverPropertyInfo = Gio.DBusAuthObserver.DBusAuthObserver
type AttrGetType DBusConnectionAuthenticationObserverPropertyInfo = ()
type AttrLabel DBusConnectionAuthenticationObserverPropertyInfo = "authentication-observer"
type AttrOrigin DBusConnectionAuthenticationObserverPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo o =>
o
-> IO
(AttrGetType DBusConnectionAuthenticationObserverPropertyInfo)
attrGet = o -> IO ()
o
-> IO
(AttrGetType DBusConnectionAuthenticationObserverPropertyInfo)
forall a. HasCallStack => a
undefined
attrSet :: forall o b.
(AttrBaseTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo o,
AttrSetTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo o,
AttrTransferTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo b) =>
Proxy o
-> b
-> IO
(AttrTransferType DBusConnectionAuthenticationObserverPropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr DBusAuthObserver -> DBusAuthObserver)
-> b -> IO DBusAuthObserver
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr DBusAuthObserver -> DBusAuthObserver
Gio.DBusAuthObserver.DBusAuthObserver b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo o,
AttrSetTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsDBusConnection o, MonadIO m, IsDBusAuthObserver a) =>
a -> m (GValueConstruct o)
constructDBusConnectionAuthenticationObserver
attrClear :: forall o.
AttrBaseTypeConstraint
DBusConnectionAuthenticationObserverPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.authenticationObserver"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:authenticationObserver"
})
#endif
getDBusConnectionCapabilities :: (MonadIO m, IsDBusConnection o) => o -> m [Gio.Flags.DBusCapabilityFlags]
getDBusConnectionCapabilities :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m [DBusCapabilityFlags]
getDBusConnectionCapabilities o
obj = IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags])
-> IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DBusCapabilityFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"capabilities"
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCapabilitiesPropertyInfo
instance AttrInfo DBusConnectionCapabilitiesPropertyInfo where
type AttrAllowedOps DBusConnectionCapabilitiesPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionCapabilitiesPropertyInfo = (~) ()
type AttrTransferTypeConstraint DBusConnectionCapabilitiesPropertyInfo = (~) ()
type AttrTransferType DBusConnectionCapabilitiesPropertyInfo = ()
type AttrGetType DBusConnectionCapabilitiesPropertyInfo = [Gio.Flags.DBusCapabilityFlags]
type AttrLabel DBusConnectionCapabilitiesPropertyInfo = "capabilities"
type AttrOrigin DBusConnectionCapabilitiesPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionCapabilitiesPropertyInfo)
attrGet = o -> IO [DBusCapabilityFlags]
o -> IO (AttrGetType DBusConnectionCapabilitiesPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m [DBusCapabilityFlags]
getDBusConnectionCapabilities
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo o,
AttrSetTypeConstraint DBusConnectionCapabilitiesPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo o,
AttrTransferTypeConstraint
DBusConnectionCapabilitiesPropertyInfo b) =>
Proxy o
-> b
-> IO (AttrTransferType DBusConnectionCapabilitiesPropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType DBusConnectionCapabilitiesPropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo o,
AttrSetTypeConstraint DBusConnectionCapabilitiesPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionCapabilitiesPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.capabilities"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:capabilities"
})
#endif
getDBusConnectionClosed :: (MonadIO m, IsDBusConnection o) => o -> m Bool
getDBusConnectionClosed :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Bool
getDBusConnectionClosed o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"closed"
#if defined(ENABLE_OVERLOADING)
data DBusConnectionClosedPropertyInfo
instance AttrInfo DBusConnectionClosedPropertyInfo where
type AttrAllowedOps DBusConnectionClosedPropertyInfo = '[ 'AttrGet]
type AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionClosedPropertyInfo = (~) ()
type AttrTransferTypeConstraint DBusConnectionClosedPropertyInfo = (~) ()
type AttrTransferType DBusConnectionClosedPropertyInfo = ()
type AttrGetType DBusConnectionClosedPropertyInfo = Bool
type AttrLabel DBusConnectionClosedPropertyInfo = "closed"
type AttrOrigin DBusConnectionClosedPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionClosedPropertyInfo)
attrGet = o -> IO Bool
o -> IO (AttrGetType DBusConnectionClosedPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Bool
getDBusConnectionClosed
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo o,
AttrSetTypeConstraint DBusConnectionClosedPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo o,
AttrTransferTypeConstraint DBusConnectionClosedPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionClosedPropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType DBusConnectionClosedPropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo o,
AttrSetTypeConstraint DBusConnectionClosedPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionClosedPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.closed"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:closed"
})
#endif
getDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> m Bool
getDBusConnectionExitOnClose :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Bool
getDBusConnectionExitOnClose o
obj = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ o -> String -> IO Bool
forall a. GObject a => a -> String -> IO Bool
B.Properties.getObjectPropertyBool o
obj String
"exit-on-close"
setDBusConnectionExitOnClose :: (MonadIO m, IsDBusConnection o) => o -> Bool -> m ()
setDBusConnectionExitOnClose :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> Bool -> m ()
setDBusConnectionExitOnClose o
obj Bool
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 -> Bool -> IO ()
forall a. GObject a => a -> String -> Bool -> IO ()
B.Properties.setObjectPropertyBool o
obj String
"exit-on-close" Bool
val
constructDBusConnectionExitOnClose :: (IsDBusConnection o, MIO.MonadIO m) => Bool -> m (GValueConstruct o)
constructDBusConnectionExitOnClose :: forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDBusConnectionExitOnClose Bool
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 -> Bool -> IO (GValueConstruct o)
forall o. String -> Bool -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBool String
"exit-on-close" Bool
val
#if defined(ENABLE_OVERLOADING)
data DBusConnectionExitOnClosePropertyInfo
instance AttrInfo DBusConnectionExitOnClosePropertyInfo where
type AttrAllowedOps DBusConnectionExitOnClosePropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionExitOnClosePropertyInfo = (~) Bool
type AttrTransferTypeConstraint DBusConnectionExitOnClosePropertyInfo = (~) Bool
type AttrTransferType DBusConnectionExitOnClosePropertyInfo = Bool
type AttrGetType DBusConnectionExitOnClosePropertyInfo = Bool
type AttrLabel DBusConnectionExitOnClosePropertyInfo = "exit-on-close"
type AttrOrigin DBusConnectionExitOnClosePropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo o =>
o -> IO (AttrGetType DBusConnectionExitOnClosePropertyInfo)
attrGet = o -> IO Bool
o -> IO (AttrGetType DBusConnectionExitOnClosePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Bool
getDBusConnectionExitOnClose
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo o,
AttrSetTypeConstraint DBusConnectionExitOnClosePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
o -> Bool -> IO ()
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> Bool -> m ()
setDBusConnectionExitOnClose
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo o,
AttrTransferTypeConstraint
DBusConnectionExitOnClosePropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionExitOnClosePropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo o,
AttrSetTypeConstraint DBusConnectionExitOnClosePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
Bool -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Bool -> m (GValueConstruct o)
constructDBusConnectionExitOnClose
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionExitOnClosePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.exitOnClose"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:exitOnClose"
})
#endif
getDBusConnectionFlags :: (MonadIO m, IsDBusConnection o) => o -> m [Gio.Flags.DBusConnectionFlags]
getDBusConnectionFlags :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m [DBusConnectionFlags]
getDBusConnectionFlags o
obj = IO [DBusConnectionFlags] -> m [DBusConnectionFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO [DBusConnectionFlags] -> m [DBusConnectionFlags])
-> IO [DBusConnectionFlags] -> m [DBusConnectionFlags]
forall a b. (a -> b) -> a -> b
$ o -> String -> IO [DBusConnectionFlags]
forall a b.
(GObject a, IsGFlag b, BoxedFlags b) =>
a -> String -> IO [b]
B.Properties.getObjectPropertyFlags o
obj String
"flags"
constructDBusConnectionFlags :: (IsDBusConnection o, MIO.MonadIO m) => [Gio.Flags.DBusConnectionFlags] -> m (GValueConstruct o)
constructDBusConnectionFlags :: forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
[DBusConnectionFlags] -> m (GValueConstruct o)
constructDBusConnectionFlags [DBusConnectionFlags]
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 -> [DBusConnectionFlags] -> IO (GValueConstruct o)
forall a o.
(IsGFlag a, BoxedFlags a) =>
String -> [a] -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyFlags String
"flags" [DBusConnectionFlags]
val
#if defined(ENABLE_OVERLOADING)
data DBusConnectionFlagsPropertyInfo
instance AttrInfo DBusConnectionFlagsPropertyInfo where
type AttrAllowedOps DBusConnectionFlagsPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionFlagsPropertyInfo = (~) [Gio.Flags.DBusConnectionFlags]
type AttrTransferTypeConstraint DBusConnectionFlagsPropertyInfo = (~) [Gio.Flags.DBusConnectionFlags]
type AttrTransferType DBusConnectionFlagsPropertyInfo = [Gio.Flags.DBusConnectionFlags]
type AttrGetType DBusConnectionFlagsPropertyInfo = [Gio.Flags.DBusConnectionFlags]
type AttrLabel DBusConnectionFlagsPropertyInfo = "flags"
type AttrOrigin DBusConnectionFlagsPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionFlagsPropertyInfo)
attrGet = o -> IO [DBusConnectionFlags]
o -> IO (AttrGetType DBusConnectionFlagsPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m [DBusConnectionFlags]
getDBusConnectionFlags
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo o,
AttrSetTypeConstraint DBusConnectionFlagsPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo o,
AttrTransferTypeConstraint DBusConnectionFlagsPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionFlagsPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo o,
AttrSetTypeConstraint DBusConnectionFlagsPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
[DBusConnectionFlags] -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
[DBusConnectionFlags] -> m (GValueConstruct o)
constructDBusConnectionFlags
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionFlagsPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.flags"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:flags"
})
#endif
getDBusConnectionGuid :: (MonadIO m, IsDBusConnection o) => o -> m T.Text
getDBusConnectionGuid :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Text
getDBusConnectionGuid o
obj = IO Text -> m Text
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO Text -> m Text) -> IO Text -> m Text
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe Text) -> IO Text
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDBusConnectionGuid" (IO (Maybe Text) -> IO Text) -> IO (Maybe Text) -> IO 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
"guid"
constructDBusConnectionGuid :: (IsDBusConnection o, MIO.MonadIO m) => T.Text -> m (GValueConstruct o)
constructDBusConnectionGuid :: forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusConnectionGuid 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
"guid" (Text -> Maybe Text
forall a. a -> Maybe a
P.Just Text
val)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGuidPropertyInfo
instance AttrInfo DBusConnectionGuidPropertyInfo where
type AttrAllowedOps DBusConnectionGuidPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionGuidPropertyInfo = (~) T.Text
type AttrTransferTypeConstraint DBusConnectionGuidPropertyInfo = (~) T.Text
type AttrTransferType DBusConnectionGuidPropertyInfo = T.Text
type AttrGetType DBusConnectionGuidPropertyInfo = T.Text
type AttrLabel DBusConnectionGuidPropertyInfo = "guid"
type AttrOrigin DBusConnectionGuidPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionGuidPropertyInfo)
attrGet = o -> IO Text
o -> IO (AttrGetType DBusConnectionGuidPropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m Text
getDBusConnectionGuid
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo o,
AttrSetTypeConstraint DBusConnectionGuidPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo o,
AttrTransferTypeConstraint DBusConnectionGuidPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionGuidPropertyInfo)
attrTransfer Proxy o
_ b
v = do
b -> IO b
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo o,
AttrSetTypeConstraint DBusConnectionGuidPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
Text -> IO (GValueConstruct o)
forall o (m :: * -> *).
(IsDBusConnection o, MonadIO m) =>
Text -> m (GValueConstruct o)
constructDBusConnectionGuid
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionGuidPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.guid"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:guid"
})
#endif
getDBusConnectionStream :: (MonadIO m, IsDBusConnection o) => o -> m Gio.IOStream.IOStream
getDBusConnectionStream :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m IOStream
getDBusConnectionStream o
obj = IO IOStream -> m IOStream
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
MIO.liftIO (IO IOStream -> m IOStream) -> IO IOStream -> m IOStream
forall a b. (a -> b) -> a -> b
$ Text -> IO (Maybe IOStream) -> IO IOStream
forall a. HasCallStack => Text -> IO (Maybe a) -> IO a
checkUnexpectedNothing Text
"getDBusConnectionStream" (IO (Maybe IOStream) -> IO IOStream)
-> IO (Maybe IOStream) -> IO IOStream
forall a b. (a -> b) -> a -> b
$ o
-> String
-> (ManagedPtr IOStream -> IOStream)
-> IO (Maybe IOStream)
forall a b.
(GObject a, GObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyObject o
obj String
"stream" ManagedPtr IOStream -> IOStream
Gio.IOStream.IOStream
constructDBusConnectionStream :: (IsDBusConnection o, MIO.MonadIO m, Gio.IOStream.IsIOStream a) => a -> m (GValueConstruct o)
constructDBusConnectionStream :: forall o (m :: * -> *) a.
(IsDBusConnection o, MonadIO m, IsIOStream a) =>
a -> m (GValueConstruct o)
constructDBusConnectionStream 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
"stream" (a -> Maybe a
forall a. a -> Maybe a
P.Just a
val)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionStreamPropertyInfo
instance AttrInfo DBusConnectionStreamPropertyInfo where
type AttrAllowedOps DBusConnectionStreamPropertyInfo = '[ 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionStreamPropertyInfo = Gio.IOStream.IsIOStream
type AttrTransferTypeConstraint DBusConnectionStreamPropertyInfo = Gio.IOStream.IsIOStream
type AttrTransferType DBusConnectionStreamPropertyInfo = Gio.IOStream.IOStream
type AttrGetType DBusConnectionStreamPropertyInfo = Gio.IOStream.IOStream
type AttrLabel DBusConnectionStreamPropertyInfo = "stream"
type AttrOrigin DBusConnectionStreamPropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo o =>
o -> IO (AttrGetType DBusConnectionStreamPropertyInfo)
attrGet = o -> IO (AttrGetType DBusConnectionStreamPropertyInfo)
o -> IO IOStream
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m IOStream
getDBusConnectionStream
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo o,
AttrSetTypeConstraint DBusConnectionStreamPropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo o,
AttrTransferTypeConstraint DBusConnectionStreamPropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionStreamPropertyInfo)
attrTransfer Proxy o
_ b
v = do
(ManagedPtr IOStream -> IOStream) -> b -> IO IOStream
forall o o'.
(HasCallStack, ManagedPtrNewtype o, TypedObject o,
ManagedPtrNewtype o', TypedObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr IOStream -> IOStream
Gio.IOStream.IOStream b
v
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo o,
AttrSetTypeConstraint DBusConnectionStreamPropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall o (m :: * -> *) a.
(IsDBusConnection o, MonadIO m, IsIOStream a) =>
a -> m (GValueConstruct o)
constructDBusConnectionStream
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionStreamPropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.stream"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:stream"
})
#endif
getDBusConnectionUniqueName :: (MonadIO m, IsDBusConnection o) => o -> m (Maybe T.Text)
getDBusConnectionUniqueName :: forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m (Maybe Text)
getDBusConnectionUniqueName 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
"unique-name"
#if defined(ENABLE_OVERLOADING)
data DBusConnectionUniqueNamePropertyInfo
instance AttrInfo DBusConnectionUniqueNamePropertyInfo where
type AttrAllowedOps DBusConnectionUniqueNamePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo = IsDBusConnection
type AttrSetTypeConstraint DBusConnectionUniqueNamePropertyInfo = (~) ()
type AttrTransferTypeConstraint DBusConnectionUniqueNamePropertyInfo = (~) ()
type AttrTransferType DBusConnectionUniqueNamePropertyInfo = ()
type AttrGetType DBusConnectionUniqueNamePropertyInfo = (Maybe T.Text)
type AttrLabel DBusConnectionUniqueNamePropertyInfo = "unique-name"
type AttrOrigin DBusConnectionUniqueNamePropertyInfo = DBusConnection
attrGet :: forall o.
AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo o =>
o -> IO (AttrGetType DBusConnectionUniqueNamePropertyInfo)
attrGet = o -> IO (Maybe Text)
o -> IO (AttrGetType DBusConnectionUniqueNamePropertyInfo)
forall (m :: * -> *) o.
(MonadIO m, IsDBusConnection o) =>
o -> m (Maybe Text)
getDBusConnectionUniqueName
attrSet :: forall o b.
(AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo o,
AttrSetTypeConstraint DBusConnectionUniqueNamePropertyInfo b) =>
o -> b -> IO ()
attrSet = o -> b -> IO ()
forall a. HasCallStack => a
undefined
attrTransfer :: forall o b.
(AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo o,
AttrTransferTypeConstraint
DBusConnectionUniqueNamePropertyInfo b) =>
Proxy o
-> b -> IO (AttrTransferType DBusConnectionUniqueNamePropertyInfo)
attrTransfer Proxy o
_ = b -> IO (AttrTransferType DBusConnectionUniqueNamePropertyInfo)
() -> IO ()
forall a. HasCallStack => a
undefined
attrConstruct :: forall o b.
(AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo o,
AttrSetTypeConstraint DBusConnectionUniqueNamePropertyInfo b) =>
b -> IO (GValueConstruct o)
attrConstruct = b -> IO (GValueConstruct o)
forall a. HasCallStack => a
undefined
attrClear :: forall o.
AttrBaseTypeConstraint DBusConnectionUniqueNamePropertyInfo o =>
o -> IO ()
attrClear = o -> IO ()
forall a. HasCallStack => a
undefined
dbgAttrInfo :: Maybe ResolvedSymbolInfo
dbgAttrInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.uniqueName"
, resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#g:attr:uniqueName"
})
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList DBusConnection
type instance O.AttributeList DBusConnection = DBusConnectionAttributeList
type DBusConnectionAttributeList = ('[ '("address", DBusConnectionAddressPropertyInfo), '("authenticationObserver", DBusConnectionAuthenticationObserverPropertyInfo), '("capabilities", DBusConnectionCapabilitiesPropertyInfo), '("closed", DBusConnectionClosedPropertyInfo), '("exitOnClose", DBusConnectionExitOnClosePropertyInfo), '("flags", DBusConnectionFlagsPropertyInfo), '("guid", DBusConnectionGuidPropertyInfo), '("stream", DBusConnectionStreamPropertyInfo), '("uniqueName", DBusConnectionUniqueNamePropertyInfo)] :: [(Symbol, DK.Type)])
#endif
#if defined(ENABLE_OVERLOADING)
dBusConnectionAddress :: AttrLabelProxy "address"
dBusConnectionAddress :: AttrLabelProxy "address"
dBusConnectionAddress = AttrLabelProxy "address"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionAuthenticationObserver :: AttrLabelProxy "authenticationObserver"
dBusConnectionAuthenticationObserver :: AttrLabelProxy "authenticationObserver"
dBusConnectionAuthenticationObserver = AttrLabelProxy "authenticationObserver"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionCapabilities :: AttrLabelProxy "capabilities"
dBusConnectionCapabilities :: AttrLabelProxy "capabilities"
dBusConnectionCapabilities = AttrLabelProxy "capabilities"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionClosed :: AttrLabelProxy "closed"
dBusConnectionClosed :: AttrLabelProxy "closed"
dBusConnectionClosed = AttrLabelProxy "closed"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionExitOnClose :: AttrLabelProxy "exitOnClose"
dBusConnectionExitOnClose :: AttrLabelProxy "exitOnClose"
dBusConnectionExitOnClose = AttrLabelProxy "exitOnClose"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionFlags :: AttrLabelProxy "flags"
dBusConnectionFlags :: AttrLabelProxy "flags"
dBusConnectionFlags = AttrLabelProxy "flags"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionGuid :: AttrLabelProxy "guid"
dBusConnectionGuid :: AttrLabelProxy "guid"
dBusConnectionGuid = AttrLabelProxy "guid"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionStream :: AttrLabelProxy "stream"
dBusConnectionStream :: AttrLabelProxy "stream"
dBusConnectionStream = AttrLabelProxy "stream"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
dBusConnectionUniqueName :: AttrLabelProxy "uniqueName"
dBusConnectionUniqueName :: AttrLabelProxy "uniqueName"
dBusConnectionUniqueName = AttrLabelProxy "uniqueName"
forall (a :: Symbol). AttrLabelProxy a
AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList DBusConnection = DBusConnectionSignalList
type DBusConnectionSignalList = ('[ '("closed", DBusConnectionClosedSignalInfo), '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, DK.Type)])
#endif
foreign import ccall "g_dbus_connection_new_finish" g_dbus_connection_new_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr DBusConnection)
dBusConnectionNewFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m DBusConnection
dBusConnectionNewFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncResult a) =>
a -> m DBusConnection
dBusConnectionNewFinish a
res = 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
res' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
onException (do
result <- propagateGError $ g_dbus_connection_new_finish res'
checkUnexpectedReturnNULL "dBusConnectionNewFinish" result
result' <- (wrapObject DBusConnection) result
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_connection_new_for_address_finish" g_dbus_connection_new_for_address_finish ::
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr DBusConnection)
dBusConnectionNewForAddressFinish ::
(B.CallStack.HasCallStack, MonadIO m, Gio.AsyncResult.IsAsyncResult a) =>
a
-> m DBusConnection
dBusConnectionNewForAddressFinish :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsAsyncResult a) =>
a -> m DBusConnection
dBusConnectionNewForAddressFinish a
res = 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
res' <- a -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
res
onException (do
result <- propagateGError $ g_dbus_connection_new_for_address_finish res'
checkUnexpectedReturnNULL "dBusConnectionNewForAddressFinish" result
result' <- (wrapObject DBusConnection) result
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_connection_new_for_address_sync" g_dbus_connection_new_for_address_sync ::
CString ->
CUInt ->
Ptr Gio.DBusAuthObserver.DBusAuthObserver ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DBusConnection)
dBusConnectionNewForAddressSync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusAuthObserver.IsDBusAuthObserver a, Gio.Cancellable.IsCancellable b) =>
T.Text
-> [Gio.Flags.DBusConnectionFlags]
-> Maybe (a)
-> Maybe (b)
-> m DBusConnection
dBusConnectionNewForAddressSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) =>
Text
-> [DBusConnectionFlags] -> Maybe a -> Maybe b -> m DBusConnection
dBusConnectionNewForAddressSync Text
address [DBusConnectionFlags]
flags Maybe a
observer Maybe b
cancellable = 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
address' <- Text -> IO CString
textToCString Text
address
let flags' = [DBusConnectionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusConnectionFlags]
flags
maybeObserver <- case observer of
Maybe a
Nothing -> Ptr DBusAuthObserver -> IO (Ptr DBusAuthObserver)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusAuthObserver
forall a. Ptr a
FP.nullPtr
Just a
jObserver -> do
jObserver' <- a -> IO (Ptr DBusAuthObserver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jObserver
return jObserver'
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_connection_new_for_address_sync address' flags' maybeObserver maybeCancellable
checkUnexpectedReturnNULL "dBusConnectionNewForAddressSync" result
result' <- (wrapObject DBusConnection) result
whenJust observer touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem address'
return result'
) (do
freeMem address'
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_connection_new_sync" g_dbus_connection_new_sync ::
Ptr Gio.IOStream.IOStream ->
CString ->
CUInt ->
Ptr Gio.DBusAuthObserver.DBusAuthObserver ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr DBusConnection)
dBusConnectionNewSync ::
(B.CallStack.HasCallStack, MonadIO m, Gio.IOStream.IsIOStream a, Gio.DBusAuthObserver.IsDBusAuthObserver b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> [Gio.Flags.DBusConnectionFlags]
-> Maybe (b)
-> Maybe (c)
-> m DBusConnection
dBusConnectionNewSync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b,
IsCancellable c) =>
a
-> Maybe Text
-> [DBusConnectionFlags]
-> Maybe b
-> Maybe c
-> m DBusConnection
dBusConnectionNewSync a
stream Maybe Text
guid [DBusConnectionFlags]
flags Maybe b
observer Maybe c
cancellable = 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
stream' <- a -> IO (Ptr IOStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
maybeGuid <- case guid 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
jGuid -> do
jGuid' <- Text -> IO CString
textToCString Text
jGuid
return jGuid'
let flags' = [DBusConnectionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusConnectionFlags]
flags
maybeObserver <- case observer of
Maybe b
Nothing -> Ptr DBusAuthObserver -> IO (Ptr DBusAuthObserver)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusAuthObserver
forall a. Ptr a
FP.nullPtr
Just b
jObserver -> do
jObserver' <- b -> IO (Ptr DBusAuthObserver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jObserver
return jObserver'
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_connection_new_sync stream' maybeGuid flags' maybeObserver maybeCancellable
checkUnexpectedReturnNULL "dBusConnectionNewSync" result
result' <- (wrapObject DBusConnection) result
touchManagedPtr stream
whenJust observer touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeGuid
return result'
) (do
freeMem maybeGuid
)
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_connection_add_filter" g_dbus_connection_add_filter ::
Ptr DBusConnection ->
FunPtr Gio.Callbacks.C_DBusMessageFilterFunction ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO Word32
dBusConnectionAddFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Gio.Callbacks.DBusMessageFilterFunction
-> m Word32
dBusConnectionAddFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> DBusMessageFilterFunction -> m Word32
dBusConnectionAddFilter a
connection DBusMessageFilterFunction
filterFunction = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
filterFunction' <- Gio.Callbacks.mk_DBusMessageFilterFunction (Gio.Callbacks.wrap_DBusMessageFilterFunction Nothing (Gio.Callbacks.drop_closures_DBusMessageFilterFunction filterFunction))
let userData = FunPtr C_DBusMessageFilterFunction -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_DBusMessageFilterFunction
filterFunction'
let userDataFreeFunc = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
result <- g_dbus_connection_add_filter connection' filterFunction' userData userDataFreeFunc
touchManagedPtr connection
return result
#if defined(ENABLE_OVERLOADING)
data DBusConnectionAddFilterMethodInfo
instance (signature ~ (Gio.Callbacks.DBusMessageFilterFunction -> m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionAddFilterMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> DBusMessageFilterFunction -> m Word32
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> DBusMessageFilterFunction -> m Word32
dBusConnectionAddFilter
instance O.OverloadedMethodInfo DBusConnectionAddFilterMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionAddFilter",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionAddFilter"
})
#endif
foreign import ccall "g_dbus_connection_call" g_dbus_connection_call ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr GLib.VariantType.VariantType ->
CUInt ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionCall ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (GVariant)
-> Maybe (GLib.VariantType.VariantType)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionCall :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionCall a
connection Maybe Text
busName Text
objectPath Text
interfaceName Text
methodName Maybe GVariant
parameters Maybe VariantType
replyType [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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
maybeBusName <- case busName 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
jBusName -> do
jBusName' <- Text -> IO CString
textToCString Text
jBusName
return jBusName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
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'
maybeReplyType <- case replyType of
Maybe VariantType
Nothing -> Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
forall a. Ptr a
FP.nullPtr
Just VariantType
jReplyType -> do
jReplyType' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
jReplyType
return jReplyType'
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_connection_call connection' maybeBusName objectPath' interfaceName' methodName' maybeParameters maybeReplyType flags' timeoutMsec maybeCancellable maybeCallback userData
touchManagedPtr connection
whenJust parameters touchManagedPtr
whenJust replyType touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> T.Text -> T.Text -> Maybe (GVariant) -> Maybe (GLib.VariantType.VariantType) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionCallMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionCall
instance O.OverloadedMethodInfo DBusConnectionCallMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCall",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCall"
})
#endif
foreign import ccall "g_dbus_connection_call_finish" g_dbus_connection_call_finish ::
Ptr DBusConnection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusConnectionCallFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m GVariant
dBusConnectionCallFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m GVariant
dBusConnectionCallFinish a
connection 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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
res' <- unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_connection_call_finish connection' res'
checkUnexpectedReturnNULL "dBusConnectionCallFinish" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr connection
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallFinishMethodInfo
instance (signature ~ (b -> m GVariant), MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusConnectionCallFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m GVariant
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m GVariant
dBusConnectionCallFinish
instance O.OverloadedMethodInfo DBusConnectionCallFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCallFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCallFinish"
})
#endif
foreign import ccall "g_dbus_connection_call_sync" g_dbus_connection_call_sync ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr GLib.VariantType.VariantType ->
CUInt ->
Int32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusConnectionCallSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (GVariant)
-> Maybe (GLib.VariantType.VariantType)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> m GVariant
dBusConnectionCallSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> m GVariant
dBusConnectionCallSync a
connection Maybe Text
busName Text
objectPath Text
interfaceName Text
methodName Maybe GVariant
parameters Maybe VariantType
replyType [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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
maybeBusName <- case busName 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
jBusName -> do
jBusName' <- Text -> IO CString
textToCString Text
jBusName
return jBusName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
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'
maybeReplyType <- case replyType of
Maybe VariantType
Nothing -> Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
forall a. Ptr a
FP.nullPtr
Just VariantType
jReplyType -> do
jReplyType' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
jReplyType
return jReplyType'
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_connection_call_sync connection' maybeBusName objectPath' interfaceName' methodName' maybeParameters maybeReplyType flags' timeoutMsec maybeCancellable
checkUnexpectedReturnNULL "dBusConnectionCallSync" result
result' <- B.GVariant.wrapGVariantPtr result
touchManagedPtr connection
whenJust parameters touchManagedPtr
whenJust replyType touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
return result'
) (do
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallSyncMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> T.Text -> T.Text -> Maybe (GVariant) -> Maybe (GLib.VariantType.VariantType) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> m GVariant), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionCallSyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> m GVariant
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> m GVariant
dBusConnectionCallSync
instance O.OverloadedMethodInfo DBusConnectionCallSyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCallSync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCallSync"
})
#endif
foreign import ccall "g_dbus_connection_call_with_unix_fd_list" g_dbus_connection_call_with_unix_fd_list ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr GLib.VariantType.VariantType ->
CUInt ->
Int32 ->
Ptr Gio.UnixFDList.UnixFDList ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionCallWithUnixFdList ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (GVariant)
-> Maybe (GLib.VariantType.VariantType)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionCallWithUnixFdList :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionCallWithUnixFdList a
connection Maybe Text
busName Text
objectPath Text
interfaceName Text
methodName Maybe GVariant
parameters Maybe VariantType
replyType [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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
maybeBusName <- case busName 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
jBusName -> do
jBusName' <- Text -> IO CString
textToCString Text
jBusName
return jBusName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
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'
maybeReplyType <- case replyType of
Maybe VariantType
Nothing -> Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
forall a. Ptr a
FP.nullPtr
Just VariantType
jReplyType -> do
jReplyType' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
jReplyType
return jReplyType'
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_connection_call_with_unix_fd_list connection' maybeBusName objectPath' interfaceName' methodName' maybeParameters maybeReplyType flags' timeoutMsec maybeFdList maybeCancellable maybeCallback userData
touchManagedPtr connection
whenJust parameters touchManagedPtr
whenJust replyType touchManagedPtr
whenJust fdList touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallWithUnixFdListMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> T.Text -> T.Text -> Maybe (GVariant) -> Maybe (GLib.VariantType.VariantType) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusConnection a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusConnectionCallWithUnixFdListMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionCallWithUnixFdList
instance O.OverloadedMethodInfo DBusConnectionCallWithUnixFdListMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCallWithUnixFdList",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCallWithUnixFdList"
})
#endif
foreign import ccall "g_dbus_connection_call_with_unix_fd_list_finish" g_dbus_connection_call_with_unix_fd_list_finish ::
Ptr DBusConnection ->
Ptr (Ptr Gio.UnixFDList.UnixFDList) ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusConnectionCallWithUnixFdListFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ((GVariant, Maybe Gio.UnixFDList.UnixFDList))
dBusConnectionCallWithUnixFdListFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m (GVariant, Maybe UnixFDList)
dBusConnectionCallWithUnixFdListFinish a
connection b
res = IO (GVariant, Maybe UnixFDList) -> m (GVariant, Maybe UnixFDList)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GVariant, Maybe UnixFDList) -> m (GVariant, Maybe UnixFDList))
-> IO (GVariant, Maybe UnixFDList)
-> m (GVariant, Maybe UnixFDList)
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
outFdList <- callocMem :: IO (Ptr (Ptr Gio.UnixFDList.UnixFDList))
res' <- unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_connection_call_with_unix_fd_list_finish connection' outFdList res'
checkUnexpectedReturnNULL "dBusConnectionCallWithUnixFdListFinish" result
result' <- B.GVariant.wrapGVariantPtr result
outFdList' <- peek outFdList
maybeOutFdList' <- convertIfNonNull outFdList' $ \Ptr UnixFDList
outFdList'' -> do
outFdList''' <- ((ManagedPtr UnixFDList -> UnixFDList)
-> Ptr UnixFDList -> IO UnixFDList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UnixFDList -> UnixFDList
Gio.UnixFDList.UnixFDList) Ptr UnixFDList
outFdList''
return outFdList'''
touchManagedPtr connection
touchManagedPtr res
freeMem outFdList
return (result', maybeOutFdList')
) (do
freeMem outFdList
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallWithUnixFdListFinishMethodInfo
instance (signature ~ (b -> m ((GVariant, Maybe Gio.UnixFDList.UnixFDList))), MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusConnectionCallWithUnixFdListFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m (GVariant, Maybe UnixFDList)
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m (GVariant, Maybe UnixFDList)
dBusConnectionCallWithUnixFdListFinish
instance O.OverloadedMethodInfo DBusConnectionCallWithUnixFdListFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCallWithUnixFdListFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCallWithUnixFdListFinish"
})
#endif
foreign import ccall "g_dbus_connection_call_with_unix_fd_list_sync" g_dbus_connection_call_with_unix_fd_list_sync ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr GLib.VariantType.VariantType ->
CUInt ->
Int32 ->
Ptr Gio.UnixFDList.UnixFDList ->
Ptr (Ptr Gio.UnixFDList.UnixFDList) ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr GVariant)
dBusConnectionCallWithUnixFdListSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (GVariant)
-> Maybe (GLib.VariantType.VariantType)
-> [Gio.Flags.DBusCallFlags]
-> Int32
-> Maybe (b)
-> Maybe (c)
-> m ((GVariant, Maybe Gio.UnixFDList.UnixFDList))
dBusConnectionCallWithUnixFdListSync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> m (GVariant, Maybe UnixFDList)
dBusConnectionCallWithUnixFdListSync a
connection Maybe Text
busName Text
objectPath Text
interfaceName Text
methodName Maybe GVariant
parameters Maybe VariantType
replyType [DBusCallFlags]
flags Int32
timeoutMsec Maybe b
fdList Maybe c
cancellable = IO (GVariant, Maybe UnixFDList) -> m (GVariant, Maybe UnixFDList)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GVariant, Maybe UnixFDList) -> m (GVariant, Maybe UnixFDList))
-> IO (GVariant, Maybe UnixFDList)
-> m (GVariant, Maybe UnixFDList)
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
maybeBusName <- case busName 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
jBusName -> do
jBusName' <- Text -> IO CString
textToCString Text
jBusName
return jBusName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
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'
maybeReplyType <- case replyType of
Maybe VariantType
Nothing -> Ptr VariantType -> IO (Ptr VariantType)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr VariantType
forall a. Ptr a
FP.nullPtr
Just VariantType
jReplyType -> do
jReplyType' <- VariantType -> IO (Ptr VariantType)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VariantType
jReplyType
return jReplyType'
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_connection_call_with_unix_fd_list_sync connection' maybeBusName objectPath' interfaceName' methodName' maybeParameters maybeReplyType flags' timeoutMsec maybeFdList outFdList maybeCancellable
checkUnexpectedReturnNULL "dBusConnectionCallWithUnixFdListSync" result
result' <- B.GVariant.wrapGVariantPtr result
outFdList' <- peek outFdList
maybeOutFdList' <- convertIfNonNull outFdList' $ \Ptr UnixFDList
outFdList'' -> do
outFdList''' <- ((ManagedPtr UnixFDList -> UnixFDList)
-> Ptr UnixFDList -> IO UnixFDList
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr UnixFDList -> UnixFDList
Gio.UnixFDList.UnixFDList) Ptr UnixFDList
outFdList''
return outFdList'''
touchManagedPtr connection
whenJust parameters touchManagedPtr
whenJust replyType touchManagedPtr
whenJust fdList touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
freeMem outFdList
return (result', maybeOutFdList')
) (do
freeMem maybeBusName
freeMem objectPath'
freeMem interfaceName'
freeMem methodName'
freeMem outFdList
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCallWithUnixFdListSyncMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> T.Text -> T.Text -> Maybe (GVariant) -> Maybe (GLib.VariantType.VariantType) -> [Gio.Flags.DBusCallFlags] -> Int32 -> Maybe (b) -> Maybe (c) -> m ((GVariant, Maybe Gio.UnixFDList.UnixFDList))), MonadIO m, IsDBusConnection a, Gio.UnixFDList.IsUnixFDList b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusConnectionCallWithUnixFdListSyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> m (GVariant, Maybe UnixFDList)
forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsUnixFDList b,
IsCancellable c) =>
a
-> Maybe Text
-> Text
-> Text
-> Text
-> Maybe GVariant
-> Maybe VariantType
-> [DBusCallFlags]
-> Int32
-> Maybe b
-> Maybe c
-> m (GVariant, Maybe UnixFDList)
dBusConnectionCallWithUnixFdListSync
instance O.OverloadedMethodInfo DBusConnectionCallWithUnixFdListSyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCallWithUnixFdListSync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCallWithUnixFdListSync"
})
#endif
foreign import ccall "g_dbus_connection_close" g_dbus_connection_close ::
Ptr DBusConnection ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionClose ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionClose :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
dBusConnectionClose a
connection 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
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_connection_close connection' maybeCancellable maybeCallback userData
touchManagedPtr connection
whenJust cancellable touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCloseMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionCloseMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
dBusConnectionClose
instance O.OverloadedMethodInfo DBusConnectionCloseMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionClose",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionClose"
})
#endif
foreign import ccall "g_dbus_connection_close_finish" g_dbus_connection_close_finish ::
Ptr DBusConnection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionCloseFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
dBusConnectionCloseFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m ()
dBusConnectionCloseFinish a
connection b
res = 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
res' <- unsafeManagedPtrCastPtr res
onException (do
_ <- propagateGError $ g_dbus_connection_close_finish connection' res'
touchManagedPtr connection
touchManagedPtr res
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCloseFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusConnectionCloseFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m ()
dBusConnectionCloseFinish
instance O.OverloadedMethodInfo DBusConnectionCloseFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCloseFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCloseFinish"
})
#endif
foreign import ccall "g_dbus_connection_close_sync" g_dbus_connection_close_sync ::
Ptr DBusConnection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionCloseSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
dBusConnectionCloseSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
dBusConnectionCloseSync a
connection Maybe b
cancellable = 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
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
_ <- propagateGError $ g_dbus_connection_close_sync connection' maybeCancellable
touchManagedPtr connection
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionCloseSyncMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionCloseSyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
dBusConnectionCloseSync
instance O.OverloadedMethodInfo DBusConnectionCloseSyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionCloseSync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionCloseSync"
})
#endif
foreign import ccall "g_dbus_connection_emit_signal" g_dbus_connection_emit_signal ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
Ptr GVariant ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionEmitSignal ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Maybe (T.Text)
-> T.Text
-> T.Text
-> T.Text
-> Maybe (GVariant)
-> m ()
dBusConnectionEmitSignal :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> m ()
dBusConnectionEmitSignal a
connection Maybe Text
destinationBusName Text
objectPath Text
interfaceName Text
signalName Maybe GVariant
parameters = IO () -> m ()
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
maybeDestinationBusName <- case destinationBusName 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
jDestinationBusName -> do
jDestinationBusName' <- Text -> IO CString
textToCString Text
jDestinationBusName
return jDestinationBusName'
objectPath' <- textToCString objectPath
interfaceName' <- textToCString interfaceName
signalName' <- textToCString signalName
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'
onException (do
_ <- propagateGError $ g_dbus_connection_emit_signal connection' maybeDestinationBusName objectPath' interfaceName' signalName' maybeParameters
touchManagedPtr connection
whenJust parameters touchManagedPtr
freeMem maybeDestinationBusName
freeMem objectPath'
freeMem interfaceName'
freeMem signalName'
return ()
) (do
freeMem maybeDestinationBusName
freeMem objectPath'
freeMem interfaceName'
freeMem signalName'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionEmitSignalMethodInfo
instance (signature ~ (Maybe (T.Text) -> T.Text -> T.Text -> T.Text -> Maybe (GVariant) -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionEmitSignalMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Maybe Text -> Text -> Text -> Text -> Maybe GVariant -> m ()
dBusConnectionEmitSignal
instance O.OverloadedMethodInfo DBusConnectionEmitSignalMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionEmitSignal",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionEmitSignal"
})
#endif
foreign import ccall "g_dbus_connection_export_action_group" g_dbus_connection_export_action_group ::
Ptr DBusConnection ->
CString ->
Ptr Gio.ActionGroup.ActionGroup ->
Ptr (Ptr GError) ->
IO Word32
dBusConnectionExportActionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.ActionGroup.IsActionGroup b) =>
a
-> T.Text
-> b
-> m Word32
dBusConnectionExportActionGroup :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsActionGroup b) =>
a -> Text -> b -> m Word32
dBusConnectionExportActionGroup a
connection Text
objectPath b
actionGroup = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
objectPath' <- textToCString objectPath
actionGroup' <- unsafeManagedPtrCastPtr actionGroup
onException (do
result <- propagateGError $ g_dbus_connection_export_action_group connection' objectPath' actionGroup'
touchManagedPtr connection
touchManagedPtr actionGroup
freeMem objectPath'
return result
) (do
freeMem objectPath'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionExportActionGroupMethodInfo
instance (signature ~ (T.Text -> b -> m Word32), MonadIO m, IsDBusConnection a, Gio.ActionGroup.IsActionGroup b) => O.OverloadedMethod DBusConnectionExportActionGroupMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Text -> b -> m Word32
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsActionGroup b) =>
a -> Text -> b -> m Word32
dBusConnectionExportActionGroup
instance O.OverloadedMethodInfo DBusConnectionExportActionGroupMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionExportActionGroup",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionExportActionGroup"
})
#endif
foreign import ccall "g_dbus_connection_export_menu_model" ::
Ptr DBusConnection ->
CString ->
Ptr Gio.MenuModel.MenuModel ->
Ptr (Ptr GError) ->
IO Word32
dBusConnectionExportMenuModel ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.MenuModel.IsMenuModel b) =>
a
-> T.Text
-> b
-> m Word32
a
connection Text
objectPath b
menu = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
objectPath' <- textToCString objectPath
menu' <- unsafeManagedPtrCastPtr menu
onException (do
result <- propagateGError $ g_dbus_connection_export_menu_model connection' objectPath' menu'
touchManagedPtr connection
touchManagedPtr menu
freeMem objectPath'
return result
) (do
freeMem objectPath'
)
#if defined(ENABLE_OVERLOADING)
data
instance (signature ~ (T.Text -> b -> m Word32), MonadIO m, IsDBusConnection a, Gio.MenuModel.IsMenuModel b) => O.OverloadedMethod DBusConnectionExportMenuModelMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Text -> b -> m Word32
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsMenuModel b) =>
a -> Text -> b -> m Word32
dBusConnectionExportMenuModel
instance O.OverloadedMethodInfo DBusConnectionExportMenuModelMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionExportMenuModel",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionExportMenuModel"
})
#endif
foreign import ccall "g_dbus_connection_flush" g_dbus_connection_flush ::
Ptr DBusConnection ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionFlush ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionFlush :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
dBusConnectionFlush a
connection 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
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_connection_flush connection' maybeCancellable maybeCallback userData
touchManagedPtr connection
whenJust cancellable touchManagedPtr
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionFlushMethodInfo
instance (signature ~ (Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionFlushMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
dBusConnectionFlush
instance O.OverloadedMethodInfo DBusConnectionFlushMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionFlush",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionFlush"
})
#endif
foreign import ccall "g_dbus_connection_flush_finish" g_dbus_connection_flush_finish ::
Ptr DBusConnection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionFlushFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m ()
dBusConnectionFlushFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m ()
dBusConnectionFlushFinish a
connection b
res = 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
res' <- unsafeManagedPtrCastPtr res
onException (do
_ <- propagateGError $ g_dbus_connection_flush_finish connection' res'
touchManagedPtr connection
touchManagedPtr res
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionFlushFinishMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusConnectionFlushFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m ()
dBusConnectionFlushFinish
instance O.OverloadedMethodInfo DBusConnectionFlushFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionFlushFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionFlushFinish"
})
#endif
foreign import ccall "g_dbus_connection_flush_sync" g_dbus_connection_flush_sync ::
Ptr DBusConnection ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionFlushSync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) =>
a
-> Maybe (b)
-> m ()
dBusConnectionFlushSync :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
dBusConnectionFlushSync a
connection Maybe b
cancellable = 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
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
_ <- propagateGError $ g_dbus_connection_flush_sync connection' maybeCancellable
touchManagedPtr connection
whenJust cancellable touchManagedPtr
return ()
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionFlushSyncMethodInfo
instance (signature ~ (Maybe (b) -> m ()), MonadIO m, IsDBusConnection a, Gio.Cancellable.IsCancellable b) => O.OverloadedMethod DBusConnectionFlushSyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Maybe b -> m ()
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsCancellable b) =>
a -> Maybe b -> m ()
dBusConnectionFlushSync
instance O.OverloadedMethodInfo DBusConnectionFlushSyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionFlushSync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionFlushSync"
})
#endif
foreign import ccall "g_dbus_connection_get_capabilities" g_dbus_connection_get_capabilities ::
Ptr DBusConnection ->
IO CUInt
dBusConnectionGetCapabilities ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m [Gio.Flags.DBusCapabilityFlags]
dBusConnectionGetCapabilities :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m [DBusCapabilityFlags]
dBusConnectionGetCapabilities a
connection = IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags])
-> IO [DBusCapabilityFlags] -> m [DBusCapabilityFlags]
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
result <- g_dbus_connection_get_capabilities connection'
let result' = CUInt -> [DBusCapabilityFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetCapabilitiesMethodInfo
instance (signature ~ (m [Gio.Flags.DBusCapabilityFlags]), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetCapabilitiesMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m [DBusCapabilityFlags]
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m [DBusCapabilityFlags]
dBusConnectionGetCapabilities
instance O.OverloadedMethodInfo DBusConnectionGetCapabilitiesMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetCapabilities",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetCapabilities"
})
#endif
foreign import ccall "g_dbus_connection_get_exit_on_close" g_dbus_connection_get_exit_on_close ::
Ptr DBusConnection ->
IO CInt
dBusConnectionGetExitOnClose ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m Bool
dBusConnectionGetExitOnClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Bool
dBusConnectionGetExitOnClose a
connection = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
result <- g_dbus_connection_get_exit_on_close connection'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetExitOnCloseMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetExitOnCloseMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Bool
dBusConnectionGetExitOnClose
instance O.OverloadedMethodInfo DBusConnectionGetExitOnCloseMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetExitOnClose",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetExitOnClose"
})
#endif
foreign import ccall "g_dbus_connection_get_flags" g_dbus_connection_get_flags ::
Ptr DBusConnection ->
IO CUInt
dBusConnectionGetFlags ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m [Gio.Flags.DBusConnectionFlags]
dBusConnectionGetFlags :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m [DBusConnectionFlags]
dBusConnectionGetFlags a
connection = IO [DBusConnectionFlags] -> m [DBusConnectionFlags]
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [DBusConnectionFlags] -> m [DBusConnectionFlags])
-> IO [DBusConnectionFlags] -> m [DBusConnectionFlags]
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
result <- g_dbus_connection_get_flags connection'
let result' = CUInt -> [DBusConnectionFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetFlagsMethodInfo
instance (signature ~ (m [Gio.Flags.DBusConnectionFlags]), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetFlagsMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m [DBusConnectionFlags]
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m [DBusConnectionFlags]
dBusConnectionGetFlags
instance O.OverloadedMethodInfo DBusConnectionGetFlagsMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetFlags",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetFlags"
})
#endif
foreign import ccall "g_dbus_connection_get_guid" g_dbus_connection_get_guid ::
Ptr DBusConnection ->
IO CString
dBusConnectionGetGuid ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m T.Text
dBusConnectionGetGuid :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Text
dBusConnectionGetGuid a
connection = 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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
result <- g_dbus_connection_get_guid connection'
checkUnexpectedReturnNULL "dBusConnectionGetGuid" result
result' <- cstringToText result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetGuidMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetGuidMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Text
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Text
dBusConnectionGetGuid
instance O.OverloadedMethodInfo DBusConnectionGetGuidMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetGuid",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetGuid"
})
#endif
foreign import ccall "g_dbus_connection_get_last_serial" g_dbus_connection_get_last_serial ::
Ptr DBusConnection ->
IO Word32
dBusConnectionGetLastSerial ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m Word32
dBusConnectionGetLastSerial :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Word32
dBusConnectionGetLastSerial a
connection = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
result <- g_dbus_connection_get_last_serial connection'
touchManagedPtr connection
return result
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetLastSerialMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetLastSerialMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Word32
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Word32
dBusConnectionGetLastSerial
instance O.OverloadedMethodInfo DBusConnectionGetLastSerialMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetLastSerial",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetLastSerial"
})
#endif
foreign import ccall "g_dbus_connection_get_peer_credentials" g_dbus_connection_get_peer_credentials ::
Ptr DBusConnection ->
IO (Ptr Gio.Credentials.Credentials)
dBusConnectionGetPeerCredentials ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m (Maybe Gio.Credentials.Credentials)
dBusConnectionGetPeerCredentials :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m (Maybe Credentials)
dBusConnectionGetPeerCredentials a
connection = IO (Maybe Credentials) -> m (Maybe Credentials)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Credentials) -> m (Maybe Credentials))
-> IO (Maybe Credentials) -> m (Maybe Credentials)
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
result <- g_dbus_connection_get_peer_credentials connection'
maybeResult <- convertIfNonNull result $ \Ptr Credentials
result' -> do
result'' <- ((ManagedPtr Credentials -> Credentials)
-> Ptr Credentials -> IO Credentials
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr Credentials -> Credentials
Gio.Credentials.Credentials) Ptr Credentials
result'
return result''
touchManagedPtr connection
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetPeerCredentialsMethodInfo
instance (signature ~ (m (Maybe Gio.Credentials.Credentials)), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetPeerCredentialsMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe Credentials)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m (Maybe Credentials)
dBusConnectionGetPeerCredentials
instance O.OverloadedMethodInfo DBusConnectionGetPeerCredentialsMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetPeerCredentials",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetPeerCredentials"
})
#endif
foreign import ccall "g_dbus_connection_get_stream" g_dbus_connection_get_stream ::
Ptr DBusConnection ->
IO (Ptr Gio.IOStream.IOStream)
dBusConnectionGetStream ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m Gio.IOStream.IOStream
dBusConnectionGetStream :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m IOStream
dBusConnectionGetStream a
connection = IO IOStream -> m IOStream
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO IOStream -> m IOStream) -> IO IOStream -> m IOStream
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
result <- g_dbus_connection_get_stream connection'
checkUnexpectedReturnNULL "dBusConnectionGetStream" result
result' <- (newObject Gio.IOStream.IOStream) result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetStreamMethodInfo
instance (signature ~ (m Gio.IOStream.IOStream), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetStreamMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m IOStream
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m IOStream
dBusConnectionGetStream
instance O.OverloadedMethodInfo DBusConnectionGetStreamMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetStream",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetStream"
})
#endif
foreign import ccall "g_dbus_connection_get_unique_name" g_dbus_connection_get_unique_name ::
Ptr DBusConnection ->
IO CString
dBusConnectionGetUniqueName ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m (Maybe T.Text)
dBusConnectionGetUniqueName :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m (Maybe Text)
dBusConnectionGetUniqueName a
connection = 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
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
result <- g_dbus_connection_get_unique_name connection'
maybeResult <- convertIfNonNull result $ \CString
result' -> do
result'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result'
return result''
touchManagedPtr connection
return maybeResult
#if defined(ENABLE_OVERLOADING)
data DBusConnectionGetUniqueNameMethodInfo
instance (signature ~ (m (Maybe T.Text)), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionGetUniqueNameMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m (Maybe Text)
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m (Maybe Text)
dBusConnectionGetUniqueName
instance O.OverloadedMethodInfo DBusConnectionGetUniqueNameMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionGetUniqueName",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionGetUniqueName"
})
#endif
foreign import ccall "g_dbus_connection_is_closed" g_dbus_connection_is_closed ::
Ptr DBusConnection ->
IO CInt
dBusConnectionIsClosed ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m Bool
dBusConnectionIsClosed :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Bool
dBusConnectionIsClosed a
connection = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
result <- g_dbus_connection_is_closed connection'
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionIsClosedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionIsClosedMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m Bool
dBusConnectionIsClosed
instance O.OverloadedMethodInfo DBusConnectionIsClosedMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionIsClosed",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionIsClosed"
})
#endif
foreign import ccall "g_dbus_connection_register_object_with_closures" g_dbus_connection_register_object_with_closures ::
Ptr DBusConnection ->
CString ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
Ptr (GClosure ()) ->
Ptr (GClosure ()) ->
Ptr (GClosure ()) ->
Ptr (Ptr GError) ->
IO Word32
{-# DEPRECATED dBusConnectionRegisterObject ["(Since version 2.84)","Deprecated in favour of"," 'GI.Gio.Objects.DBusConnection.dBusConnectionRegisterObjectWithClosures2', which has more"," binding-friendly reference counting semantics."] #-}
dBusConnectionRegisterObject ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> T.Text
-> Gio.DBusInterfaceInfo.DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObject :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObject a
connection Text
objectPath DBusInterfaceInfo
interfaceInfo Maybe (GClosure b)
methodCallClosure Maybe (GClosure c)
getPropertyClosure Maybe (GClosure d)
setPropertyClosure = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
objectPath' <- textToCString objectPath
interfaceInfo' <- unsafeManagedPtrGetPtr interfaceInfo
maybeMethodCallClosure <- case methodCallClosure of
Maybe (GClosure b)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure b
jMethodCallClosure -> do
jMethodCallClosure' <- GClosure b -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure b
jMethodCallClosure
return jMethodCallClosure'
maybeGetPropertyClosure <- case getPropertyClosure of
Maybe (GClosure c)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure c
jGetPropertyClosure -> do
jGetPropertyClosure' <- GClosure c -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure c
jGetPropertyClosure
return jGetPropertyClosure'
maybeSetPropertyClosure <- case setPropertyClosure of
Maybe (GClosure d)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure d
jSetPropertyClosure -> do
jSetPropertyClosure' <- GClosure d -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure d
jSetPropertyClosure
return jSetPropertyClosure'
onException (do
result <- propagateGError $ g_dbus_connection_register_object_with_closures connection' objectPath' interfaceInfo' maybeMethodCallClosure maybeGetPropertyClosure maybeSetPropertyClosure
touchManagedPtr connection
touchManagedPtr interfaceInfo
whenJust methodCallClosure touchManagedPtr
whenJust getPropertyClosure touchManagedPtr
whenJust setPropertyClosure touchManagedPtr
freeMem objectPath'
return result
) (do
freeMem objectPath'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionRegisterObjectMethodInfo
instance (signature ~ (T.Text -> Gio.DBusInterfaceInfo.DBusInterfaceInfo -> Maybe (GClosure b) -> Maybe (GClosure c) -> Maybe (GClosure d) -> m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionRegisterObjectMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObject
instance O.OverloadedMethodInfo DBusConnectionRegisterObjectMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionRegisterObject",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionRegisterObject"
})
#endif
foreign import ccall "g_dbus_connection_register_object_with_closures2" g_dbus_connection_register_object_with_closures2 ::
Ptr DBusConnection ->
CString ->
Ptr Gio.DBusInterfaceInfo.DBusInterfaceInfo ->
Ptr (GClosure ()) ->
Ptr (GClosure ()) ->
Ptr (GClosure ()) ->
Ptr (Ptr GError) ->
IO Word32
dBusConnectionRegisterObjectWithClosures2 ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> T.Text
-> Gio.DBusInterfaceInfo.DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObjectWithClosures2 :: forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObjectWithClosures2 a
connection Text
objectPath DBusInterfaceInfo
interfaceInfo Maybe (GClosure b)
methodCallClosure Maybe (GClosure c)
getPropertyClosure Maybe (GClosure d)
setPropertyClosure = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
objectPath' <- textToCString objectPath
interfaceInfo' <- unsafeManagedPtrGetPtr interfaceInfo
maybeMethodCallClosure <- case methodCallClosure of
Maybe (GClosure b)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure b
jMethodCallClosure -> do
jMethodCallClosure' <- GClosure b -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure b
jMethodCallClosure
return jMethodCallClosure'
maybeGetPropertyClosure <- case getPropertyClosure of
Maybe (GClosure c)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure c
jGetPropertyClosure -> do
jGetPropertyClosure' <- GClosure c -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure c
jGetPropertyClosure
return jGetPropertyClosure'
maybeSetPropertyClosure <- case setPropertyClosure of
Maybe (GClosure d)
Nothing -> Ptr (GClosure ()) -> IO (Ptr (GClosure ()))
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr (GClosure ())
forall a. Ptr a
FP.nullPtr
Just GClosure d
jSetPropertyClosure -> do
jSetPropertyClosure' <- GClosure d -> IO (Ptr (GClosure ()))
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr GClosure d
jSetPropertyClosure
return jSetPropertyClosure'
onException (do
result <- propagateGError $ g_dbus_connection_register_object_with_closures2 connection' objectPath' interfaceInfo' maybeMethodCallClosure maybeGetPropertyClosure maybeSetPropertyClosure
touchManagedPtr connection
touchManagedPtr interfaceInfo
whenJust methodCallClosure touchManagedPtr
whenJust getPropertyClosure touchManagedPtr
whenJust setPropertyClosure touchManagedPtr
freeMem objectPath'
return result
) (do
freeMem objectPath'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionRegisterObjectWithClosures2MethodInfo
instance (signature ~ (T.Text -> Gio.DBusInterfaceInfo.DBusInterfaceInfo -> Maybe (GClosure b) -> Maybe (GClosure c) -> Maybe (GClosure d) -> m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionRegisterObjectWithClosures2MethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
forall (m :: * -> *) a b c d.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusInterfaceInfo
-> Maybe (GClosure b)
-> Maybe (GClosure c)
-> Maybe (GClosure d)
-> m Word32
dBusConnectionRegisterObjectWithClosures2
instance O.OverloadedMethodInfo DBusConnectionRegisterObjectWithClosures2MethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionRegisterObjectWithClosures2",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionRegisterObjectWithClosures2"
})
#endif
foreign import ccall "g_dbus_connection_register_subtree" g_dbus_connection_register_subtree ::
Ptr DBusConnection ->
CString ->
Ptr Gio.DBusSubtreeVTable.DBusSubtreeVTable ->
CUInt ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
Ptr (Ptr GError) ->
IO Word32
dBusConnectionRegisterSubtree ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> T.Text
-> Gio.DBusSubtreeVTable.DBusSubtreeVTable
-> [Gio.Flags.DBusSubtreeFlags]
-> Ptr ()
-> GLib.Callbacks.DestroyNotify
-> m Word32
dBusConnectionRegisterSubtree :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusSubtreeVTable
-> [DBusSubtreeFlags]
-> Ptr ()
-> C_DestroyNotify
-> m Word32
dBusConnectionRegisterSubtree a
connection Text
objectPath DBusSubtreeVTable
vtable [DBusSubtreeFlags]
flags Ptr ()
userData C_DestroyNotify
userDataFreeFunc = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
objectPath' <- textToCString objectPath
vtable' <- unsafeManagedPtrGetPtr vtable
let flags' = [DBusSubtreeFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusSubtreeFlags]
flags
ptruserDataFreeFunc <- callocMem :: IO (Ptr (FunPtr GLib.Callbacks.C_DestroyNotify))
userDataFreeFunc' <- GLib.Callbacks.mk_DestroyNotify (GLib.Callbacks.wrap_DestroyNotify (Just ptruserDataFreeFunc) userDataFreeFunc)
poke ptruserDataFreeFunc userDataFreeFunc'
onException (do
result <- propagateGError $ g_dbus_connection_register_subtree connection' objectPath' vtable' flags' userData userDataFreeFunc'
touchManagedPtr connection
touchManagedPtr vtable
freeMem objectPath'
return result
) (do
freeMem objectPath'
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionRegisterSubtreeMethodInfo
instance (signature ~ (T.Text -> Gio.DBusSubtreeVTable.DBusSubtreeVTable -> [Gio.Flags.DBusSubtreeFlags] -> Ptr () -> GLib.Callbacks.DestroyNotify -> m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionRegisterSubtreeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Text
-> DBusSubtreeVTable
-> [DBusSubtreeFlags]
-> Ptr ()
-> C_DestroyNotify
-> m Word32
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Text
-> DBusSubtreeVTable
-> [DBusSubtreeFlags]
-> Ptr ()
-> C_DestroyNotify
-> m Word32
dBusConnectionRegisterSubtree
instance O.OverloadedMethodInfo DBusConnectionRegisterSubtreeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionRegisterSubtree",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionRegisterSubtree"
})
#endif
foreign import ccall "g_dbus_connection_remove_filter" g_dbus_connection_remove_filter ::
Ptr DBusConnection ->
Word32 ->
IO ()
dBusConnectionRemoveFilter ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m ()
dBusConnectionRemoveFilter :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionRemoveFilter a
connection Word32
filterId = 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
g_dbus_connection_remove_filter connection' filterId
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionRemoveFilterMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionRemoveFilterMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionRemoveFilter
instance O.OverloadedMethodInfo DBusConnectionRemoveFilterMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionRemoveFilter",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionRemoveFilter"
})
#endif
foreign import ccall "g_dbus_connection_send_message" g_dbus_connection_send_message ::
Ptr DBusConnection ->
Ptr Gio.DBusMessage.DBusMessage ->
CUInt ->
Ptr Word32 ->
Ptr (Ptr GError) ->
IO CInt
dBusConnectionSendMessage ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b) =>
a
-> b
-> [Gio.Flags.DBusSendMessageFlags]
-> m (Word32)
dBusConnectionSendMessage :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) =>
a -> b -> [DBusSendMessageFlags] -> m Word32
dBusConnectionSendMessage a
connection b
message [DBusSendMessageFlags]
flags = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
message' <- unsafeManagedPtrCastPtr message
let flags' = [DBusSendMessageFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusSendMessageFlags]
flags
outSerial <- allocMem :: IO (Ptr Word32)
onException (do
_ <- propagateGError $ g_dbus_connection_send_message connection' message' flags' outSerial
outSerial' <- peek outSerial
touchManagedPtr connection
touchManagedPtr message
freeMem outSerial
return outSerial'
) (do
freeMem outSerial
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSendMessageMethodInfo
instance (signature ~ (b -> [Gio.Flags.DBusSendMessageFlags] -> m (Word32)), MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b) => O.OverloadedMethod DBusConnectionSendMessageMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> [DBusSendMessageFlags] -> m Word32
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b) =>
a -> b -> [DBusSendMessageFlags] -> m Word32
dBusConnectionSendMessage
instance O.OverloadedMethodInfo DBusConnectionSendMessageMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSendMessage",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSendMessage"
})
#endif
foreign import ccall "g_dbus_connection_send_message_with_reply" g_dbus_connection_send_message_with_reply ::
Ptr DBusConnection ->
Ptr Gio.DBusMessage.DBusMessage ->
CUInt ->
Int32 ->
Ptr Word32 ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionSendMessageWithReply ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> [Gio.Flags.DBusSendMessageFlags]
-> Int32
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m (Word32)
dBusConnectionSendMessageWithReply :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b,
IsCancellable c) =>
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> Maybe AsyncReadyCallback
-> m Word32
dBusConnectionSendMessageWithReply a
connection b
message [DBusSendMessageFlags]
flags Int32
timeoutMsec Maybe c
cancellable Maybe AsyncReadyCallback
callback = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
message' <- unsafeManagedPtrCastPtr message
let flags' = [DBusSendMessageFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusSendMessageFlags]
flags
outSerial <- allocMem :: IO (Ptr Word32)
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_connection_send_message_with_reply connection' message' flags' timeoutMsec outSerial maybeCancellable maybeCallback userData
outSerial' <- peek outSerial
touchManagedPtr connection
touchManagedPtr message
whenJust cancellable touchManagedPtr
freeMem outSerial
return outSerial'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSendMessageWithReplyMethodInfo
instance (signature ~ (b -> [Gio.Flags.DBusSendMessageFlags] -> Int32 -> Maybe (c) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m (Word32)), MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusConnectionSendMessageWithReplyMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> Maybe AsyncReadyCallback
-> m Word32
forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b,
IsCancellable c) =>
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> Maybe AsyncReadyCallback
-> m Word32
dBusConnectionSendMessageWithReply
instance O.OverloadedMethodInfo DBusConnectionSendMessageWithReplyMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSendMessageWithReply",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSendMessageWithReply"
})
#endif
foreign import ccall "g_dbus_connection_send_message_with_reply_finish" g_dbus_connection_send_message_with_reply_finish ::
Ptr DBusConnection ->
Ptr Gio.AsyncResult.AsyncResult ->
Ptr (Ptr GError) ->
IO (Ptr Gio.DBusMessage.DBusMessage)
dBusConnectionSendMessageWithReplyFinish ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) =>
a
-> b
-> m Gio.DBusMessage.DBusMessage
dBusConnectionSendMessageWithReplyFinish :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m DBusMessage
dBusConnectionSendMessageWithReplyFinish a
connection b
res = IO DBusMessage -> m DBusMessage
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO DBusMessage -> m DBusMessage)
-> IO DBusMessage -> m DBusMessage
forall a b. (a -> b) -> a -> b
$ do
connection' <- a -> IO (Ptr DBusConnection)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
connection
res' <- unsafeManagedPtrCastPtr res
onException (do
result <- propagateGError $ g_dbus_connection_send_message_with_reply_finish connection' res'
checkUnexpectedReturnNULL "dBusConnectionSendMessageWithReplyFinish" result
result' <- (wrapObject Gio.DBusMessage.DBusMessage) result
touchManagedPtr connection
touchManagedPtr res
return result'
) (do
return ()
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSendMessageWithReplyFinishMethodInfo
instance (signature ~ (b -> m Gio.DBusMessage.DBusMessage), MonadIO m, IsDBusConnection a, Gio.AsyncResult.IsAsyncResult b) => O.OverloadedMethod DBusConnectionSendMessageWithReplyFinishMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> b -> m DBusMessage
forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusConnection a, IsAsyncResult b) =>
a -> b -> m DBusMessage
dBusConnectionSendMessageWithReplyFinish
instance O.OverloadedMethodInfo DBusConnectionSendMessageWithReplyFinishMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSendMessageWithReplyFinish",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSendMessageWithReplyFinish"
})
#endif
foreign import ccall "g_dbus_connection_send_message_with_reply_sync" g_dbus_connection_send_message_with_reply_sync ::
Ptr DBusConnection ->
Ptr Gio.DBusMessage.DBusMessage ->
CUInt ->
Int32 ->
Ptr Word32 ->
Ptr Gio.Cancellable.Cancellable ->
Ptr (Ptr GError) ->
IO (Ptr Gio.DBusMessage.DBusMessage)
dBusConnectionSendMessageWithReplySync ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b, Gio.Cancellable.IsCancellable c) =>
a
-> b
-> [Gio.Flags.DBusSendMessageFlags]
-> Int32
-> Maybe (c)
-> m ((Gio.DBusMessage.DBusMessage, Word32))
dBusConnectionSendMessageWithReplySync :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b,
IsCancellable c) =>
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> m (DBusMessage, Word32)
dBusConnectionSendMessageWithReplySync a
connection b
message [DBusSendMessageFlags]
flags Int32
timeoutMsec Maybe c
cancellable = IO (DBusMessage, Word32) -> m (DBusMessage, Word32)
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (DBusMessage, Word32) -> m (DBusMessage, Word32))
-> IO (DBusMessage, Word32) -> m (DBusMessage, Word32)
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
message' <- unsafeManagedPtrCastPtr message
let flags' = [DBusSendMessageFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusSendMessageFlags]
flags
outSerial <- allocMem :: IO (Ptr Word32)
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_connection_send_message_with_reply_sync connection' message' flags' timeoutMsec outSerial maybeCancellable
checkUnexpectedReturnNULL "dBusConnectionSendMessageWithReplySync" result
result' <- (wrapObject Gio.DBusMessage.DBusMessage) result
outSerial' <- peek outSerial
touchManagedPtr connection
touchManagedPtr message
whenJust cancellable touchManagedPtr
freeMem outSerial
return (result', outSerial')
) (do
freeMem outSerial
)
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSendMessageWithReplySyncMethodInfo
instance (signature ~ (b -> [Gio.Flags.DBusSendMessageFlags] -> Int32 -> Maybe (c) -> m ((Gio.DBusMessage.DBusMessage, Word32))), MonadIO m, IsDBusConnection a, Gio.DBusMessage.IsDBusMessage b, Gio.Cancellable.IsCancellable c) => O.OverloadedMethod DBusConnectionSendMessageWithReplySyncMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> m (DBusMessage, Word32)
forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsDBusConnection a, IsDBusMessage b,
IsCancellable c) =>
a
-> b
-> [DBusSendMessageFlags]
-> Int32
-> Maybe c
-> m (DBusMessage, Word32)
dBusConnectionSendMessageWithReplySync
instance O.OverloadedMethodInfo DBusConnectionSendMessageWithReplySyncMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSendMessageWithReplySync",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSendMessageWithReplySync"
})
#endif
foreign import ccall "g_dbus_connection_set_exit_on_close" g_dbus_connection_set_exit_on_close ::
Ptr DBusConnection ->
CInt ->
IO ()
dBusConnectionSetExitOnClose ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Bool
-> m ()
dBusConnectionSetExitOnClose :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Bool -> m ()
dBusConnectionSetExitOnClose a
connection Bool
exitOnClose = 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 exitOnClose' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
P.fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
P.fromEnum) Bool
exitOnClose
g_dbus_connection_set_exit_on_close connection' exitOnClose'
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSetExitOnCloseMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionSetExitOnCloseMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Bool -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Bool -> m ()
dBusConnectionSetExitOnClose
instance O.OverloadedMethodInfo DBusConnectionSetExitOnCloseMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSetExitOnClose",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSetExitOnClose"
})
#endif
foreign import ccall "g_dbus_connection_signal_subscribe" g_dbus_connection_signal_subscribe ::
Ptr DBusConnection ->
CString ->
CString ->
CString ->
CString ->
CString ->
CUInt ->
FunPtr Gio.Callbacks.C_DBusSignalCallback ->
Ptr () ->
FunPtr GLib.Callbacks.C_DestroyNotify ->
IO Word32
dBusConnectionSignalSubscribe ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> Maybe (T.Text)
-> [Gio.Flags.DBusSignalFlags]
-> Gio.Callbacks.DBusSignalCallback
-> m Word32
dBusConnectionSignalSubscribe :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> [DBusSignalFlags]
-> DBusSignalCallback
-> m Word32
dBusConnectionSignalSubscribe a
connection Maybe Text
sender Maybe Text
interfaceName Maybe Text
member Maybe Text
objectPath Maybe Text
arg0 [DBusSignalFlags]
flags DBusSignalCallback
callback = IO Word32 -> m Word32
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32
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
maybeSender <- case sender 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
jSender -> do
jSender' <- Text -> IO CString
textToCString Text
jSender
return jSender'
maybeInterfaceName <- case interfaceName 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
jInterfaceName -> do
jInterfaceName' <- Text -> IO CString
textToCString Text
jInterfaceName
return jInterfaceName'
maybeMember <- case member 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
jMember -> do
jMember' <- Text -> IO CString
textToCString Text
jMember
return jMember'
maybeObjectPath <- case objectPath 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
jObjectPath -> do
jObjectPath' <- Text -> IO CString
textToCString Text
jObjectPath
return jObjectPath'
maybeArg0 <- case arg0 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
jArg0 -> do
jArg0' <- Text -> IO CString
textToCString Text
jArg0
return jArg0'
let flags' = [DBusSignalFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusSignalFlags]
flags
callback' <- Gio.Callbacks.mk_DBusSignalCallback (Gio.Callbacks.wrap_DBusSignalCallback Nothing (Gio.Callbacks.drop_closures_DBusSignalCallback callback))
let userData = FunPtr C_DBusSignalCallback -> Ptr ()
forall a b. FunPtr a -> Ptr b
castFunPtrToPtr FunPtr C_DBusSignalCallback
callback'
let userDataFreeFunc = FunPtr (Ptr a -> IO ())
forall a. FunPtr (Ptr a -> IO ())
SP.safeFreeFunPtrPtr
result <- g_dbus_connection_signal_subscribe connection' maybeSender maybeInterfaceName maybeMember maybeObjectPath maybeArg0 flags' callback' userData userDataFreeFunc
touchManagedPtr connection
freeMem maybeSender
freeMem maybeInterfaceName
freeMem maybeMember
freeMem maybeObjectPath
freeMem maybeArg0
return result
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSignalSubscribeMethodInfo
instance (signature ~ (Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> Maybe (T.Text) -> [Gio.Flags.DBusSignalFlags] -> Gio.Callbacks.DBusSignalCallback -> m Word32), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionSignalSubscribeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> [DBusSignalFlags]
-> DBusSignalCallback
-> m Word32
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> Maybe Text
-> [DBusSignalFlags]
-> DBusSignalCallback
-> m Word32
dBusConnectionSignalSubscribe
instance O.OverloadedMethodInfo DBusConnectionSignalSubscribeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSignalSubscribe",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSignalSubscribe"
})
#endif
foreign import ccall "g_dbus_connection_signal_unsubscribe" g_dbus_connection_signal_unsubscribe ::
Ptr DBusConnection ->
Word32 ->
IO ()
dBusConnectionSignalUnsubscribe ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m ()
dBusConnectionSignalUnsubscribe :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionSignalUnsubscribe a
connection Word32
subscriptionId = 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
g_dbus_connection_signal_unsubscribe connection' subscriptionId
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionSignalUnsubscribeMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionSignalUnsubscribeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionSignalUnsubscribe
instance O.OverloadedMethodInfo DBusConnectionSignalUnsubscribeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionSignalUnsubscribe",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionSignalUnsubscribe"
})
#endif
foreign import ccall "g_dbus_connection_start_message_processing" g_dbus_connection_start_message_processing ::
Ptr DBusConnection ->
IO ()
dBusConnectionStartMessageProcessing ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> m ()
dBusConnectionStartMessageProcessing :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m ()
dBusConnectionStartMessageProcessing a
connection = 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
g_dbus_connection_start_message_processing connection'
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionStartMessageProcessingMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionStartMessageProcessingMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> m ()
dBusConnectionStartMessageProcessing
instance O.OverloadedMethodInfo DBusConnectionStartMessageProcessingMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionStartMessageProcessing",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionStartMessageProcessing"
})
#endif
foreign import ccall "g_dbus_connection_unexport_action_group" g_dbus_connection_unexport_action_group ::
Ptr DBusConnection ->
Word32 ->
IO ()
dBusConnectionUnexportActionGroup ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m ()
dBusConnectionUnexportActionGroup :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionUnexportActionGroup a
connection Word32
exportId = 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
g_dbus_connection_unexport_action_group connection' exportId
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data DBusConnectionUnexportActionGroupMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionUnexportActionGroupMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionUnexportActionGroup
instance O.OverloadedMethodInfo DBusConnectionUnexportActionGroupMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionUnexportActionGroup",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionUnexportActionGroup"
})
#endif
foreign import ccall "g_dbus_connection_unexport_menu_model" ::
Ptr DBusConnection ->
Word32 ->
IO ()
dBusConnectionUnexportMenuModel ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m ()
a
connection Word32
exportId = 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
g_dbus_connection_unexport_menu_model connection' exportId
touchManagedPtr connection
return ()
#if defined(ENABLE_OVERLOADING)
data
instance (signature ~ (Word32 -> m ()), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionUnexportMenuModelMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m ()
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m ()
dBusConnectionUnexportMenuModel
instance O.OverloadedMethodInfo DBusConnectionUnexportMenuModelMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionUnexportMenuModel",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionUnexportMenuModel"
})
#endif
foreign import ccall "g_dbus_connection_unregister_object" g_dbus_connection_unregister_object ::
Ptr DBusConnection ->
Word32 ->
IO CInt
dBusConnectionUnregisterObject ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m Bool
dBusConnectionUnregisterObject :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m Bool
dBusConnectionUnregisterObject a
connection Word32
registrationId = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
result <- g_dbus_connection_unregister_object connection' registrationId
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionUnregisterObjectMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionUnregisterObjectMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m Bool
dBusConnectionUnregisterObject
instance O.OverloadedMethodInfo DBusConnectionUnregisterObjectMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionUnregisterObject",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionUnregisterObject"
})
#endif
foreign import ccall "g_dbus_connection_unregister_subtree" g_dbus_connection_unregister_subtree ::
Ptr DBusConnection ->
Word32 ->
IO CInt
dBusConnectionUnregisterSubtree ::
(B.CallStack.HasCallStack, MonadIO m, IsDBusConnection a) =>
a
-> Word32
-> m Bool
dBusConnectionUnregisterSubtree :: forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m Bool
dBusConnectionUnregisterSubtree a
connection Word32
registrationId = IO Bool -> m Bool
forall a. IO a -> m a
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
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
result <- g_dbus_connection_unregister_subtree connection' registrationId
let result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
touchManagedPtr connection
return result'
#if defined(ENABLE_OVERLOADING)
data DBusConnectionUnregisterSubtreeMethodInfo
instance (signature ~ (Word32 -> m Bool), MonadIO m, IsDBusConnection a) => O.OverloadedMethod DBusConnectionUnregisterSubtreeMethodInfo a signature where
overloadedMethod :: a -> signature
overloadedMethod = a -> signature
a -> Word32 -> m Bool
forall (m :: * -> *) a.
(HasCallStack, MonadIO m, IsDBusConnection a) =>
a -> Word32 -> m Bool
dBusConnectionUnregisterSubtree
instance O.OverloadedMethodInfo DBusConnectionUnregisterSubtreeMethodInfo a where
overloadedMethodInfo :: Maybe ResolvedSymbolInfo
overloadedMethodInfo = ResolvedSymbolInfo -> Maybe ResolvedSymbolInfo
forall a. a -> Maybe a
P.Just (O.ResolvedSymbolInfo {
resolvedSymbolName :: Text
O.resolvedSymbolName = Text
"GI.Gio.Objects.DBusConnection.dBusConnectionUnregisterSubtree",
resolvedSymbolURL :: Text
O.resolvedSymbolURL = Text
"https://hackage.haskell.org/package/gi-gio-2.0.38/docs/GI-Gio-Objects-DBusConnection.html#v:dBusConnectionUnregisterSubtree"
})
#endif
foreign import ccall "g_dbus_connection_new" g_dbus_connection_new ::
Ptr Gio.IOStream.IOStream ->
CString ->
CUInt ->
Ptr Gio.DBusAuthObserver.DBusAuthObserver ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionNew ::
(B.CallStack.HasCallStack, MonadIO m, Gio.IOStream.IsIOStream a, Gio.DBusAuthObserver.IsDBusAuthObserver b, Gio.Cancellable.IsCancellable c) =>
a
-> Maybe (T.Text)
-> [Gio.Flags.DBusConnectionFlags]
-> Maybe (b)
-> Maybe (c)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionNew :: forall (m :: * -> *) a b c.
(HasCallStack, MonadIO m, IsIOStream a, IsDBusAuthObserver b,
IsCancellable c) =>
a
-> Maybe Text
-> [DBusConnectionFlags]
-> Maybe b
-> Maybe c
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionNew a
stream Maybe Text
guid [DBusConnectionFlags]
flags Maybe b
observer 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
stream' <- a -> IO (Ptr IOStream)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
stream
maybeGuid <- case guid 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
jGuid -> do
jGuid' <- Text -> IO CString
textToCString Text
jGuid
return jGuid'
let flags' = [DBusConnectionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusConnectionFlags]
flags
maybeObserver <- case observer of
Maybe b
Nothing -> Ptr DBusAuthObserver -> IO (Ptr DBusAuthObserver)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusAuthObserver
forall a. Ptr a
FP.nullPtr
Just b
jObserver -> do
jObserver' <- b -> IO (Ptr DBusAuthObserver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jObserver
return jObserver'
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_connection_new stream' maybeGuid flags' maybeObserver maybeCancellable maybeCallback userData
touchManagedPtr stream
whenJust observer touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem maybeGuid
return ()
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "g_dbus_connection_new_for_address" g_dbus_connection_new_for_address ::
CString ->
CUInt ->
Ptr Gio.DBusAuthObserver.DBusAuthObserver ->
Ptr Gio.Cancellable.Cancellable ->
FunPtr Gio.Callbacks.C_AsyncReadyCallback ->
Ptr () ->
IO ()
dBusConnectionNewForAddress ::
(B.CallStack.HasCallStack, MonadIO m, Gio.DBusAuthObserver.IsDBusAuthObserver a, Gio.Cancellable.IsCancellable b) =>
T.Text
-> [Gio.Flags.DBusConnectionFlags]
-> Maybe (a)
-> Maybe (b)
-> Maybe (Gio.Callbacks.AsyncReadyCallback)
-> m ()
dBusConnectionNewForAddress :: forall (m :: * -> *) a b.
(HasCallStack, MonadIO m, IsDBusAuthObserver a, IsCancellable b) =>
Text
-> [DBusConnectionFlags]
-> Maybe a
-> Maybe b
-> Maybe AsyncReadyCallback
-> m ()
dBusConnectionNewForAddress Text
address [DBusConnectionFlags]
flags Maybe a
observer 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
address' <- Text -> IO CString
textToCString Text
address
let flags' = [DBusConnectionFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [DBusConnectionFlags]
flags
maybeObserver <- case observer of
Maybe a
Nothing -> Ptr DBusAuthObserver -> IO (Ptr DBusAuthObserver)
forall a. a -> IO a
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr DBusAuthObserver
forall a. Ptr a
FP.nullPtr
Just a
jObserver -> do
jObserver' <- a -> IO (Ptr DBusAuthObserver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jObserver
return jObserver'
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_connection_new_for_address address' flags' maybeObserver maybeCancellable maybeCallback userData
whenJust observer touchManagedPtr
whenJust cancellable touchManagedPtr
freeMem address'
return ()
#if defined(ENABLE_OVERLOADING)
#endif