{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gio.Interfaces.ProxyResolver
    ( 
    ProxyResolver(..)                       ,
    noProxyResolver                         ,
    IsProxyResolver                         ,
    toProxyResolver                         ,
 
#if defined(ENABLE_OVERLOADING)
    ResolveProxyResolverMethod              ,
#endif
    proxyResolverGetDefault                 ,
#if defined(ENABLE_OVERLOADING)
    ProxyResolverIsSupportedMethodInfo      ,
#endif
    proxyResolverIsSupported                ,
#if defined(ENABLE_OVERLOADING)
    ProxyResolverLookupMethodInfo           ,
#endif
    proxyResolverLookup                     ,
#if defined(ENABLE_OVERLOADING)
    ProxyResolverLookupAsyncMethodInfo      ,
#endif
    proxyResolverLookupAsync                ,
#if defined(ENABLE_OVERLOADING)
    ProxyResolverLookupFinishMethodInfo     ,
#endif
    proxyResolverLookupFinish               ,
    ) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gio.Callbacks as Gio.Callbacks
import {-# SOURCE #-} qualified GI.Gio.Interfaces.AsyncResult as Gio.AsyncResult
import {-# SOURCE #-} qualified GI.Gio.Objects.Cancellable as Gio.Cancellable
newtype ProxyResolver = ProxyResolver (ManagedPtr ProxyResolver)
    deriving (ProxyResolver -> ProxyResolver -> Bool
(ProxyResolver -> ProxyResolver -> Bool)
-> (ProxyResolver -> ProxyResolver -> Bool) -> Eq ProxyResolver
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: ProxyResolver -> ProxyResolver -> Bool
$c/= :: ProxyResolver -> ProxyResolver -> Bool
== :: ProxyResolver -> ProxyResolver -> Bool
$c== :: ProxyResolver -> ProxyResolver -> Bool
Eq)
noProxyResolver :: Maybe ProxyResolver
noProxyResolver :: Maybe ProxyResolver
noProxyResolver = Maybe ProxyResolver
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList ProxyResolver = ProxyResolverSignalList
type ProxyResolverSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "g_proxy_resolver_get_type"
    c_g_proxy_resolver_get_type :: IO GType
instance GObject ProxyResolver where
    gobjectType :: IO GType
gobjectType = IO GType
c_g_proxy_resolver_get_type
    
instance B.GValue.IsGValue ProxyResolver where
    toGValue :: ProxyResolver -> IO GValue
toGValue o :: ProxyResolver
o = do
        GType
gtype <- IO GType
c_g_proxy_resolver_get_type
        ProxyResolver -> (Ptr ProxyResolver -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr ProxyResolver
o (GType
-> (GValue -> Ptr ProxyResolver -> IO ())
-> Ptr ProxyResolver
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr ProxyResolver -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
        
    fromGValue :: GValue -> IO ProxyResolver
fromGValue gv :: GValue
gv = do
        Ptr ProxyResolver
ptr <- GValue -> IO (Ptr ProxyResolver)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr ProxyResolver)
        (ManagedPtr ProxyResolver -> ProxyResolver)
-> Ptr ProxyResolver -> IO ProxyResolver
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr ProxyResolver -> ProxyResolver
ProxyResolver Ptr ProxyResolver
ptr
        
    
class (GObject o, O.IsDescendantOf ProxyResolver o) => IsProxyResolver o
instance (GObject o, O.IsDescendantOf ProxyResolver o) => IsProxyResolver o
instance O.HasParentTypes ProxyResolver
type instance O.ParentTypes ProxyResolver = '[GObject.Object.Object]
toProxyResolver :: (MonadIO m, IsProxyResolver o) => o -> m ProxyResolver
toProxyResolver :: o -> m ProxyResolver
toProxyResolver = IO ProxyResolver -> m ProxyResolver
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ProxyResolver -> m ProxyResolver)
-> (o -> IO ProxyResolver) -> o -> m ProxyResolver
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr ProxyResolver -> ProxyResolver)
-> o -> IO ProxyResolver
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr ProxyResolver -> ProxyResolver
ProxyResolver
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList ProxyResolver
type instance O.AttributeList ProxyResolver = ProxyResolverAttributeList
type ProxyResolverAttributeList = ('[ ] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveProxyResolverMethod (t :: Symbol) (o :: *) :: * where
    ResolveProxyResolverMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveProxyResolverMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveProxyResolverMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveProxyResolverMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveProxyResolverMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
    ResolveProxyResolverMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveProxyResolverMethod "isSupported" o = ProxyResolverIsSupportedMethodInfo
    ResolveProxyResolverMethod "lookup" o = ProxyResolverLookupMethodInfo
    ResolveProxyResolverMethod "lookupAsync" o = ProxyResolverLookupAsyncMethodInfo
    ResolveProxyResolverMethod "lookupFinish" o = ProxyResolverLookupFinishMethodInfo
    ResolveProxyResolverMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveProxyResolverMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveProxyResolverMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveProxyResolverMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveProxyResolverMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveProxyResolverMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveProxyResolverMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveProxyResolverMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveProxyResolverMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveProxyResolverMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveProxyResolverMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveProxyResolverMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveProxyResolverMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveProxyResolverMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveProxyResolverMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
    ResolveProxyResolverMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveProxyResolverMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveProxyResolverMethod t ProxyResolver, O.MethodInfo info ProxyResolver p) => OL.IsLabel t (ProxyResolver -> p) where
#if MIN_VERSION_base(4,10,0)
    fromLabel = O.overloadedMethod @info
#else
    fromLabel _ = O.overloadedMethod @info
#endif
#endif
foreign import ccall "g_proxy_resolver_is_supported" g_proxy_resolver_is_supported :: 
    Ptr ProxyResolver ->                    
    IO CInt
proxyResolverIsSupported ::
    (B.CallStack.HasCallStack, MonadIO m, IsProxyResolver a) =>
    a
    
    -> m Bool
    
proxyResolverIsSupported :: a -> m Bool
proxyResolverIsSupported resolver :: a
resolver = IO Bool -> m Bool
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool
forall a b. (a -> b) -> a -> b
$ do
    Ptr ProxyResolver
resolver' <- a -> IO (Ptr ProxyResolver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
resolver
    CInt
result <- Ptr ProxyResolver -> IO CInt
g_proxy_resolver_is_supported Ptr ProxyResolver
resolver'
    let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
resolver
    Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data ProxyResolverIsSupportedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsProxyResolver a) => O.MethodInfo ProxyResolverIsSupportedMethodInfo a signature where
    overloadedMethod = proxyResolverIsSupported
#endif
foreign import ccall "g_proxy_resolver_lookup" g_proxy_resolver_lookup :: 
    Ptr ProxyResolver ->                    
    CString ->                              
    Ptr Gio.Cancellable.Cancellable ->      
    Ptr (Ptr GError) ->                     
    IO (Ptr CString)
proxyResolverLookup ::
    (B.CallStack.HasCallStack, MonadIO m, IsProxyResolver a, Gio.Cancellable.IsCancellable b) =>
    a
    
    -> T.Text
    
    -> Maybe (b)
    
    -> m [T.Text]
    
    
    
proxyResolverLookup :: a -> Text -> Maybe b -> m [Text]
proxyResolverLookup resolver :: a
resolver uri :: Text
uri cancellable :: Maybe b
cancellable = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr ProxyResolver
resolver' <- a -> IO (Ptr ProxyResolver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
resolver
    CString
uri' <- Text -> IO CString
textToCString Text
uri
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    IO [Text] -> IO () -> IO [Text]
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr ProxyResolver
-> CString
-> Ptr Cancellable
-> Ptr (Ptr GError)
-> IO (Ptr CString)
g_proxy_resolver_lookup Ptr ProxyResolver
resolver' CString
uri' Ptr Cancellable
maybeCancellable
        Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "proxyResolverLookup" Ptr CString
result
        [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
resolver
        Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
        [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
     ) (do
        CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
     )
#if defined(ENABLE_OVERLOADING)
data ProxyResolverLookupMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> m [T.Text]), MonadIO m, IsProxyResolver a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ProxyResolverLookupMethodInfo a signature where
    overloadedMethod = proxyResolverLookup
#endif
foreign import ccall "g_proxy_resolver_lookup_async" g_proxy_resolver_lookup_async :: 
    Ptr ProxyResolver ->                    
    CString ->                              
    Ptr Gio.Cancellable.Cancellable ->      
    FunPtr Gio.Callbacks.C_AsyncReadyCallback -> 
    Ptr () ->                               
    IO ()
proxyResolverLookupAsync ::
    (B.CallStack.HasCallStack, MonadIO m, IsProxyResolver a, Gio.Cancellable.IsCancellable b) =>
    a
    
    -> T.Text
    
    -> Maybe (b)
    
    -> Maybe (Gio.Callbacks.AsyncReadyCallback)
    
    -> m ()
proxyResolverLookupAsync :: a -> Text -> Maybe b -> Maybe AsyncReadyCallback -> m ()
proxyResolverLookupAsync resolver :: a
resolver uri :: Text
uri cancellable :: Maybe b
cancellable callback :: Maybe AsyncReadyCallback
callback = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
    Ptr ProxyResolver
resolver' <- a -> IO (Ptr ProxyResolver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
resolver
    CString
uri' <- Text -> IO CString
textToCString Text
uri
    Ptr Cancellable
maybeCancellable <- case Maybe b
cancellable of
        Nothing -> Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
forall a. Ptr a
nullPtr
        Just jCancellable :: b
jCancellable -> do
            Ptr Cancellable
jCancellable' <- b -> IO (Ptr Cancellable)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
jCancellable
            Ptr Cancellable -> IO (Ptr Cancellable)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Cancellable
jCancellable'
    FunPtr C_AsyncReadyCallback
maybeCallback <- case Maybe AsyncReadyCallback
callback of
        Nothing -> FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return (Ptr Any -> FunPtr C_AsyncReadyCallback
forall a b. Ptr a -> FunPtr b
castPtrToFunPtr Ptr Any
forall a. Ptr a
nullPtr)
        Just jCallback :: AsyncReadyCallback
jCallback -> do
            Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback <- IO (Ptr (FunPtr C_AsyncReadyCallback))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (FunPtr Gio.Callbacks.C_AsyncReadyCallback))
            FunPtr C_AsyncReadyCallback
