Method

SoupCookieJarDBset_max_size

unstable since: 3.8

Declaration [src]

gboolean
soup_cookie_jar_db_set_max_size (
  SoupCookieJarDB* jar,
  guint64 max_size,
  GError** error
)

Description [src]

Set the maximum size for the database file storage

If max_size is 0, it means “no limit”, in which case the database file size will be limited only by the database capabilities / intrinsic limits.

If max_size has a higher limit than supported by the database, the max_size will be internally set to the limit supported by the database.

The max_size will be internally truncated to a multiple of the database page size. If the page size is, for example, 4K, setting a max size of 10K will effectively limit the database size to 8K to ensure it does not grow beyond the specified limit.

Attempting to set a limit that is less than the already used database file storage will NOT truncate the database, but won’t allow the database to grow further in size (although writes might be still accepted within the already allocated space).

This value does not persist in the database. Each construction of this class must set the property again or it will use the default value.

Available since: 3.8

Parameters

max_size

Type: guint64

Max database file size, in bytes error A GError.

error

Type: GError **

The return location for a recoverable error.

The argument can be NULL.
If the return location is not NULL, then you must initialize it to a NULL GError*.
The argument will be left initialized to NULL by the method if there are no errors.
In case of error, the argument will be set to a newly allocated GError; the caller will take ownership of the data, and be responsible for freeing it.

Return value

Type: gboolean

TRUE is configuration was successful, otherwise FALSE and error will be set.