WebKitCookieManager

WebKitCookieManager

Synopsis

struct              WebKitCookieManager;
enum                WebKitCookieAcceptPolicy;
void                webkit_cookie_manager_set_accept_policy
                                                        (WebKitCookieManager *cookie_manager,
                                                         WebKitCookieAcceptPolicy policy);
void                webkit_cookie_manager_get_accept_policy
                                                        (WebKitCookieManager *cookie_manager,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
WebKitCookieAcceptPolicy webkit_cookie_manager_get_accept_policy_finish
                                                        (WebKitCookieManager *cookie_manager,
                                                         GAsyncResult *result,
                                                         GError **error);
void                webkit_cookie_manager_get_domains_with_cookies
                                                        (WebKitCookieManager *cookie_manager,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);
gchar **            webkit_cookie_manager_get_domains_with_cookies_finish
                                                        (WebKitCookieManager *cookie_manager,
                                                         GAsyncResult *result,
                                                         GError **error);
void                webkit_cookie_manager_delete_cookies_for_domain
                                                        (WebKitCookieManager *cookie_manager,
                                                         const gchar *domain);
void                webkit_cookie_manager_delete_all_cookies
                                                        (WebKitCookieManager *cookie_manager);

Object Hierarchy

  GObject
   +----WebKitCookieManager

Signals

  "changed"                                        : Run Last

Description

Details

struct WebKitCookieManager

struct WebKitCookieManager;


enum WebKitCookieAcceptPolicy

typedef enum {
    WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS,
    WEBKIT_COOKIE_POLICY_ACCEPT_NEVER,
    WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY
} WebKitCookieAcceptPolicy;

Enum values used to denote the cookie acceptance policies.

WEBKIT_COOKIE_POLICY_ACCEPT_ALWAYS

Accept all cookies unconditionally.

WEBKIT_COOKIE_POLICY_ACCEPT_NEVER

Reject all cookies unconditionally.

WEBKIT_COOKIE_POLICY_ACCEPT_NO_THIRD_PARTY

Accept only cookies set by the main document loaded.

webkit_cookie_manager_set_accept_policy ()

void                webkit_cookie_manager_set_accept_policy
                                                        (WebKitCookieManager *cookie_manager,
                                                         WebKitCookieAcceptPolicy policy);

Set the cookie acceptance policy of cookie_manager as policy.

cookie_manager :

a WebKitCookieManager

policy :

a WebKitCookieAcceptPolicy

webkit_cookie_manager_get_accept_policy ()

void                webkit_cookie_manager_get_accept_policy
                                                        (WebKitCookieManager *cookie_manager,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously get the cookie acceptance policy of cookie_manager.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_get_accept_policy_finish() to get the result of the operation.

cookie_manager :

a WebKitCookieManager

cancellable :

a GCancellable or NULL to ignore. [allow-none]

callback :

a GAsyncReadyCallback to call when the request is satisfied. [scope async]

user_data :

the data to pass to callback function. [closure]

webkit_cookie_manager_get_accept_policy_finish ()

WebKitCookieAcceptPolicy webkit_cookie_manager_get_accept_policy_finish
                                                        (WebKitCookieManager *cookie_manager,
                                                         GAsyncResult *result,
                                                         GError **error);

Finish an asynchronous operation started with webkit_cookie_manager_get_accept_policy().

cookie_manager :

a WebKitCookieManager

result :

a GAsyncResult

error :

return location for error or NULL to ignore

Returns :

the cookie acceptance policy of cookie_manager as a WebKitCookieAcceptPolicy.

webkit_cookie_manager_get_domains_with_cookies ()

void                webkit_cookie_manager_get_domains_with_cookies
                                                        (WebKitCookieManager *cookie_manager,
                                                         GCancellable *cancellable,
                                                         GAsyncReadyCallback callback,
                                                         gpointer user_data);

Asynchronously get the list of domains for which cookie_manager contains cookies.

When the operation is finished, callback will be called. You can then call webkit_cookie_manager_get_domains_with_cookies_finish() to get the result of the operation.

cookie_manager :

a WebKitCookieManager

cancellable :

a GCancellable or NULL to ignore. [allow-none]

callback :

a GAsyncReadyCallback to call when the request is satisfied. [scope async]

user_data :

the data to pass to callback function. [closure]

webkit_cookie_manager_get_domains_with_cookies_finish ()

gchar **            webkit_cookie_manager_get_domains_with_cookies_finish
                                                        (WebKitCookieManager *cookie_manager,
                                                         GAsyncResult *result,
                                                         GError **error);

Finish an asynchronous operation started with webkit_cookie_manager_get_domains_with_cookies(). The return value is a NULL terminated list of strings which should be released with g_strfreev().

cookie_manager :

a WebKitCookieManager

result :

a GAsyncResult

error :

return location for error or NULL to ignore

Returns :

A NULL terminated array of domain names or NULL in case of error. [transfer full][array zero-terminated=1]

webkit_cookie_manager_delete_cookies_for_domain ()

void                webkit_cookie_manager_delete_cookies_for_domain
                                                        (WebKitCookieManager *cookie_manager,
                                                         const gchar *domain);

Remove all cookies of cookie_manager for the given domain.

cookie_manager :

a WebKitCookieManager

domain :

a domain name

webkit_cookie_manager_delete_all_cookies ()

void                webkit_cookie_manager_delete_all_cookies
                                                        (WebKitCookieManager *cookie_manager);

Delete all cookies of cookie_manager

cookie_manager :

a WebKitCookieManager

Signal Details

The "changed" signal

void                user_function                      (WebKitCookieManager *cookie_manager,
                                                        gpointer             user_data)           : Run Last

This signal is emitted when cookies are added, removed or modified.

cookie_manager :

the WebKitCookieManager

user_data :

user data set when the signal handler was connected.