jCallback' <- C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
Gio.Callbacks.mk_AsyncReadyCallback (Maybe (Ptr (FunPtr C_AsyncReadyCallback))
-> AsyncReadyCallback_WithClosures -> C_AsyncReadyCallback
Gio.Callbacks.wrap_AsyncReadyCallback (Ptr (FunPtr C_AsyncReadyCallback)
-> Maybe (Ptr (FunPtr C_AsyncReadyCallback))
forall a. a -> Maybe a
Just Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback) (AsyncReadyCallback -> AsyncReadyCallback_WithClosures
Gio.Callbacks.drop_closures_AsyncReadyCallback AsyncReadyCallback
jCallback))
            Ptr (FunPtr C_AsyncReadyCallback)
-> FunPtr C_AsyncReadyCallback -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke Ptr (FunPtr C_AsyncReadyCallback)
ptrcallback FunPtr C_AsyncReadyCallback
jCallback'
            FunPtr C_AsyncReadyCallback -> IO (FunPtr C_AsyncReadyCallback)
forall (m :: * -> *) a. Monad m => a -> m a
return FunPtr C_AsyncReadyCallback
jCallback'
    let userData :: Ptr a
userData = Ptr a
forall a. Ptr a
nullPtr
    Ptr ProxyResolver
-> CString
-> Ptr Cancellable
-> FunPtr C_AsyncReadyCallback
-> Ptr ()
-> IO ()
g_proxy_resolver_lookup_async Ptr ProxyResolver
resolver' CString
uri' Ptr Cancellable
maybeCancellable FunPtr C_AsyncReadyCallback
maybeCallback Ptr ()
forall a. Ptr a
userData
    a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
