gi-gio-0.2.46.12: GI/Gio/Objects/ProxyAddress.hs
{- |
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.ProxyAddress
(
-- * Exported types
ProxyAddress(..) ,
ProxyAddressK ,
toProxyAddress ,
noProxyAddress ,
-- * Methods
-- ** proxyAddressGetDestinationHostname
proxyAddressGetDestinationHostname ,
-- ** proxyAddressGetDestinationPort
proxyAddressGetDestinationPort ,
-- ** proxyAddressGetDestinationProtocol
proxyAddressGetDestinationProtocol ,
-- ** proxyAddressGetPassword
proxyAddressGetPassword ,
-- ** proxyAddressGetProtocol
proxyAddressGetProtocol ,
-- ** proxyAddressGetUri
proxyAddressGetUri ,
-- ** proxyAddressGetUsername
proxyAddressGetUsername ,
-- ** proxyAddressNew
proxyAddressNew ,
-- * Properties
-- ** DestinationHostname
ProxyAddressDestinationHostnamePropertyInfo,
constructProxyAddressDestinationHostname,
getProxyAddressDestinationHostname ,
-- ** DestinationPort
ProxyAddressDestinationPortPropertyInfo ,
constructProxyAddressDestinationPort ,
getProxyAddressDestinationPort ,
-- ** DestinationProtocol
ProxyAddressDestinationProtocolPropertyInfo,
constructProxyAddressDestinationProtocol,
getProxyAddressDestinationProtocol ,
-- ** Password
ProxyAddressPasswordPropertyInfo ,
constructProxyAddressPassword ,
getProxyAddressPassword ,
-- ** Protocol
ProxyAddressProtocolPropertyInfo ,
constructProxyAddressProtocol ,
getProxyAddressProtocol ,
-- ** Uri
ProxyAddressUriPropertyInfo ,
constructProxyAddressUri ,
getProxyAddressUri ,
-- ** Username
ProxyAddressUsernamePropertyInfo ,
constructProxyAddressUsername ,
getProxyAddressUsername ,
) 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 ProxyAddress = ProxyAddress (ForeignPtr ProxyAddress)
foreign import ccall "g_proxy_address_get_type"
c_g_proxy_address_get_type :: IO GType
type instance ParentTypes ProxyAddress = ProxyAddressParentTypes
type ProxyAddressParentTypes = '[InetSocketAddress, SocketAddress, GObject.Object, SocketConnectable]
instance GObject ProxyAddress where
gobjectIsInitiallyUnowned _ = False
gobjectType _ = c_g_proxy_address_get_type
class GObject o => ProxyAddressK o
instance (GObject o, IsDescendantOf ProxyAddress o) => ProxyAddressK o
toProxyAddress :: ProxyAddressK o => o -> IO ProxyAddress
toProxyAddress = unsafeCastTo ProxyAddress
noProxyAddress :: Maybe ProxyAddress
noProxyAddress = Nothing
-- VVV Prop "destination-hostname"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressDestinationHostname :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressDestinationHostname obj = liftIO $ getObjectPropertyString obj "destination-hostname"
constructProxyAddressDestinationHostname :: T.Text -> IO ([Char], GValue)
constructProxyAddressDestinationHostname val = constructObjectPropertyString "destination-hostname" val
data ProxyAddressDestinationHostnamePropertyInfo
instance AttrInfo ProxyAddressDestinationHostnamePropertyInfo where
type AttrAllowedOps ProxyAddressDestinationHostnamePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressDestinationHostnamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressDestinationHostnamePropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressDestinationHostnamePropertyInfo = T.Text
type AttrLabel ProxyAddressDestinationHostnamePropertyInfo = "ProxyAddress::destination-hostname"
attrGet _ = getProxyAddressDestinationHostname
attrSet _ = undefined
attrConstruct _ = constructProxyAddressDestinationHostname
-- VVV Prop "destination-port"
-- Type: TBasicType TUInt32
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressDestinationPort :: (MonadIO m, ProxyAddressK o) => o -> m Word32
getProxyAddressDestinationPort obj = liftIO $ getObjectPropertyCUInt obj "destination-port"
constructProxyAddressDestinationPort :: Word32 -> IO ([Char], GValue)
constructProxyAddressDestinationPort val = constructObjectPropertyCUInt "destination-port" val
data ProxyAddressDestinationPortPropertyInfo
instance AttrInfo ProxyAddressDestinationPortPropertyInfo where
type AttrAllowedOps ProxyAddressDestinationPortPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressDestinationPortPropertyInfo = (~) Word32
type AttrBaseTypeConstraint ProxyAddressDestinationPortPropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressDestinationPortPropertyInfo = Word32
type AttrLabel ProxyAddressDestinationPortPropertyInfo = "ProxyAddress::destination-port"
attrGet _ = getProxyAddressDestinationPort
attrSet _ = undefined
attrConstruct _ = constructProxyAddressDestinationPort
-- VVV Prop "destination-protocol"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressDestinationProtocol :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressDestinationProtocol obj = liftIO $ getObjectPropertyString obj "destination-protocol"
constructProxyAddressDestinationProtocol :: T.Text -> IO ([Char], GValue)
constructProxyAddressDestinationProtocol val = constructObjectPropertyString "destination-protocol" val
data ProxyAddressDestinationProtocolPropertyInfo
instance AttrInfo ProxyAddressDestinationProtocolPropertyInfo where
type AttrAllowedOps ProxyAddressDestinationProtocolPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressDestinationProtocolPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressDestinationProtocolPropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressDestinationProtocolPropertyInfo = T.Text
type AttrLabel ProxyAddressDestinationProtocolPropertyInfo = "ProxyAddress::destination-protocol"
attrGet _ = getProxyAddressDestinationProtocol
attrSet _ = undefined
attrConstruct _ = constructProxyAddressDestinationProtocol
-- VVV Prop "password"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressPassword :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressPassword obj = liftIO $ getObjectPropertyString obj "password"
constructProxyAddressPassword :: T.Text -> IO ([Char], GValue)
constructProxyAddressPassword val = constructObjectPropertyString "password" val
data ProxyAddressPasswordPropertyInfo
instance AttrInfo ProxyAddressPasswordPropertyInfo where
type AttrAllowedOps ProxyAddressPasswordPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressPasswordPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressPasswordPropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressPasswordPropertyInfo = T.Text
type AttrLabel ProxyAddressPasswordPropertyInfo = "ProxyAddress::password"
attrGet _ = getProxyAddressPassword
attrSet _ = undefined
attrConstruct _ = constructProxyAddressPassword
-- VVV Prop "protocol"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressProtocol :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressProtocol obj = liftIO $ getObjectPropertyString obj "protocol"
constructProxyAddressProtocol :: T.Text -> IO ([Char], GValue)
constructProxyAddressProtocol val = constructObjectPropertyString "protocol" val
data ProxyAddressProtocolPropertyInfo
instance AttrInfo ProxyAddressProtocolPropertyInfo where
type AttrAllowedOps ProxyAddressProtocolPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressProtocolPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressProtocolPropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressProtocolPropertyInfo = T.Text
type AttrLabel ProxyAddressProtocolPropertyInfo = "ProxyAddress::protocol"
attrGet _ = getProxyAddressProtocol
attrSet _ = undefined
attrConstruct _ = constructProxyAddressProtocol
-- VVV Prop "uri"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressUri :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressUri obj = liftIO $ getObjectPropertyString obj "uri"
constructProxyAddressUri :: T.Text -> IO ([Char], GValue)
constructProxyAddressUri val = constructObjectPropertyString "uri" val
data ProxyAddressUriPropertyInfo
instance AttrInfo ProxyAddressUriPropertyInfo where
type AttrAllowedOps ProxyAddressUriPropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressUriPropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressUriPropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressUriPropertyInfo = T.Text
type AttrLabel ProxyAddressUriPropertyInfo = "ProxyAddress::uri"
attrGet _ = getProxyAddressUri
attrSet _ = undefined
attrConstruct _ = constructProxyAddressUri
-- VVV Prop "username"
-- Type: TBasicType TUTF8
-- Flags: [PropertyReadable,PropertyWritable,PropertyConstructOnly]
getProxyAddressUsername :: (MonadIO m, ProxyAddressK o) => o -> m T.Text
getProxyAddressUsername obj = liftIO $ getObjectPropertyString obj "username"
constructProxyAddressUsername :: T.Text -> IO ([Char], GValue)
constructProxyAddressUsername val = constructObjectPropertyString "username" val
data ProxyAddressUsernamePropertyInfo
instance AttrInfo ProxyAddressUsernamePropertyInfo where
type AttrAllowedOps ProxyAddressUsernamePropertyInfo = '[ 'AttrConstruct, 'AttrGet]
type AttrSetTypeConstraint ProxyAddressUsernamePropertyInfo = (~) T.Text
type AttrBaseTypeConstraint ProxyAddressUsernamePropertyInfo = ProxyAddressK
type AttrGetType ProxyAddressUsernamePropertyInfo = T.Text
type AttrLabel ProxyAddressUsernamePropertyInfo = "ProxyAddress::username"
attrGet _ = getProxyAddressUsername
attrSet _ = undefined
attrConstruct _ = constructProxyAddressUsername
type instance AttributeList ProxyAddress = ProxyAddressAttributeList
type ProxyAddressAttributeList = ('[ '("address", InetSocketAddressAddressPropertyInfo), '("destination-hostname", ProxyAddressDestinationHostnamePropertyInfo), '("destination-port", ProxyAddressDestinationPortPropertyInfo), '("destination-protocol", ProxyAddressDestinationProtocolPropertyInfo), '("family", SocketAddressFamilyPropertyInfo), '("flowinfo", InetSocketAddressFlowinfoPropertyInfo), '("password", ProxyAddressPasswordPropertyInfo), '("port", InetSocketAddressPortPropertyInfo), '("protocol", ProxyAddressProtocolPropertyInfo), '("scope-id", InetSocketAddressScopeIdPropertyInfo), '("uri", ProxyAddressUriPropertyInfo), '("username", ProxyAddressUsernamePropertyInfo)] :: [(Symbol, *)])
type instance SignalList ProxyAddress = ProxyAddressSignalList
type ProxyAddressSignalList = ('[ '("notify", GObject.ObjectNotifySignalInfo), '("notify::[property]", GObjectNotifySignalInfo)] :: [(Symbol, *)])
-- method ProxyAddress::new
-- method type : Constructor
-- Args : [Arg {argName = "inetaddr", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "port", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "protocol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_port", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "inetaddr", argType = TInterface "Gio" "InetAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "port", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "protocol", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_hostname", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "dest_port", argType = TBasicType TUInt16, direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "username", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing},Arg {argName = "password", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = True, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TInterface "Gio" "ProxyAddress"
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_new" g_proxy_address_new ::
Ptr InetAddress -> -- inetaddr : TInterface "Gio" "InetAddress"
Word16 -> -- port : TBasicType TUInt16
CString -> -- protocol : TBasicType TUTF8
CString -> -- dest_hostname : TBasicType TUTF8
Word16 -> -- dest_port : TBasicType TUInt16
CString -> -- username : TBasicType TUTF8
CString -> -- password : TBasicType TUTF8
IO (Ptr ProxyAddress)
proxyAddressNew ::
(MonadIO m, InetAddressK a) =>
a -> -- inetaddr
Word16 -> -- port
T.Text -> -- protocol
T.Text -> -- dest_hostname
Word16 -> -- dest_port
Maybe (T.Text) -> -- username
Maybe (T.Text) -> -- password
m ProxyAddress
proxyAddressNew inetaddr port protocol dest_hostname dest_port username password = liftIO $ do
let inetaddr' = unsafeManagedPtrCastPtr inetaddr
protocol' <- textToCString protocol
dest_hostname' <- textToCString dest_hostname
maybeUsername <- case username of
Nothing -> return nullPtr
Just jUsername -> do
jUsername' <- textToCString jUsername
return jUsername'
maybePassword <- case password of
Nothing -> return nullPtr
Just jPassword -> do
jPassword' <- textToCString jPassword
return jPassword'
result <- g_proxy_address_new inetaddr' port protocol' dest_hostname' dest_port maybeUsername maybePassword
checkUnexpectedReturnNULL "g_proxy_address_new" result
result' <- (wrapObject ProxyAddress) result
touchManagedPtr inetaddr
freeMem protocol'
freeMem dest_hostname'
freeMem maybeUsername
freeMem maybePassword
return result'
-- method ProxyAddress::get_destination_hostname
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_destination_hostname" g_proxy_address_get_destination_hostname ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetDestinationHostname ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetDestinationHostname _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_destination_hostname _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_destination_hostname" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method ProxyAddress::get_destination_port
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUInt16
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_destination_port" g_proxy_address_get_destination_port ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO Word16
proxyAddressGetDestinationPort ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m Word16
proxyAddressGetDestinationPort _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_destination_port _obj'
touchManagedPtr _obj
return result
-- method ProxyAddress::get_destination_protocol
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_destination_protocol" g_proxy_address_get_destination_protocol ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetDestinationProtocol ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetDestinationProtocol _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_destination_protocol _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_destination_protocol" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method ProxyAddress::get_password
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_password" g_proxy_address_get_password ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetPassword ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetPassword _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_password _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_password" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method ProxyAddress::get_protocol
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_protocol" g_proxy_address_get_protocol ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetProtocol ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetProtocol _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_protocol _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_protocol" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method ProxyAddress::get_uri
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_uri" g_proxy_address_get_uri ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetUri ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetUri _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_uri _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_uri" result
result' <- cstringToText result
touchManagedPtr _obj
return result'
-- method ProxyAddress::get_username
-- method type : OrdinaryMethod
-- Args : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- Lengths : []
-- hInArgs : [Arg {argName = "_obj", argType = TInterface "Gio" "ProxyAddress", direction = DirectionIn, mayBeNull = False, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, transfer = TransferNothing}]
-- returnType : TBasicType TUTF8
-- throws : False
-- Skip return : False
foreign import ccall "g_proxy_address_get_username" g_proxy_address_get_username ::
Ptr ProxyAddress -> -- _obj : TInterface "Gio" "ProxyAddress"
IO CString
proxyAddressGetUsername ::
(MonadIO m, ProxyAddressK a) =>
a -> -- _obj
m T.Text
proxyAddressGetUsername _obj = liftIO $ do
let _obj' = unsafeManagedPtrCastPtr _obj
result <- g_proxy_address_get_username _obj'
checkUnexpectedReturnNULL "g_proxy_address_get_username" result
result' <- cstringToText result
touchManagedPtr _obj
return result'