Method
EDataServerSourcerefresh_add_timeout
since: 3.6
Declaration [src]
guint
e_source_refresh_add_timeout (
ESource* source,
GMainContext* context,
ESourceRefreshFunc callback,
gpointer user_data,
GDestroyNotify notify
)
Description [src]
This is a simple way to schedule a periodic data source refresh.
Adds a timeout GSource to context and handles all the bookkeeping if source‘s refresh ESourceRefresh:enabled state or its refresh
ESourceRefresh:interval-minutes value changes. The callback is
expected to dispatch an asynchronous job to connect to and fetch
updates from a remote server.
The returned ID can be passed to e_source_refresh_remove_timeout() to
remove the timeout from context. Note the ID is a private handle and
cannot be passed to g_source_remove().
Available since: 3.6
Parameters
context-
Type:
GMainContextA
GMainContext, orNULL(ifNULL, the default context will be used).The argument can be NULL.The data is owned by the caller of the method. callback-
Type:
ESourceRefreshFuncFunction to call on each timeout.
user_data-
Type:
gpointerData to pass to
callback.The argument can be NULL.The data is owned by the caller of the method. notify-
Type:
GDestroyNotifyFunction to call when the timeout is removed, or
NULL.The argument can be NULL.