ewebkit2  1.11.0
Web engine based on WebKit2 for EFL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Typedefs | Enumerations | Functions
ewk_cookie_manager.h File Reference

Describes the Ewk Cookie Manager API. More...

#include <Eina.h>

Go to the source code of this file.

Typedefs

typedef struct EwkCookieManager Ewk_Cookie_Manager
 
typedef enum
Ewk_Cookie_Accept_Policy 
Ewk_Cookie_Accept_Policy
 Creates a type name for the Ewk_Cookie_Accept_Policy.
 
typedef enum
Ewk_Cookie_Persistent_Storage 
Ewk_Cookie_Persistent_Storage
 Creates a type name for the Ewk_Cookie_Persistent_Storage.
 
typedef void(* Ewk_Cookie_Manager_Policy_Async_Get_Cb )(Ewk_Cookie_Accept_Policy policy, void *event_info)
 Callback type for use with ewk_cookie_manager_accept_policy_async_get.
 
typedef void(* Ewk_Cookie_Manager_Hostnames_Async_Get_Cb )(Eina_List *hostnames, void *event_info)
 Callback type for use with ewk_cookie_manager_hostnames_with_cookies_async_get. More...
 
typedef void(* Ewk_Cookie_Manager_Changes_Watch_Cb )(void *event_info)
 Callback type for use with ewk_cookie_manager_changes_watch()
 

Enumerations

enum  Ewk_Cookie_Accept_Policy { EWK_COOKIE_ACCEPT_POLICY_ALWAYS, EWK_COOKIE_ACCEPT_POLICY_NEVER, EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY }
 Contains accept policies for the cookies. More...
 
enum  Ewk_Cookie_Persistent_Storage { EWK_COOKIE_PERSISTENT_STORAGE_TEXT, EWK_COOKIE_PERSISTENT_STORAGE_SQLITE }
 Enum values to denote cookies persistent storage type. More...
 

Functions

EAPI void ewk_cookie_manager_persistent_storage_set (Ewk_Cookie_Manager *manager, const char *filename, Ewk_Cookie_Persistent_Storage storage)
 
EAPI void ewk_cookie_manager_accept_policy_set (Ewk_Cookie_Manager *manager, Ewk_Cookie_Accept_Policy policy)
 
EAPI void ewk_cookie_manager_accept_policy_async_get (const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data)
 
EAPI void ewk_cookie_manager_hostnames_with_cookies_async_get (const Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Hostnames_Async_Get_Cb callback, void *data)
 
EAPI void ewk_cookie_manager_hostname_cookies_clear (Ewk_Cookie_Manager *manager, const char *hostname)
 
EAPI void ewk_cookie_manager_changes_watch (Ewk_Cookie_Manager *manager, Ewk_Cookie_Manager_Changes_Watch_Cb callback, void *data)
 
EAPI void ewk_cookie_manager_cookies_clear (Ewk_Cookie_Manager *manager)
 

Detailed Description

Describes the Ewk Cookie Manager API.

Typedef Documentation

typedef struct EwkCookieManager Ewk_Cookie_Manager

Creates a type name for Ewk_Cookie_Manager

Ewk_Cookie_Manager_Hostnames_Async_Get_Cb Ewk_Cookie_Manager_Hostnames_Async_Get_Cb

Callback type for use with ewk_cookie_manager_hostnames_with_cookies_async_get.

Note
The hostnames list items are guaranteed to be eina_stringshare. Whenever possible save yourself some cpu cycles and use eina_stringshare_ref() instead of eina_stringshare_add() or strdup().

Enumeration Type Documentation

Contains accept policies for the cookies.

Enumerator
EWK_COOKIE_ACCEPT_POLICY_ALWAYS 

Accepts every cookie sent from any page.

EWK_COOKIE_ACCEPT_POLICY_NEVER 

Rejects all cookies.

EWK_COOKIE_ACCEPT_POLICY_NO_THIRD_PARTY 

Accepts only cookies set by the main document loaded.

Enum values to denote cookies persistent storage type.

Enumerator
EWK_COOKIE_PERSISTENT_STORAGE_TEXT 

Cookies are stored in a text file in the Mozilla "cookies.txt" format.

EWK_COOKIE_PERSISTENT_STORAGE_SQLITE 

Cookies are stored in a SQLite file in the current Mozilla format.

Function Documentation

EAPI void ewk_cookie_manager_accept_policy_async_get ( const Ewk_Cookie_Manager manager,
Ewk_Cookie_Manager_Policy_Async_Get_Cb  callback,
void *  data 
)

Asynchronously get the cookie acceptance policy of manager.

By default, only cookies set by the main document loaded are accepted.

Parameters
managerEwk_Cookie_Manager object to query.
callbackThe function to call when the policy is received.
dataUser data (may be NULL).
EAPI void ewk_cookie_manager_accept_policy_set ( Ewk_Cookie_Manager manager,
Ewk_Cookie_Accept_Policy  policy 
)

Set policy as the cookie acceptance policy for manager.

By default, only cookies set by the main document loaded are accepted.

Parameters
managerEwk_Cookie_Manager object to update.
policya Ewk_Cookie_Accept_Policy
EAPI void ewk_cookie_manager_changes_watch ( Ewk_Cookie_Manager manager,
Ewk_Cookie_Manager_Changes_Watch_Cb  callback,
void *  data 
)

Watch for cookies changes in manager.

Pass NULL as value for callback to stop watching for changes.

Parameters
managerEwk_Cookie_Manager object to watch.
callbackfunction that will be called every time cookies are added, removed or modified.
dataUser data (may be NULL).
EAPI void ewk_cookie_manager_cookies_clear ( Ewk_Cookie_Manager manager)

Delete all cookies of manager.

Parameters
managerEwk_Cookie_Manager object to update.
EAPI void ewk_cookie_manager_hostname_cookies_clear ( Ewk_Cookie_Manager manager,
const char *  hostname 
)

Remove all cookies of manager for the given hostname.

Parameters
managerEwk_Cookie_Manager object to update.
hostnameA host name.
EAPI void ewk_cookie_manager_hostnames_with_cookies_async_get ( const Ewk_Cookie_Manager manager,
Ewk_Cookie_Manager_Hostnames_Async_Get_Cb  callback,
void *  data 
)

Asynchronously get the list of host names for which manager contains cookies.

Parameters
managerEwk_Cookie_Manager object to query.
callbackThe function to call when the host names have been received.
dataUser data (may be NULL).
EAPI void ewk_cookie_manager_persistent_storage_set ( Ewk_Cookie_Manager manager,
const char *  filename,
Ewk_Cookie_Persistent_Storage  storage 
)

Set the filename where non-session cookies are stored persistently using storage as the format to read/write the cookies.

Cookies are initially read from filename to create an initial set of cookies. Then, non-session cookies will be written to filename.

By default, manager doesn't store the cookies persistenly, so you need to call this method to keep cookies saved across sessions.

Parameters
managerEwk_Cookie_Manager object to update.
filenamethe filename to read to/write from.
storagethe type of storage.