{- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte License : LGPL-2.1 Maintainer : Iñaki García Etxebarria (garetxe@gmail.com) -} module GI.Gio.Objects.DBusMessage ( -- * Exported types DBusMessage(..) , DBusMessageK , toDBusMessage , noDBusMessage , -- * Methods -- ** dBusMessageBytesNeeded dBusMessageBytesNeeded , -- ** dBusMessageCopy dBusMessageCopy , -- ** dBusMessageGetArg0 dBusMessageGetArg0 , -- ** dBusMessageGetBody dBusMessageGetBody , -- ** dBusMessageGetByteOrder dBusMessageGetByteOrder , -- ** dBusMessageGetDestination dBusMessageGetDestination , -- ** dBusMessageGetErrorName dBusMessageGetErrorName , -- ** dBusMessageGetFlags dBusMessageGetFlags , -- ** dBusMessageGetHeader dBusMessageGetHeader , -- ** dBusMessageGetHeaderFields dBusMessageGetHeaderFields , -- ** dBusMessageGetInterface dBusMessageGetInterface , -- ** dBusMessageGetLocked dBusMessageGetLocked , -- ** dBusMessageGetMember dBusMessageGetMember , -- ** dBusMessageGetMessageType dBusMessageGetMessageType , -- ** dBusMessageGetNumUnixFds dBusMessageGetNumUnixFds , -- ** dBusMessageGetPath dBusMessageGetPath , -- ** dBusMessageGetReplySerial dBusMessageGetReplySerial , -- ** dBusMessageGetSender dBusMessageGetSender , -- ** dBusMessageGetSerial dBusMessageGetSerial , -- ** dBusMessageGetSignature dBusMessageGetSignature , -- ** dBusMessageGetUnixFdList dBusMessageGetUnixFdList , -- ** dBusMessageLock dBusMessageLock , -- ** dBusMessageNew dBusMessageNew , -- ** dBusMessageNewFromBlob dBusMessageNewFromBlob , -- ** dBusMessageNewMethodCall dBusMessageNewMethodCall , -- ** dBusMessageNewMethodErrorLiteral dBusMessageNewMethodErrorLiteral , -- ** dBusMessageNewMethodReply dBusMessageNewMethodReply , -- ** dBusMessageNewSignal dBusMessageNewSignal , -- ** dBusMessagePrint dBusMessagePrint , -- ** dBusMessageSetBody dBusMessageSetBody , -- ** dBusMessageSetByteOrder dBusMessageSetByteOrder , -- ** dBusMessageSetDestination dBusMessageSetDestination , -- ** dBusMessageSetErrorName dBusMessageSetErrorName , -- ** dBusMessageSetFlags dBusMessageSetFlags , -- ** dBusMessageSetHeader dBusMessageSetHeader , -- ** dBusMessageSetInterface dBusMessageSetInterface , -- ** dBusMessageSetMember dBusMessageSetMember , -- ** dBusMessageSetMessageType dBusMessageSetMessageType , -- ** dBusMessageSetNumUnixFds dBusMessageSetNumUnixFds , -- ** dBusMessageSetPath dBusMessageSetPath , -- ** dBusMessageSetReplySerial dBusMessageSetReplySerial , -- ** dBusMessageSetSender dBusMessageSetSender , -- ** dBusMessageSetSerial dBusMessageSetSerial , -- ** dBusMessageSetSignature dBusMessageSetSignature , -- ** dBusMessageSetUnixFdList dBusMessageSetUnixFdList , -- ** dBusMessageToBlob dBusMessageToBlob , -- ** dBusMessageToGerror dBusMessageToGerror , -- * Properties -- ** Locked DBusMessageLockedPropertyInfo , getDBusMessageLocked , ) where import Prelude () import Data.GI.Base.ShortPrelude import qualified Data.Text as T import qualified Data.ByteString.Char8 as B import qualified Data.Map as Map import GI.Gio.Types import GI.Gio.Callbacks import qualified GI.GObject as GObject newtype DBusMessage = DBusMessage (ForeignPtr DBusMessage) foreign import ccall "g_dbus_message_get_type" c_g_dbus_message_get_type :: IO GType type instance ParentTypes DBusMessage = DBusMessageParentTypes type DBusMessageParentTypes = '[GObject.Object] instance GObject DBusMessage where gobjectIsInitiallyUnowned _ = False gobjectType _ = c_g_dbus_message_get_type class GObject o => DBusMessageK o instance (GObject o, IsDescendantOf DBusMessage o) => DBusMessageK o toDBusMessage :: DBusMessageK o => o -> IO DBusMessage toDBusMessage = unsafeCastTo DBusMessage noDBusMessage :: Maybe DBusMessage noDBusMessage = Nothing -- VVV Prop "locked" -- Type: TBasicType TBoolean -- Flags: [PropertyReadable] getDBusMessageLocked :: (MonadIO m, DBusMessageK o) => o -> m Bool getDBusMessageLocked obj = liftIO $ getObjectPropertyBool obj "locked" data DBusMessageLockedPropertyInfo instance AttrInfo DBusMessageLockedPropertyInfo where type AttrAllowedOps DBusMessageLockedPropertyInfo = '[ 'AttrGet] type AttrSetTypeConstraint DBusMessageLockedPropertyInfo = (~) () type AttrBaseTypeConstraint DBusMessageLockedPropertyInfo = DBusMessageK type AttrGetType DBusMessageLockedPropertyInfo = Bool type AttrLabel DBusMessageLockedPropertyInfo = "DBusMessage::locked" attrGet _ = getDBusMessageLocked attrSet _ = undefined attrConstruct _ = undefined type instance AttributeList DBusMessage = DBusMessageAttributeList type DBusMessageAttributeList = ('[ '("locked", DBusMessageLockedPropertyInfo)] :: [(Symbol, *)]) type instance SignalList DBusMessage = DBusMessageSignalList type DBusMessageSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)]) -- method DBusMessage::new -- method type : Constructor -- Args : [] -- Lengths : [] -- hInArgs : [] -- returnType : TInterface "Gio" "DBusMessage" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_new" g_dbus_message_new :: IO (Ptr DBusMessage) dBusMessageNew :: (MonadIO m) => m DBusMessage dBusMessageNew = liftIO $ do result <- g_dbus_message_new checkUnexpectedReturnNULL "g_dbus_message_new" result result' <- (wrapObject DBusMessage) result return result' -- method DBusMessage::new_from_blob -- method type : Constructor -- Args : [Arg {argName = "blob", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blob_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "capabilities", argType = TInterface "Gio" "DBusCapabilityFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [Arg {argName = "blob_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- hInArgs : [Arg {argName = "blob", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "capabilities", argType = TInterface "Gio" "DBusCapabilityFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : True -- Skip return : False foreign import ccall "g_dbus_message_new_from_blob" g_dbus_message_new_from_blob :: Ptr Word8 -> -- blob : TCArray False (-1) 1 (TBasicType TUInt8) Word64 -> -- blob_len : TBasicType TUInt64 CUInt -> -- capabilities : TInterface "Gio" "DBusCapabilityFlags" Ptr (Ptr GError) -> -- error IO (Ptr DBusMessage) dBusMessageNewFromBlob :: (MonadIO m) => ByteString -> -- blob [DBusCapabilityFlags] -> -- capabilities m DBusMessage dBusMessageNewFromBlob blob capabilities = liftIO $ do let blob_len = fromIntegral $ B.length blob blob' <- packByteString blob let capabilities' = gflagsToWord capabilities onException (do result <- propagateGError $ g_dbus_message_new_from_blob blob' blob_len capabilities' checkUnexpectedReturnNULL "g_dbus_message_new_from_blob" result result' <- (wrapObject DBusMessage) result freeMem blob' return result' ) (do freeMem blob' ) -- method DBusMessage::new_method_call -- method type : Constructor -- Args : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "method", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_new_method_call" g_dbus_message_new_method_call :: CString -> -- name : TBasicType TUTF8 CString -> -- path : TBasicType TUTF8 CString -> -- interface_ : TBasicType TUTF8 CString -> -- method : TBasicType TUTF8 IO (Ptr DBusMessage) dBusMessageNewMethodCall :: (MonadIO m) => Maybe (T.Text) -> -- name T.Text -> -- path Maybe (T.Text) -> -- interface_ T.Text -> -- method m DBusMessage dBusMessageNewMethodCall name path interface_ method = liftIO $ do maybeName <- case name of Nothing -> return nullPtr Just jName -> do jName' <- textToCString jName return jName' path' <- textToCString path maybeInterface_ <- case interface_ of Nothing -> return nullPtr Just jInterface_ -> do jInterface_' <- textToCString jInterface_ return jInterface_' method' <- textToCString method result <- g_dbus_message_new_method_call maybeName path' maybeInterface_ method' checkUnexpectedReturnNULL "g_dbus_message_new_method_call" result result' <- (wrapObject DBusMessage) result freeMem maybeName freeMem path' freeMem maybeInterface_ freeMem method' return result' -- method DBusMessage::new_signal -- method type : Constructor -- Args : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "path", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "interface_", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "signal", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_new_signal" g_dbus_message_new_signal :: CString -> -- path : TBasicType TUTF8 CString -> -- interface_ : TBasicType TUTF8 CString -> -- signal : TBasicType TUTF8 IO (Ptr DBusMessage) dBusMessageNewSignal :: (MonadIO m) => T.Text -> -- path T.Text -> -- interface_ T.Text -> -- signal m DBusMessage dBusMessageNewSignal path interface_ signal = liftIO $ do path' <- textToCString path interface_' <- textToCString interface_ signal' <- textToCString signal result <- g_dbus_message_new_signal path' interface_' signal' checkUnexpectedReturnNULL "g_dbus_message_new_signal" result result' <- (wrapObject DBusMessage) result freeMem path' freeMem interface_' freeMem signal' return result' -- method DBusMessage::copy -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : True -- Skip return : False foreign import ccall "g_dbus_message_copy" g_dbus_message_copy :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Ptr (Ptr GError) -> -- error IO (Ptr DBusMessage) dBusMessageCopy :: (MonadIO m, DBusMessageK a) => a -> -- _obj m DBusMessage dBusMessageCopy _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj onException (do result <- propagateGError $ g_dbus_message_copy _obj' checkUnexpectedReturnNULL "g_dbus_message_copy" result result' <- (wrapObject DBusMessage) result touchManagedPtr _obj return result' ) (do return () ) -- method DBusMessage::get_arg0 -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_arg0" g_dbus_message_get_arg0 :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetArg0 :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetArg0 _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_arg0 _obj' checkUnexpectedReturnNULL "g_dbus_message_get_arg0" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_body -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TVariant -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_body" g_dbus_message_get_body :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO (Ptr GVariant) dBusMessageGetBody :: (MonadIO m, DBusMessageK a) => a -> -- _obj m GVariant dBusMessageGetBody _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_body _obj' checkUnexpectedReturnNULL "g_dbus_message_get_body" result result' <- newGVariantFromPtr result touchManagedPtr _obj return result' -- method DBusMessage::get_byte_order -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessageByteOrder" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_byte_order" g_dbus_message_get_byte_order :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CUInt dBusMessageGetByteOrder :: (MonadIO m, DBusMessageK a) => a -> -- _obj m DBusMessageByteOrder dBusMessageGetByteOrder _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_byte_order _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method DBusMessage::get_destination -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_destination" g_dbus_message_get_destination :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetDestination :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetDestination _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_destination _obj' checkUnexpectedReturnNULL "g_dbus_message_get_destination" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_error_name -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_error_name" g_dbus_message_get_error_name :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetErrorName :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetErrorName _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_error_name _obj' checkUnexpectedReturnNULL "g_dbus_message_get_error_name" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_flags -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessageFlags" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_flags" g_dbus_message_get_flags :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CUInt dBusMessageGetFlags :: (MonadIO m, DBusMessageK a) => a -> -- _obj m [DBusMessageFlags] dBusMessageGetFlags _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_flags _obj' let result' = wordToGFlags result touchManagedPtr _obj return result' -- method DBusMessage::get_header -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header_field", argType = TInterface "Gio" "DBusMessageHeaderField", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header_field", argType = TInterface "Gio" "DBusMessageHeaderField", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TVariant -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_header" g_dbus_message_get_header :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CUInt -> -- header_field : TInterface "Gio" "DBusMessageHeaderField" IO (Ptr GVariant) dBusMessageGetHeader :: (MonadIO m, DBusMessageK a) => a -> -- _obj DBusMessageHeaderField -> -- header_field m GVariant dBusMessageGetHeader _obj header_field = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let header_field' = (fromIntegral . fromEnum) header_field result <- g_dbus_message_get_header _obj' header_field' checkUnexpectedReturnNULL "g_dbus_message_get_header" result result' <- wrapGVariantPtr result touchManagedPtr _obj return result' -- method DBusMessage::get_header_fields -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TCArray True (-1) (-1) (TBasicType TUInt8) -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_header_fields" g_dbus_message_get_header_fields :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO (Ptr Word8) dBusMessageGetHeaderFields :: (MonadIO m, DBusMessageK a) => a -> -- _obj m ByteString dBusMessageGetHeaderFields _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_header_fields _obj' checkUnexpectedReturnNULL "g_dbus_message_get_header_fields" result result' <- unpackZeroTerminatedByteString result touchManagedPtr _obj return result' -- method DBusMessage::get_interface -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_interface" g_dbus_message_get_interface :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetInterface :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetInterface _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_interface _obj' checkUnexpectedReturnNULL "g_dbus_message_get_interface" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_locked -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_locked" g_dbus_message_get_locked :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CInt dBusMessageGetLocked :: (MonadIO m, DBusMessageK a) => a -> -- _obj m Bool dBusMessageGetLocked _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_locked _obj' let result' = (/= 0) result touchManagedPtr _obj return result' -- method DBusMessage::get_member -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_member" g_dbus_message_get_member :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetMember :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetMember _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_member _obj' checkUnexpectedReturnNULL "g_dbus_message_get_member" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_message_type -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessageType" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_message_type" g_dbus_message_get_message_type :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CUInt dBusMessageGetMessageType :: (MonadIO m, DBusMessageK a) => a -> -- _obj m DBusMessageType dBusMessageGetMessageType _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_message_type _obj' let result' = (toEnum . fromIntegral) result touchManagedPtr _obj return result' -- method DBusMessage::get_num_unix_fds -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_num_unix_fds" g_dbus_message_get_num_unix_fds :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO Word32 dBusMessageGetNumUnixFds :: (MonadIO m, DBusMessageK a) => a -> -- _obj m Word32 dBusMessageGetNumUnixFds _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_num_unix_fds _obj' touchManagedPtr _obj return result -- method DBusMessage::get_path -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_path" g_dbus_message_get_path :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetPath :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetPath _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_path _obj' checkUnexpectedReturnNULL "g_dbus_message_get_path" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_reply_serial -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_reply_serial" g_dbus_message_get_reply_serial :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO Word32 dBusMessageGetReplySerial :: (MonadIO m, DBusMessageK a) => a -> -- _obj m Word32 dBusMessageGetReplySerial _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_reply_serial _obj' touchManagedPtr _obj return result -- method DBusMessage::get_sender -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_sender" g_dbus_message_get_sender :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetSender :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetSender _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_sender _obj' checkUnexpectedReturnNULL "g_dbus_message_get_sender" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_serial -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUInt32 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_serial" g_dbus_message_get_serial :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO Word32 dBusMessageGetSerial :: (MonadIO m, DBusMessageK a) => a -> -- _obj m Word32 dBusMessageGetSerial _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_serial _obj' touchManagedPtr _obj return result -- method DBusMessage::get_signature -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_signature" g_dbus_message_get_signature :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO CString dBusMessageGetSignature :: (MonadIO m, DBusMessageK a) => a -> -- _obj m T.Text dBusMessageGetSignature _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_signature _obj' checkUnexpectedReturnNULL "g_dbus_message_get_signature" result result' <- cstringToText result touchManagedPtr _obj return result' -- method DBusMessage::get_unix_fd_list -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "UnixFDList" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_get_unix_fd_list" g_dbus_message_get_unix_fd_list :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO (Ptr UnixFDList) dBusMessageGetUnixFdList :: (MonadIO m, DBusMessageK a) => a -> -- _obj m UnixFDList dBusMessageGetUnixFdList _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_get_unix_fd_list _obj' checkUnexpectedReturnNULL "g_dbus_message_get_unix_fd_list" result result' <- (newObject UnixFDList) result touchManagedPtr _obj return result' -- method DBusMessage::lock -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_lock" g_dbus_message_lock :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO () dBusMessageLock :: (MonadIO m, DBusMessageK a) => a -> -- _obj m () dBusMessageLock _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj g_dbus_message_lock _obj' touchManagedPtr _obj return () -- method DBusMessage::new_method_error_literal -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_name", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "error_message", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_new_method_error_literal" g_dbus_message_new_method_error_literal :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- error_name : TBasicType TUTF8 CString -> -- error_message : TBasicType TUTF8 IO (Ptr DBusMessage) dBusMessageNewMethodErrorLiteral :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- error_name T.Text -> -- error_message m DBusMessage dBusMessageNewMethodErrorLiteral _obj error_name error_message = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj error_name' <- textToCString error_name error_message' <- textToCString error_message result <- g_dbus_message_new_method_error_literal _obj' error_name' error_message' checkUnexpectedReturnNULL "g_dbus_message_new_method_error_literal" result result' <- (wrapObject DBusMessage) result touchManagedPtr _obj freeMem error_name' freeMem error_message' return result' -- method DBusMessage::new_method_reply -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TInterface "Gio" "DBusMessage" -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_new_method_reply" g_dbus_message_new_method_reply :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" IO (Ptr DBusMessage) dBusMessageNewMethodReply :: (MonadIO m, DBusMessageK a) => a -> -- _obj m DBusMessage dBusMessageNewMethodReply _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_new_method_reply _obj' checkUnexpectedReturnNULL "g_dbus_message_new_method_reply" result result' <- (wrapObject DBusMessage) result touchManagedPtr _obj return result' -- method DBusMessage::print -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "indent", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TUTF8 -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_print" g_dbus_message_print :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Word32 -> -- indent : TBasicType TUInt32 IO CString dBusMessagePrint :: (MonadIO m, DBusMessageK a) => a -> -- _obj Word32 -> -- indent m T.Text dBusMessagePrint _obj indent = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj result <- g_dbus_message_print _obj' indent checkUnexpectedReturnNULL "g_dbus_message_print" result result' <- cstringToText result freeMem result touchManagedPtr _obj return result' -- method DBusMessage::set_body -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "body", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "body", argType = TVariant, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_body" g_dbus_message_set_body :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Ptr GVariant -> -- body : TVariant IO () dBusMessageSetBody :: (MonadIO m, DBusMessageK a) => a -> -- _obj GVariant -> -- body m () dBusMessageSetBody _obj body = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let body' = unsafeManagedPtrGetPtr body g_dbus_message_set_body _obj' body' touchManagedPtr _obj return () -- method DBusMessage::set_byte_order -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_order", argType = TInterface "Gio" "DBusMessageByteOrder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "byte_order", argType = TInterface "Gio" "DBusMessageByteOrder", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_byte_order" g_dbus_message_set_byte_order :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CUInt -> -- byte_order : TInterface "Gio" "DBusMessageByteOrder" IO () dBusMessageSetByteOrder :: (MonadIO m, DBusMessageK a) => a -> -- _obj DBusMessageByteOrder -> -- byte_order m () dBusMessageSetByteOrder _obj byte_order = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let byte_order' = (fromIntegral . fromEnum) byte_order g_dbus_message_set_byte_order _obj' byte_order' touchManagedPtr _obj return () -- method DBusMessage::set_destination -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_destination" g_dbus_message_set_destination :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetDestination :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetDestination _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_destination _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_error_name -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_error_name" g_dbus_message_set_error_name :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetErrorName :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetErrorName _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_error_name _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_flags -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusMessageFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "flags", argType = TInterface "Gio" "DBusMessageFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_flags" g_dbus_message_set_flags :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CUInt -> -- flags : TInterface "Gio" "DBusMessageFlags" IO () dBusMessageSetFlags :: (MonadIO m, DBusMessageK a) => a -> -- _obj [DBusMessageFlags] -> -- flags m () dBusMessageSetFlags _obj flags = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let flags' = gflagsToWord flags g_dbus_message_set_flags _obj' flags' touchManagedPtr _obj return () -- method DBusMessage::set_header -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header_field", argType = TInterface "Gio" "DBusMessageHeaderField", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "header_field", argType = TInterface "Gio" "DBusMessageHeaderField", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TVariant, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_header" g_dbus_message_set_header :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CUInt -> -- header_field : TInterface "Gio" "DBusMessageHeaderField" Ptr GVariant -> -- value : TVariant IO () dBusMessageSetHeader :: (MonadIO m, DBusMessageK a) => a -> -- _obj DBusMessageHeaderField -> -- header_field Maybe (GVariant) -> -- value m () dBusMessageSetHeader _obj header_field value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let header_field' = (fromIntegral . fromEnum) header_field maybeValue <- case value of Nothing -> return nullPtr Just jValue -> do let jValue' = unsafeManagedPtrGetPtr jValue return jValue' g_dbus_message_set_header _obj' header_field' maybeValue touchManagedPtr _obj return () -- method DBusMessage::set_interface -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_interface" g_dbus_message_set_interface :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetInterface :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetInterface _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_interface _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_member -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_member" g_dbus_message_set_member :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetMember :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetMember _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_member _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_message_type -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gio" "DBusMessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "type", argType = TInterface "Gio" "DBusMessageType", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_message_type" g_dbus_message_set_message_type :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CUInt -> -- type : TInterface "Gio" "DBusMessageType" IO () dBusMessageSetMessageType :: (MonadIO m, DBusMessageK a) => a -> -- _obj DBusMessageType -> -- type m () dBusMessageSetMessageType _obj type_ = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj let type_' = (fromIntegral . fromEnum) type_ g_dbus_message_set_message_type _obj' type_' touchManagedPtr _obj return () -- method DBusMessage::set_num_unix_fds -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_num_unix_fds" g_dbus_message_set_num_unix_fds :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Word32 -> -- value : TBasicType TUInt32 IO () dBusMessageSetNumUnixFds :: (MonadIO m, DBusMessageK a) => a -> -- _obj Word32 -> -- value m () dBusMessageSetNumUnixFds _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj g_dbus_message_set_num_unix_fds _obj' value touchManagedPtr _obj return () -- method DBusMessage::set_path -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_path" g_dbus_message_set_path :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetPath :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetPath _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_path _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_reply_serial -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_reply_serial" g_dbus_message_set_reply_serial :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Word32 -> -- value : TBasicType TUInt32 IO () dBusMessageSetReplySerial :: (MonadIO m, DBusMessageK a) => a -> -- _obj Word32 -> -- value m () dBusMessageSetReplySerial _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj g_dbus_message_set_reply_serial _obj' value touchManagedPtr _obj return () -- method DBusMessage::set_sender -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_sender" g_dbus_message_set_sender :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetSender :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetSender _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_sender _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_serial -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "serial", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "serial", argType = TBasicType TUInt32, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_serial" g_dbus_message_set_serial :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Word32 -> -- serial : TBasicType TUInt32 IO () dBusMessageSetSerial :: (MonadIO m, DBusMessageK a) => a -> -- _obj Word32 -> -- serial m () dBusMessageSetSerial _obj serial = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj g_dbus_message_set_serial _obj' serial touchManagedPtr _obj return () -- method DBusMessage::set_signature -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "value", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_signature" g_dbus_message_set_signature :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" CString -> -- value : TBasicType TUTF8 IO () dBusMessageSetSignature :: (MonadIO m, DBusMessageK a) => a -> -- _obj T.Text -> -- value m () dBusMessageSetSignature _obj value = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj value' <- textToCString value g_dbus_message_set_signature _obj' value' touchManagedPtr _obj freeMem value' return () -- method DBusMessage::set_unix_fd_list -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "fd_list", argType = TInterface "Gio" "UnixFDList", direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TVoid -- throws : False -- Skip return : False foreign import ccall "g_dbus_message_set_unix_fd_list" g_dbus_message_set_unix_fd_list :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Ptr UnixFDList -> -- fd_list : TInterface "Gio" "UnixFDList" IO () dBusMessageSetUnixFdList :: (MonadIO m, DBusMessageK a, UnixFDListK b) => a -> -- _obj Maybe (b) -> -- fd_list m () dBusMessageSetUnixFdList _obj fd_list = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj maybeFd_list <- case fd_list of Nothing -> return nullPtr Just jFd_list -> do let jFd_list' = unsafeManagedPtrCastPtr jFd_list return jFd_list' g_dbus_message_set_unix_fd_list _obj' maybeFd_list touchManagedPtr _obj whenJust fd_list touchManagedPtr return () -- method DBusMessage::to_blob -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "out_size", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything},Arg {argName = "capabilities", argType = TInterface "Gio" "DBusCapabilityFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [Arg {argName = "out_size", argType = TBasicType TUInt64, direction = DirectionOut, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferEverything}] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "capabilities", argType = TInterface "Gio" "DBusCapabilityFlags", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TCArray False (-1) 1 (TBasicType TUInt8) -- throws : True -- Skip return : False foreign import ccall "g_dbus_message_to_blob" g_dbus_message_to_blob :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Ptr Word64 -> -- out_size : TBasicType TUInt64 CUInt -> -- capabilities : TInterface "Gio" "DBusCapabilityFlags" Ptr (Ptr GError) -> -- error IO (Ptr Word8) dBusMessageToBlob :: (MonadIO m, DBusMessageK a) => a -> -- _obj [DBusCapabilityFlags] -> -- capabilities m ByteString dBusMessageToBlob _obj capabilities = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj out_size <- allocMem :: IO (Ptr Word64) let capabilities' = gflagsToWord capabilities onException (do result <- propagateGError $ g_dbus_message_to_blob _obj' out_size capabilities' out_size' <- peek out_size checkUnexpectedReturnNULL "g_dbus_message_to_blob" result result' <- (unpackByteStringWithLength out_size') result freeMem result touchManagedPtr _obj freeMem out_size return result' ) (do freeMem out_size ) -- method DBusMessage::to_gerror -- method type : OrdinaryMethod -- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [] -- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "DBusMessage", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TBoolean -- throws : True -- Skip return : False foreign import ccall "g_dbus_message_to_gerror" g_dbus_message_to_gerror :: Ptr DBusMessage -> -- _obj : TInterface "Gio" "DBusMessage" Ptr (Ptr GError) -> -- error IO CInt dBusMessageToGerror :: (MonadIO m, DBusMessageK a) => a -> -- _obj m () dBusMessageToGerror _obj = liftIO $ do let _obj' = unsafeManagedPtrCastPtr _obj onException (do _ <- propagateGError $ g_dbus_message_to_gerror _obj' touchManagedPtr _obj return () ) (do return () ) -- method DBusMessage::bytes_needed -- method type : MemberFunction -- Args : [Arg {argName = "blob", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "blob_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- Lengths : [Arg {argName = "blob_len", argType = TBasicType TUInt64, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- hInArgs : [Arg {argName = "blob", argType = TCArray False (-1) 1 (TBasicType TUInt8), direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}] -- returnType : TBasicType TInt64 -- throws : True -- Skip return : False foreign import ccall "g_dbus_message_bytes_needed" g_dbus_message_bytes_needed :: Ptr Word8 -> -- blob : TCArray False (-1) 1 (TBasicType TUInt8) Word64 -> -- blob_len : TBasicType TUInt64 Ptr (Ptr GError) -> -- error IO Int64 dBusMessageBytesNeeded :: (MonadIO m) => ByteString -> -- blob m Int64 dBusMessageBytesNeeded blob = liftIO $ do let blob_len = fromIntegral $ B.length blob blob' <- packByteString blob onException (do result <- propagateGError $ g_dbus_message_bytes_needed blob' blob_len freeMem blob' return result ) (do freeMem blob' )