Method

EBackendCacheput

since: 3.26

Declaration [src]

gboolean
e_cache_put (
  ECache* cache,
  const gchar* uid,
  const gchar* revision,
  const gchar* object,
  ECacheColumnValues* other_columns,
  ECacheOfflineFlag offline_flag,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Stores an object into the cache. Depending on offline_flag, this update the object’s offline state accordingly. When the offline_flag is set to E_CACHE_IS_ONLINE, then it’s set to #E_OFFLINE_STATE_SYNCED, like to be fully synchronized with the server, regardless of its previous offline state. Overwriting locally deleted object behaves like an addition of a completely new object.

Available since: 3.26

Parameters

uid

Type: const gchar*

A unique identifier of an object.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
revision

Type: const gchar*

A revision of the object.

The argument can be NULL.
The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
object

Type: const gchar*

The object itself.

The data is owned by the caller of the method.
The value is a NUL terminated UTF-8 string.
other_columns

Type: ECacheColumnValues

An ECacheColumnValues with other columns to set; can be NULL.

The argument can be NULL.
The data is owned by the caller of the method.
offline_flag

Type: ECacheOfflineFlag

One of ECacheOfflineFlag, whether putting this object in offline.

cancellable

Type: GCancellable

Optional GCancellable object, or NULL.

The argument can be NULL.
The data is owned by the caller of the method.
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

Whether succeeded.