| WebKit2GTK+ Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Signals | ||||
WebKitCookieManagerWebKitCookieManager — Defines how to handle cookies in a WebKitWebContext  | 
struct WebKitCookieManager; enum WebKitCookiePersistentStorage; enum WebKitCookieAcceptPolicy; void webkit_cookie_manager_set_persistent_storage (WebKitCookieManager *cookie_manager,const gchar *filename,WebKitCookiePersistentStorage storage); 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);
The WebKitCookieManager defines how to handle cookies in a
WebKitWebContext. Get it from the context with
webkit_web_context_get_cookie_manager(), and use it to set where to
store cookies, with webkit_cookie_manager_set_persistent_storage(),
to get the list of domains with cookies, with
webkit_cookie_manager_get_domains_with_cookies(), or to set the
acceptance policy, with webkit_cookie_manager_get_accept_policy()
(among other actions).
typedef enum {
    WEBKIT_COOKIE_PERSISTENT_STORAGE_TEXT,
    WEBKIT_COOKIE_PERSISTENT_STORAGE_SQLITE
} WebKitCookiePersistentStorage;
Enum values used to denote the cookie persistent storage types.
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.
void webkit_cookie_manager_set_persistent_storage (WebKitCookieManager *cookie_manager,const gchar *filename,WebKitCookiePersistentStorage 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 when the WebKitCookieManager::changed
signal is emitted.
By default, cookie_manager doesn't store the cookies persistenly, so you need to call this
method to keep cookies saved across sessions.
  | 
a WebKitCookieManager | 
  | 
the filename to read to/write from | 
  | 
a WebKitCookiePersistentStorage | 
void webkit_cookie_manager_set_accept_policy (WebKitCookieManager *cookie_manager,WebKitCookieAcceptPolicy policy);
Set the cookie acceptance policy of cookie_manager as policy.
  | 
a WebKitCookieManager | 
  | 
a WebKitCookieAcceptPolicy | 
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.
  | 
a WebKitCookieManager | 
  | 
a GCancellable or NULL to ignore. [allow-none]
 | 
  | 
a GAsyncReadyCallback to call when the request is satisfied. [scope async] | 
  | 
the data to pass to callback function. [closure] | 
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().
  | 
a WebKitCookieManager | 
  | 
a GAsyncResult | 
  | 
return location for error or NULL to ignore | 
Returns :  | 
the cookie acceptance policy of cookie_manager as a WebKitCookieAcceptPolicy. | 
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.
  | 
a WebKitCookieManager | 
  | 
a GCancellable or NULL to ignore. [allow-none]
 | 
  | 
a GAsyncReadyCallback to call when the request is satisfied. [scope async] | 
  | 
the data to pass to callback function. [closure] | 
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().
  | 
a WebKitCookieManager | 
  | 
a GAsyncResult | 
  | 
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]
 | 
void webkit_cookie_manager_delete_cookies_for_domain (WebKitCookieManager *cookie_manager,const gchar *domain);
Remove all cookies of cookie_manager for the given domain.
  | 
a WebKitCookieManager | 
  | 
a domain name | 
void                webkit_cookie_manager_delete_all_cookies
                                                        (WebKitCookieManager *cookie_manager);
Delete all cookies of cookie_manager
  | 
a WebKitCookieManager | 
"changed" signalvoid                user_function                      (WebKitCookieManager *cookie_manager,
                                                        gpointer             user_data)           : Run Last
This signal is emitted when cookies are added, removed or modified.
  | 
the WebKitCookieManager | 
  | 
user data set when the signal handler was connected. |