Top | ![]() |
![]() |
![]() |
![]() |
ESourceRefreshESourceRefresh — ESource extension for refresh settings |
|
(*ESourceRefreshFunc) () |
|
e_source_refresh_get_enabled () |
|
e_source_refresh_set_enabled () |
|
e_source_refresh_get_interval_minutes () |
|
e_source_refresh_set_interval_minutes () |
|
e_source_refresh_add_timeout () |
|
e_source_refresh_force_timeout () |
|
e_source_refresh_remove_timeout () |
|
e_source_refresh_remove_timeouts_by_data () |
The ESourceRefresh extension tracks the interval for fetching updates from a remote server.
Access the extension as follows:
#include <libedataserver/libedataserver.h> ESourceRefresh *extension; extension = e_source_get_extension (source, E_SOURCE_EXTENSION_REFRESH);
gboolean e_source_refresh_get_enabled (ESourceRefresh *extension
);
Returns whether to periodically fetch updates from a remote server.
The refresh interval is determined by the
Since: 3.6
void e_source_refresh_set_enabled (ESourceRefresh *extension
,);
gboolean enabled
Sets whether to periodically fetch updates from a remote server.
The refresh interval is determined by the
Since: 3.6
guint e_source_refresh_get_interval_minutes (ESourceRefresh *extension
);
Returns the interval for fetching updates from a remote server.
Note this value is only effective when the TRUE
Since: 3.6
void e_source_refresh_set_interval_minutes (ESourceRefresh *extension
,);
guint interval_minutes
Sets the interval for fetching updates from a remote server.
Note this value is only effective when the TRUE
Since: 3.6
guint e_source_refresh_add_timeout (ESource *source
,,
GMainContext *contextESourceRefreshFunc callback
,,
gpointer user_data);
GDestroyNotify notify
This is a simple way to schedule a periodic data source refresh.
Adds a timeout context
and handles all the bookkeeping
if source
's refresh 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()
source |
an ESource |
|
context |
a |
[allow-none] |
callback |
function to call on each timeout |
|
user_data |
data to pass to |
|
notify |
function to call when the timeout is removed,
or |
[allow-none] |
Since: 3.6
void e_source_refresh_force_timeout (ESource *source
);
For all timeouts added with e_source_refresh_add_timeout()
, invokes
the ESourceRefreshFunc callback immediately and then, if the refresh
This function is called automatically when the ESource switches from disabled to enabled, but can also be useful when a network connection becomes available or when waking up from hibernation or suspend.
Since: 3.6
gboolean e_source_refresh_remove_timeout (ESource *source
,);
guint refresh_timeout_id
Removes a timeout e_source_refresh_add_timeout()
.
Since: 3.6
guint e_source_refresh_remove_timeouts_by_data (ESource *source
,);
gpointer user_data
Removes all timeout e_source_refresh_add_timeout()
whose callback data pointer matches user_data
.
Since: 3.6
#define E_SOURCE_EXTENSION_REFRESH "Refresh"
Pass this extension name to e_source_get_extension()
to access
ESourceRefresh. This is also used as a group name in key files.
Since: 3.6
struct ESourceRefresh { };
Contains only private data that should be read and manipulated using the functions below.
Since: 3.6