resolver
    Maybe b -> (b -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe b
cancellable b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
    CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
    () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data ProxyResolverLookupAsyncMethodInfo
instance (signature ~ (T.Text -> Maybe (b) -> Maybe (Gio.Callbacks.AsyncReadyCallback) -> m ()), MonadIO m, IsProxyResolver a, Gio.Cancellable.IsCancellable b) => O.MethodInfo ProxyResolverLookupAsyncMethodInfo a signature where
    overloadedMethod = proxyResolverLookupAsync
#endif
foreign import ccall "g_proxy_resolver_lookup_finish" g_proxy_resolver_lookup_finish :: 
    Ptr ProxyResolver ->                    
    Ptr Gio.AsyncResult.AsyncResult ->      
    Ptr (Ptr GError) ->                     
    IO (Ptr CString)
proxyResolverLookupFinish ::
    (B.CallStack.HasCallStack, MonadIO m, IsProxyResolver a, Gio.AsyncResult.IsAsyncResult b) =>
    a
    
    -> b
    
    -> m [T.Text]
    
    
    
proxyResolverLookupFinish :: a -> b -> m [Text]
proxyResolverLookupFinish resolver :: a
resolver result_ :: b
result_ = IO [Text] -> m [Text]
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text]
forall a b. (a -> b) -> a -> b
$ do
    Ptr ProxyResolver
