static void constructed (GObject *object) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); priv->constructed = TRUE; }
static void soup_cookie_jar_init (SoupCookieJar *jar) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); priv->domains = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL); }
static void soup_cookie_jar_init (SoupCookieJar *jar) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); priv->domains = g_hash_table_new_full (soup_str_case_hash, soup_str_case_equal, g_free, NULL); priv->serials = g_hash_table_new (NULL, NULL); priv->accept_policy = SOUP_COOKIE_JAR_ACCEPT_ALWAYS; }
static void finalize (GObject *object) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); GHashTableIter iter; gpointer key, value; g_hash_table_iter_init (&iter, priv->domains); while (g_hash_table_iter_next (&iter, &key, &value)) soup_cookies_free (value); g_hash_table_destroy (priv->domains); G_OBJECT_CLASS (soup_cookie_jar_parent_class)->finalize (object); }
static void get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); switch (prop_id) { case PROP_READ_ONLY: g_value_set_boolean (value, priv->read_only); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
static void soup_cookie_jar_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (object); switch (prop_id) { case PROP_READ_ONLY: priv->read_only = g_value_get_boolean (value); break; case PROP_ACCEPT_POLICY: priv->accept_policy = g_value_get_enum (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); break; } }
soup_cookie_jar_new (void) { return g_object_new (SOUP_TYPE_COOKIE_JAR, NULL); } void soup_cookie_jar_save (SoupCookieJar *jar) { /* Does nothing, obsolete */ } static void soup_cookie_jar_changed (SoupCookieJar *jar, SoupCookie *old, SoupCookie *new) { SoupCookieJarPrivate *priv = SOUP_COOKIE_JAR_GET_PRIVATE (jar); if (priv->read_only || !priv->constructed) return; g_signal_emit (jar, signals[CHANGED], 0, old, new); } /** * soup_cookie_jar_get_cookies: * @jar: a #SoupCookieJar * @uri: a #SoupURI * @for_http: whether or not the return value is being passed directly * to an HTTP operation * * Retrieves (in Cookie-header form) the list of cookies that would