#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.WebKit2.Objects.ResponsePolicyDecision
(
ResponsePolicyDecision(..) ,
IsResponsePolicyDecision ,
toResponsePolicyDecision ,
noResponsePolicyDecision ,
#if ENABLE_OVERLOADING
ResponsePolicyDecisionGetRequestMethodInfo,
#endif
responsePolicyDecisionGetRequest ,
#if ENABLE_OVERLOADING
ResponsePolicyDecisionGetResponseMethodInfo,
#endif
responsePolicyDecisionGetResponse ,
#if ENABLE_OVERLOADING
ResponsePolicyDecisionIsMimeTypeSupportedMethodInfo,
#endif
responsePolicyDecisionIsMimeTypeSupported,
#if ENABLE_OVERLOADING
ResponsePolicyDecisionRequestPropertyInfo,
#endif
getResponsePolicyDecisionRequest ,
#if ENABLE_OVERLOADING
responsePolicyDecisionRequest ,
#endif
#if ENABLE_OVERLOADING
ResponsePolicyDecisionResponsePropertyInfo,
#endif
getResponsePolicyDecisionResponse ,
#if ENABLE_OVERLOADING
responsePolicyDecisionResponse ,
#endif
) 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.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 {-# SOURCE #-} qualified GI.WebKit2.Objects.PolicyDecision as WebKit2.PolicyDecision
import {-# SOURCE #-} qualified GI.WebKit2.Objects.URIRequest as WebKit2.URIRequest
import {-# SOURCE #-} qualified GI.WebKit2.Objects.URIResponse as WebKit2.URIResponse
newtype ResponsePolicyDecision = ResponsePolicyDecision (ManagedPtr ResponsePolicyDecision)
foreign import ccall "webkit_response_policy_decision_get_type"
c_webkit_response_policy_decision_get_type :: IO GType
instance GObject ResponsePolicyDecision where
gobjectType = c_webkit_response_policy_decision_get_type
class (GObject o, O.IsDescendantOf ResponsePolicyDecision o) => IsResponsePolicyDecision o
instance (GObject o, O.IsDescendantOf ResponsePolicyDecision o) => IsResponsePolicyDecision o
instance O.HasParentTypes ResponsePolicyDecision
type instance O.ParentTypes ResponsePolicyDecision = '[WebKit2.PolicyDecision.PolicyDecision, GObject.Object.Object]
toResponsePolicyDecision :: (MonadIO m, IsResponsePolicyDecision o) => o -> m ResponsePolicyDecision
toResponsePolicyDecision = liftIO . unsafeCastTo ResponsePolicyDecision
noResponsePolicyDecision :: Maybe ResponsePolicyDecision
noResponsePolicyDecision = Nothing
#if ENABLE_OVERLOADING
type family ResolveResponsePolicyDecisionMethod (t :: Symbol) (o :: *) :: * where
ResolveResponsePolicyDecisionMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveResponsePolicyDecisionMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveResponsePolicyDecisionMethod "download" o = WebKit2.PolicyDecision.PolicyDecisionDownloadMethodInfo
ResolveResponsePolicyDecisionMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveResponsePolicyDecisionMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveResponsePolicyDecisionMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveResponsePolicyDecisionMethod "ignore" o = WebKit2.PolicyDecision.PolicyDecisionIgnoreMethodInfo
ResolveResponsePolicyDecisionMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveResponsePolicyDecisionMethod "isMimeTypeSupported" o = ResponsePolicyDecisionIsMimeTypeSupportedMethodInfo
ResolveResponsePolicyDecisionMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveResponsePolicyDecisionMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveResponsePolicyDecisionMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveResponsePolicyDecisionMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveResponsePolicyDecisionMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveResponsePolicyDecisionMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveResponsePolicyDecisionMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveResponsePolicyDecisionMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveResponsePolicyDecisionMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveResponsePolicyDecisionMethod "use" o = WebKit2.PolicyDecision.PolicyDecisionUseMethodInfo
ResolveResponsePolicyDecisionMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveResponsePolicyDecisionMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveResponsePolicyDecisionMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveResponsePolicyDecisionMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveResponsePolicyDecisionMethod "getRequest" o = ResponsePolicyDecisionGetRequestMethodInfo
ResolveResponsePolicyDecisionMethod "getResponse" o = ResponsePolicyDecisionGetResponseMethodInfo
ResolveResponsePolicyDecisionMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveResponsePolicyDecisionMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveResponsePolicyDecisionMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveResponsePolicyDecisionMethod t ResponsePolicyDecision, O.MethodInfo info ResponsePolicyDecision p) => OL.IsLabel t (ResponsePolicyDecision -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
getResponsePolicyDecisionRequest :: (MonadIO m, IsResponsePolicyDecision o) => o -> m WebKit2.URIRequest.URIRequest
getResponsePolicyDecisionRequest obj = liftIO $ checkUnexpectedNothing "getResponsePolicyDecisionRequest" $ B.Properties.getObjectPropertyObject obj "request" WebKit2.URIRequest.URIRequest
#if ENABLE_OVERLOADING
data ResponsePolicyDecisionRequestPropertyInfo
instance AttrInfo ResponsePolicyDecisionRequestPropertyInfo where
type AttrAllowedOps ResponsePolicyDecisionRequestPropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ResponsePolicyDecisionRequestPropertyInfo = (~) ()
type AttrBaseTypeConstraint ResponsePolicyDecisionRequestPropertyInfo = IsResponsePolicyDecision
type AttrGetType ResponsePolicyDecisionRequestPropertyInfo = WebKit2.URIRequest.URIRequest
type AttrLabel ResponsePolicyDecisionRequestPropertyInfo = "request"
type AttrOrigin ResponsePolicyDecisionRequestPropertyInfo = ResponsePolicyDecision
attrGet _ = getResponsePolicyDecisionRequest
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
getResponsePolicyDecisionResponse :: (MonadIO m, IsResponsePolicyDecision o) => o -> m WebKit2.URIResponse.URIResponse
getResponsePolicyDecisionResponse obj = liftIO $ checkUnexpectedNothing "getResponsePolicyDecisionResponse" $ B.Properties.getObjectPropertyObject obj "response" WebKit2.URIResponse.URIResponse
#if ENABLE_OVERLOADING
data ResponsePolicyDecisionResponsePropertyInfo
instance AttrInfo ResponsePolicyDecisionResponsePropertyInfo where
type AttrAllowedOps ResponsePolicyDecisionResponsePropertyInfo = '[ 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint ResponsePolicyDecisionResponsePropertyInfo = (~) ()
type AttrBaseTypeConstraint ResponsePolicyDecisionResponsePropertyInfo = IsResponsePolicyDecision
type AttrGetType ResponsePolicyDecisionResponsePropertyInfo = WebKit2.URIResponse.URIResponse
type AttrLabel ResponsePolicyDecisionResponsePropertyInfo = "response"
type AttrOrigin ResponsePolicyDecisionResponsePropertyInfo = ResponsePolicyDecision
attrGet _ = getResponsePolicyDecisionResponse
attrSet _ = undefined
attrConstruct _ = undefined
attrClear _ = undefined
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList ResponsePolicyDecision
type instance O.AttributeList ResponsePolicyDecision = ResponsePolicyDecisionAttributeList
type ResponsePolicyDecisionAttributeList = ('[ '("request", ResponsePolicyDecisionRequestPropertyInfo), '("response", ResponsePolicyDecisionResponsePropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
responsePolicyDecisionRequest :: AttrLabelProxy "request"
responsePolicyDecisionRequest = AttrLabelProxy
responsePolicyDecisionResponse :: AttrLabelProxy "response"
responsePolicyDecisionResponse = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList ResponsePolicyDecision = ResponsePolicyDecisionSignalList
type ResponsePolicyDecisionSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "webkit_response_policy_decision_get_request" webkit_response_policy_decision_get_request ::
Ptr ResponsePolicyDecision ->
IO (Ptr WebKit2.URIRequest.URIRequest)
responsePolicyDecisionGetRequest ::
(B.CallStack.HasCallStack, MonadIO m, IsResponsePolicyDecision a) =>
a
-> m WebKit2.URIRequest.URIRequest
responsePolicyDecisionGetRequest decision = liftIO $ do
decision' <- unsafeManagedPtrCastPtr decision
result <- webkit_response_policy_decision_get_request decision'
checkUnexpectedReturnNULL "responsePolicyDecisionGetRequest" result
result' <- (newObject WebKit2.URIRequest.URIRequest) result
touchManagedPtr decision
return result'
#if ENABLE_OVERLOADING
data ResponsePolicyDecisionGetRequestMethodInfo
instance (signature ~ (m WebKit2.URIRequest.URIRequest), MonadIO m, IsResponsePolicyDecision a) => O.MethodInfo ResponsePolicyDecisionGetRequestMethodInfo a signature where
overloadedMethod _ = responsePolicyDecisionGetRequest
#endif
foreign import ccall "webkit_response_policy_decision_get_response" webkit_response_policy_decision_get_response ::
Ptr ResponsePolicyDecision ->
IO (Ptr WebKit2.URIResponse.URIResponse)
responsePolicyDecisionGetResponse ::
(B.CallStack.HasCallStack, MonadIO m, IsResponsePolicyDecision a) =>
a
-> m WebKit2.URIResponse.URIResponse
responsePolicyDecisionGetResponse decision = liftIO $ do
decision' <- unsafeManagedPtrCastPtr decision
result <- webkit_response_policy_decision_get_response decision'
checkUnexpectedReturnNULL "responsePolicyDecisionGetResponse" result
result' <- (newObject WebKit2.URIResponse.URIResponse) result
touchManagedPtr decision
return result'
#if ENABLE_OVERLOADING
data ResponsePolicyDecisionGetResponseMethodInfo
instance (signature ~ (m WebKit2.URIResponse.URIResponse), MonadIO m, IsResponsePolicyDecision a) => O.MethodInfo ResponsePolicyDecisionGetResponseMethodInfo a signature where
overloadedMethod _ = responsePolicyDecisionGetResponse
#endif
foreign import ccall "webkit_response_policy_decision_is_mime_type_supported" webkit_response_policy_decision_is_mime_type_supported ::
Ptr ResponsePolicyDecision ->
IO CInt
responsePolicyDecisionIsMimeTypeSupported ::
(B.CallStack.HasCallStack, MonadIO m, IsResponsePolicyDecision a) =>
a
-> m Bool
responsePolicyDecisionIsMimeTypeSupported decision = liftIO $ do
decision' <- unsafeManagedPtrCastPtr decision
result <- webkit_response_policy_decision_is_mime_type_supported decision'
let result' = (/= 0) result
touchManagedPtr decision
return result'
#if ENABLE_OVERLOADING
data ResponsePolicyDecisionIsMimeTypeSupportedMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsResponsePolicyDecision a) => O.MethodInfo ResponsePolicyDecisionIsMimeTypeSupportedMethodInfo a signature where
overloadedMethod _ = responsePolicyDecisionIsMimeTypeSupported
#endif