Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Data stored locally by a web site.
WebKitWebsiteData represents data stored in the client by a particular website.
A website is normally a set of URLs grouped by domain name. You can get the website name,
which is usually the domain, with websiteDataGetName
.
Documents loaded from the file system, like file:// URIs, are all grouped in the same WebKitWebsiteData
with the name "Local files".
A website can store different types of data in the client side. WebsiteDataTypes
is an enum containing
all the possible data types; use websiteDataGetTypes
to get the bitmask of data types.
It's also possible to know the size of the data stored for some of the WebsiteDataTypes
by using
websiteDataGetSize
.
A list of WebKitWebsiteData can be retrieved with websiteDataManagerFetch
. See WebsiteDataManager
for more information.
Since: 2.16
Synopsis
- newtype WebsiteData = WebsiteData (ManagedPtr WebsiteData)
- websiteDataGetName :: (HasCallStack, MonadIO m) => WebsiteData -> m Text
- websiteDataGetSize :: (HasCallStack, MonadIO m) => WebsiteData -> [WebsiteDataTypes] -> m Word64
- websiteDataGetTypes :: (HasCallStack, MonadIO m) => WebsiteData -> m [WebsiteDataTypes]
- websiteDataRef :: (HasCallStack, MonadIO m) => WebsiteData -> m WebsiteData
- websiteDataUnref :: (HasCallStack, MonadIO m) => WebsiteData -> m ()
Exported types
newtype WebsiteData Source #
Memory-managed wrapper type.
WebsiteData (ManagedPtr WebsiteData) |
Instances
Eq WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData (==) :: WebsiteData -> WebsiteData -> Bool # (/=) :: WebsiteData -> WebsiteData -> Bool # | |
GBoxed WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData | |
ManagedPtrNewtype WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData toManagedPtr :: WebsiteData -> ManagedPtr WebsiteData | |
TypedObject WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData | |
HasParentTypes WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData | |
IsGValue (Maybe WebsiteData) Source # | Convert |
Defined in GI.WebKit2.Structs.WebsiteData gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe WebsiteData -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe WebsiteData) | |
type ParentTypes WebsiteData Source # | |
Defined in GI.WebKit2.Structs.WebsiteData |
Methods
Click to display all available methods, including inherited ones
getName
:: (HasCallStack, MonadIO m) | |
=> WebsiteData |
|
-> m Text | Returns: the website name of |
Gets the name of WebsiteData
.
This is the website name, normally represented by
a domain or host name. All local documents are grouped in the same WebsiteData
using
the name "Local files".
Since: 2.16
getSize
:: (HasCallStack, MonadIO m) | |
=> WebsiteData |
|
-> [WebsiteDataTypes] |
|
-> m Word64 | Returns: the size of |
Gets the size of the data of types types
in a WebsiteData
.
Note that currently the data size is only known for WebsiteDataTypesDiskCache
data type
so for all other types 0 will be returned.
Since: 2.16
getTypes
:: (HasCallStack, MonadIO m) | |
=> WebsiteData |
|
-> m [WebsiteDataTypes] | Returns: a bitmask of |
Gets the types of data stored in the client for a WebsiteData
.
These are the
types actually present, not the types queried with websiteDataManagerFetch
.
Since: 2.16
ref
:: (HasCallStack, MonadIO m) | |
=> WebsiteData |
|
-> m WebsiteData | Returns: The passed |
Atomically increments the reference count of websiteData
by one.
This function is MT-safe and may be called from any thread.
Since: 2.16
unref
:: (HasCallStack, MonadIO m) | |
=> WebsiteData |
|
-> m () |
Atomically decrements the reference count of websiteData
by one.
If the reference count drops to 0, all memory allocated by
WebsiteData
is released. This function is MT-safe and may be
called from any thread.
Since: 2.16