module GI.Gio.Structs.DBusErrorEntry
(
DBusErrorEntry(..) ,
noDBusErrorEntry ,
dBusErrorEntryReadDbusErrorName ,
dBusErrorEntryReadErrorCode ,
) 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
newtype DBusErrorEntry = DBusErrorEntry (ForeignPtr DBusErrorEntry)
noDBusErrorEntry :: Maybe DBusErrorEntry
noDBusErrorEntry = Nothing
dBusErrorEntryReadErrorCode :: DBusErrorEntry -> IO Int32
dBusErrorEntryReadErrorCode s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO Int32
return val
dBusErrorEntryReadDbusErrorName :: DBusErrorEntry -> IO T.Text
dBusErrorEntryReadDbusErrorName s = withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO CString
val' <- cstringToText val
return val'