{- |
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.WebKit.Objects.DOMDOMApplicationCache
    ( 

-- * Exported types
    DOMDOMApplicationCache(..)              ,
    IsDOMDOMApplicationCache                ,
    toDOMDOMApplicationCache                ,
    noDOMDOMApplicationCache                ,


 -- * Methods
-- ** abort #method:abort#
    DOMDOMApplicationCacheAbortMethodInfo   ,
    dOMDOMApplicationCacheAbort             ,


-- ** dispatchEvent #method:dispatchEvent#
    DOMDOMApplicationCacheDispatchEventMethodInfo,
    dOMDOMApplicationCacheDispatchEvent     ,


-- ** getStatus #method:getStatus#
    DOMDOMApplicationCacheGetStatusMethodInfo,
    dOMDOMApplicationCacheGetStatus         ,


-- ** swapCache #method:swapCache#
    DOMDOMApplicationCacheSwapCacheMethodInfo,
    dOMDOMApplicationCacheSwapCache         ,


-- ** update #method:update#
    DOMDOMApplicationCacheUpdateMethodInfo  ,
    dOMDOMApplicationCacheUpdate            ,




 -- * Properties
-- ** status #attr:status#
    DOMDOMApplicationCacheStatusPropertyInfo,
    dOMDOMApplicationCacheStatus            ,
    getDOMDOMApplicationCacheStatus         ,




    ) 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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 GI.GObject.Objects.Object as GObject.Object
import {-# SOURCE #-} qualified GI.WebKit.Interfaces.DOMEventTarget as WebKit.DOMEventTarget
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMEvent as WebKit.DOMEvent
import {-# SOURCE #-} qualified GI.WebKit.Objects.DOMObject as WebKit.DOMObject

newtype DOMDOMApplicationCache = DOMDOMApplicationCache (ManagedPtr DOMDOMApplicationCache)
foreign import ccall "webkit_dom_dom_application_cache_get_type"
    c_webkit_dom_dom_application_cache_get_type :: IO GType

instance GObject DOMDOMApplicationCache where
    gobjectType _ = c_webkit_dom_dom_application_cache_get_type
    

class GObject o => IsDOMDOMApplicationCache o
#if MIN_VERSION_base(4,9,0)
instance {-# OVERLAPPABLE #-} (GObject a, O.UnknownAncestorError DOMDOMApplicationCache a) =>
    IsDOMDOMApplicationCache a
#endif
instance IsDOMDOMApplicationCache DOMDOMApplicationCache
instance WebKit.DOMObject.IsDOMObject DOMDOMApplicationCache
instance GObject.Object.IsObject DOMDOMApplicationCache
instance WebKit.DOMEventTarget.IsDOMEventTarget DOMDOMApplicationCache

toDOMDOMApplicationCache :: IsDOMDOMApplicationCache o => o -> IO DOMDOMApplicationCache
toDOMDOMApplicationCache = unsafeCastTo DOMDOMApplicationCache

noDOMDOMApplicationCache :: Maybe DOMDOMApplicationCache
noDOMDOMApplicationCache = Nothing

type family ResolveDOMDOMApplicationCacheMethod (t :: Symbol) (o :: *) :: * where
    ResolveDOMDOMApplicationCacheMethod "abort" o = DOMDOMApplicationCacheAbortMethodInfo
    ResolveDOMDOMApplicationCacheMethod "addEventListener" o = WebKit.DOMEventTarget.DOMEventTargetAddEventListenerMethodInfo
    ResolveDOMDOMApplicationCacheMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
    ResolveDOMDOMApplicationCacheMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
    ResolveDOMDOMApplicationCacheMethod "dispatchEvent" o = DOMDOMApplicationCacheDispatchEventMethodInfo
    ResolveDOMDOMApplicationCacheMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
    ResolveDOMDOMApplicationCacheMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
    ResolveDOMDOMApplicationCacheMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
    ResolveDOMDOMApplicationCacheMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
    ResolveDOMDOMApplicationCacheMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
    ResolveDOMDOMApplicationCacheMethod "ref" o = GObject.Object.ObjectRefMethodInfo
    ResolveDOMDOMApplicationCacheMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
    ResolveDOMDOMApplicationCacheMethod "removeEventListener" o = WebKit.DOMEventTarget.DOMEventTargetRemoveEventListenerMethodInfo
    ResolveDOMDOMApplicationCacheMethod "replaceData" o = GObject.Object.ObjectReplaceDataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "replaceQdata" o = GObject.Object.ObjectReplaceQdataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
    ResolveDOMDOMApplicationCacheMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "swapCache" o = DOMDOMApplicationCacheSwapCacheMethodInfo
    ResolveDOMDOMApplicationCacheMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
    ResolveDOMDOMApplicationCacheMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
    ResolveDOMDOMApplicationCacheMethod "update" o = DOMDOMApplicationCacheUpdateMethodInfo
    ResolveDOMDOMApplicationCacheMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
    ResolveDOMDOMApplicationCacheMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
    ResolveDOMDOMApplicationCacheMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "getStatus" o = DOMDOMApplicationCacheGetStatusMethodInfo
    ResolveDOMDOMApplicationCacheMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
    ResolveDOMDOMApplicationCacheMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
    ResolveDOMDOMApplicationCacheMethod l o = O.MethodResolutionFailed l o

instance (info ~ ResolveDOMDOMApplicationCacheMethod t DOMDOMApplicationCache, O.MethodInfo info DOMDOMApplicationCache p) => O.IsLabelProxy t (DOMDOMApplicationCache -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveDOMDOMApplicationCacheMethod t DOMDOMApplicationCache, O.MethodInfo info DOMDOMApplicationCache p) => O.IsLabel t (DOMDOMApplicationCache -> p) where
    fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif

-- VVV Prop "status"
   -- Type: TBasicType TUInt
   -- Flags: [PropertyReadable]
   -- Nullable: (Nothing,Nothing)

getDOMDOMApplicationCacheStatus :: (MonadIO m, IsDOMDOMApplicationCache o) => o -> m Word32
getDOMDOMApplicationCacheStatus obj = liftIO $ getObjectPropertyUInt32 obj "status"

data DOMDOMApplicationCacheStatusPropertyInfo
instance AttrInfo DOMDOMApplicationCacheStatusPropertyInfo where
    type AttrAllowedOps DOMDOMApplicationCacheStatusPropertyInfo = '[ 'AttrGet]
    type AttrSetTypeConstraint DOMDOMApplicationCacheStatusPropertyInfo = (~) ()
    type AttrBaseTypeConstraint DOMDOMApplicationCacheStatusPropertyInfo = IsDOMDOMApplicationCache
    type AttrGetType DOMDOMApplicationCacheStatusPropertyInfo = Word32
    type AttrLabel DOMDOMApplicationCacheStatusPropertyInfo = "status"
    type AttrOrigin DOMDOMApplicationCacheStatusPropertyInfo = DOMDOMApplicationCache
    attrGet _ = getDOMDOMApplicationCacheStatus
    attrSet _ = undefined
    attrConstruct _ = undefined
    attrClear _ = undefined

instance O.HasAttributeList DOMDOMApplicationCache
type instance O.AttributeList DOMDOMApplicationCache = DOMDOMApplicationCacheAttributeList
type DOMDOMApplicationCacheAttributeList = ('[ '("coreObject", WebKit.DOMObject.DOMObjectCoreObjectPropertyInfo), '("status", DOMDOMApplicationCacheStatusPropertyInfo)] :: [(Symbol, *)])

dOMDOMApplicationCacheStatus :: AttrLabelProxy "status"
dOMDOMApplicationCacheStatus = AttrLabelProxy

type instance O.SignalList DOMDOMApplicationCache = DOMDOMApplicationCacheSignalList
type DOMDOMApplicationCacheSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])

-- method DOMDOMApplicationCache::abort
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMApplicationCache", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_application_cache_abort" webkit_dom_dom_application_cache_abort :: 
    Ptr DOMDOMApplicationCache ->           -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"})
    IO ()

{- |
/No description available in the introspection data./
-}
dOMDOMApplicationCacheAbort ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMApplicationCache a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMApplicationCache.DOMDOMApplicationCache' -}
    -> m ()
dOMDOMApplicationCacheAbort self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    webkit_dom_dom_application_cache_abort self'
    touchManagedPtr self
    return ()

data DOMDOMApplicationCacheAbortMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMApplicationCache a) => O.MethodInfo DOMDOMApplicationCacheAbortMethodInfo a signature where
    overloadedMethod _ = dOMDOMApplicationCacheAbort

-- method DOMDOMApplicationCache::dispatch_event
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMApplicationCache", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "evt", argType = TInterface (Name {namespace = "WebKit", name = "DOMEvent"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMEvent", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_dom_application_cache_dispatch_event" webkit_dom_dom_application_cache_dispatch_event :: 
    Ptr DOMDOMApplicationCache ->           -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"})
    Ptr WebKit.DOMEvent.DOMEvent ->         -- evt : TInterface (Name {namespace = "WebKit", name = "DOMEvent"})
    Ptr (Ptr GError) ->                     -- error
    IO CInt

{-# DEPRECATED dOMDOMApplicationCacheDispatchEvent ["(Since version 2.4)","Use 'GI.WebKit.Interfaces.DOMEventTarget.dOMEventTargetDispatchEvent' instead."] #-}
{- |
/No description available in the introspection data./
-}
dOMDOMApplicationCacheDispatchEvent ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMApplicationCache a, WebKit.DOMEvent.IsDOMEvent b) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMApplicationCache.DOMDOMApplicationCache' -}
    -> b
    {- ^ /@evt@/: A 'GI.WebKit.Objects.DOMEvent.DOMEvent' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMApplicationCacheDispatchEvent self evt = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    evt' <- unsafeManagedPtrCastPtr evt
    onException (do
        _ <- propagateGError $ webkit_dom_dom_application_cache_dispatch_event self' evt'
        touchManagedPtr self
        touchManagedPtr evt
        return ()
     ) (do
        return ()
     )

data DOMDOMApplicationCacheDispatchEventMethodInfo
instance (signature ~ (b -> m ()), MonadIO m, IsDOMDOMApplicationCache a, WebKit.DOMEvent.IsDOMEvent b) => O.MethodInfo DOMDOMApplicationCacheDispatchEventMethodInfo a signature where
    overloadedMethod _ = dOMDOMApplicationCacheDispatchEvent

-- method DOMDOMApplicationCache::get_status
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMApplicationCache", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt16)
-- throws : False
-- Skip return : False

foreign import ccall "webkit_dom_dom_application_cache_get_status" webkit_dom_dom_application_cache_get_status :: 
    Ptr DOMDOMApplicationCache ->           -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"})
    IO Word16

{- |
/No description available in the introspection data./
-}
dOMDOMApplicationCacheGetStatus ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMApplicationCache a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMApplicationCache.DOMDOMApplicationCache' -}
    -> m Word16
    {- ^ __Returns:__ A @/gushort/@ -}
dOMDOMApplicationCacheGetStatus self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    result <- webkit_dom_dom_application_cache_get_status self'
    touchManagedPtr self
    return result

data DOMDOMApplicationCacheGetStatusMethodInfo
instance (signature ~ (m Word16), MonadIO m, IsDOMDOMApplicationCache a) => O.MethodInfo DOMDOMApplicationCacheGetStatusMethodInfo a signature where
    overloadedMethod _ = dOMDOMApplicationCacheGetStatus

-- method DOMDOMApplicationCache::swap_cache
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMApplicationCache", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_dom_application_cache_swap_cache" webkit_dom_dom_application_cache_swap_cache :: 
    Ptr DOMDOMApplicationCache ->           -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"})
    Ptr (Ptr GError) ->                     -- error
    IO ()

{- |
/No description available in the introspection data./
-}
dOMDOMApplicationCacheSwapCache ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMApplicationCache a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMApplicationCache.DOMDOMApplicationCache' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMApplicationCacheSwapCache self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    onException (do
        propagateGError $ webkit_dom_dom_application_cache_swap_cache self'
        touchManagedPtr self
        return ()
     ) (do
        return ()
     )

data DOMDOMApplicationCacheSwapCacheMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMApplicationCache a) => O.MethodInfo DOMDOMApplicationCacheSwapCacheMethodInfo a signature where
    overloadedMethod _ = dOMDOMApplicationCacheSwapCache