resolver' <- a -> IO (Ptr ProxyResolver)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
resolver
    Ptr AsyncResult
result_' <- b -> IO (Ptr AsyncResult)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
result_
    IO [Text] -> IO () -> IO [Text]
forall a b. IO a -> IO b -> IO a
onException (do
        Ptr CString
result <- (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a. (Ptr (Ptr GError) -> IO a) -> IO a
propagateGError ((Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString))
-> (Ptr (Ptr GError) -> IO (Ptr CString)) -> IO (Ptr CString)
forall a b. (a -> b) -> a -> b
$ Ptr ProxyResolver
-> Ptr AsyncResult -> Ptr (Ptr GError) -> IO (Ptr CString)
g_proxy_resolver_lookup_finish Ptr ProxyResolver
resolver' Ptr AsyncResult
result_'
        Text -> Ptr CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "proxyResolverLookupFinish" Ptr CString
result
        [Text]
result' <- HasCallStack => Ptr CString -> IO [Text]
Ptr CString -> IO [Text]
unpackZeroTerminatedUTF8CArray Ptr CString
result
        (CString -> IO ()) -> Ptr CString -> IO ()
forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO ()
mapZeroTerminatedCArray CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
        Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
result
        a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
resolver
        b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
result_
        [Text] -> IO [Text]
forall (m :: * -> *) a. Monad m => a -> m a
return [Text]
result'
     ) (do
        () -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
     )
#if defined(ENABLE_OVERLOADING)
data ProxyResolverLookupFinishMethodInfo
instance (signature ~ (b -> m [T.Text]), MonadIO m, IsProxyResolver a, Gio.AsyncResult.IsAsyncResult b) => O.MethodInfo ProxyResolverLookupFinishMethodInfo a signature where
    overloadedMethod = proxyResolverLookupFinish
#endif
foreign import ccall "g_proxy_resolver_get_default" g_proxy_resolver_get_default :: 
    IO (Ptr ProxyResolver)
proxyResolverGetDefault ::
    (B.CallStack.HasCallStack, MonadIO m) =>
    m ProxyResolver
    
proxyResolverGetDefault :: m ProxyResolver
proxyResolverGetDefault  = IO ProxyResolver -> m ProxyResolver
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ProxyResolver -> m ProxyResolver)
-> IO ProxyResolver -> m ProxyResolver
forall a b. (a -> b) -> a -> b
$ do
    Ptr ProxyResolver
result <- IO (Ptr ProxyResolver)
g_proxy_resolver_get_default
    Text -> Ptr ProxyResolver -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "proxyResolverGetDefault" Ptr ProxyResolver
result
    ProxyResolver
result' <- ((ManagedPtr ProxyResolver -> ProxyResolver)
-> Ptr ProxyResolver -> IO ProxyResolver
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
newObject ManagedPtr ProxyResolver -> ProxyResolver
ProxyResolver) Ptr ProxyResolver
result
    ProxyResolver -> IO ProxyResolver
forall (m :: * -> *) a. Monad m => a -> m a
return ProxyResolver
result'
#if defined(ENABLE_OVERLOADING)
#endif