Method

PurpleScheduleradd_task_relative

unstable since: 3.0

Declaration [src]

gboolean
purple_scheduler_add_task_relative (
  PurpleScheduler* scheduler,
  PurpleScheduledTask* task,
  GTimeSpan when,
  GError** error
)

Description [src]

Adds a new task to the scheduler.

If the task has already been added, false will be returned and error will be set.

If task is already scheduled, it will be rescheduled to run at when.

This is a wrapper around purple_scheduler_add_task() that will add when to the current time for you.

Available since: 3.0

Parameters

task

Type: PurpleScheduledTask

The task to add.

The data is owned by the caller of the method.
when

Type: GTimeSpan

The relative time from now to execute the task.

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 if the task was added successfully.