Function

ECalutil_mark_task_complete_sync

since: 3.30

Declaration [src]

gboolean
e_cal_util_mark_task_complete_sync (
  ICalComponent* vtodo,
  time_t completed_time,
  _ECalClient* cal_client,
  GCancellable* cancellable,
  GError** error
)

Description [src]

Marks the vtodo as complete with eventual update of other properties. This is useful also for recurring tasks, for which it moves the vtodo into the next occurrence according to the recurrence rule.

When the vtodo is marked as completed, then the existing COMPLETED date-time is preserved if exists, otherwise it’s set either to completed_time, or to the current time, when the completed_time is (time_t) -1.

The function doesn’t change LAST-MODIFIED neither the SEQUENCE property, it’s up to the caller to do it.

Note the cal_client, cancellable and error is used only for timezone resolution. The function doesn’t store the vtodo to the cal_client, it only updates the vtodo component.

Available since: 3.30

Parameters

vtodo

Type: None

A VTODO component.

The data is owned by the caller of the function.
completed_time

Type: time_t

Completed time to set, or (time_t) -1 to use current time.

cal_client

Type: ECalClient

An ECalClient to which the vtodo belongs.

The data is owned by the caller of the function.
cancellable

Type: GCancellable

Optional GCancellable object, or NULL.

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