-- method DOMDOMApplicationCache::update
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "self", argType = TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #WebKitDOMDOMApplicationCache", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : True
-- Skip return : False

foreign import ccall "webkit_dom_dom_application_cache_update" webkit_dom_dom_application_cache_update :: 
    Ptr DOMDOMApplicationCache ->           -- self : TInterface (Name {namespace = "WebKit", name = "DOMDOMApplicationCache"})
    Ptr (Ptr GError) ->                     -- error
    IO ()

{- |
/No description available in the introspection data./
-}
dOMDOMApplicationCacheUpdate ::
    (B.CallStack.HasCallStack, MonadIO m, IsDOMDOMApplicationCache a) =>
    a
    {- ^ /@self@/: A 'GI.WebKit.Objects.DOMDOMApplicationCache.DOMDOMApplicationCache' -}
    -> m ()
    {- ^ /(Can throw 'Data.GI.Base.GError.GError')/ -}
dOMDOMApplicationCacheUpdate self = liftIO $ do
    self' <- unsafeManagedPtrCastPtr self
    onException (do
        propagateGError $ webkit_dom_dom_application_cache_update self'
        touchManagedPtr self
        return ()
     ) (do
        return ()
     )

data DOMDOMApplicationCacheUpdateMethodInfo
instance (signature ~ (m ()), MonadIO m, IsDOMDOMApplicationCache a) => O.MethodInfo DOMDOMApplicationCacheUpdateMethodInfo a signature where
    overloadedMethod _ = dOMDOMApplicationCacheUpdate