Typedefs | |
typedef void( | osso_application_autosave_cb_f )(gpointer data) |
Functions | |
osso_return_t | osso_application_set_autosave_cb (osso_context_t *osso, osso_application_autosave_cb_f *cb, gpointer data) |
osso_return_t | osso_application_unset_autosave_cb (osso_context_t *osso, osso_application_autosave_cb_f *cb, gpointer data) |
osso_return_t | osso_application_userdata_changed (osso_context_t *osso) |
osso_return_t | osso_application_autosave_force (osso_context_t *osso) |
const gchar * | osso_application_name_get (osso_context_t *osso) |
const gchar * | osso_application_version_get (osso_context_t *osso) |
Libosso will call the callback(s) when:
The application should call osso_application_autosave_force whenever it is switched to the background (untopped).
After the autosave callbacks have been called, the timer inside Libosso is reset and the application needs to call osso_application_userdata_changed again when it has new "dirty" user data.
typedef void( osso_application_autosave_cb_f)(gpointer data) |
This is the type for the autosave callback function.
data | Arbitrary application specific pointer. |
osso_return_t osso_application_autosave_force | ( | osso_context_t * | osso | ) |
This function forces a call to the application's autosave function, and resets the autosave timeout.
osso | The library context as returned by osso_initialize. |
const gchar* osso_application_name_get | ( | osso_context_t * | osso | ) |
osso_return_t osso_application_set_autosave_cb | ( | osso_context_t * | osso, | |
osso_application_autosave_cb_f * | cb, | |||
gpointer | data | |||
) |
This function registers an autosave callback function.
osso | The library context as returned by osso_initialize. | |
cb | The callback function. | |
data | Arbitrary application specific pointer that will be passed to the callback and ignored by Libosso. |
osso_return_t osso_application_unset_autosave_cb | ( | osso_context_t * | osso, | |
osso_application_autosave_cb_f * | cb, | |||
gpointer | data | |||
) |
This function unregisters an autosave callback function.
osso | The library context as returned by osso_initialize. | |
cb | The callback function. | |
data | Arbitrary application specific pointer that will be passed to the callback and ignored by Libosso. |
osso_return_t osso_application_userdata_changed | ( | osso_context_t * | osso | ) |
This function is called by the application when the user data has been changed, so that Libosso knows that a call to the autosave callback is needed in the future to save the user data. The dirty state will be cleared every time the application's autosave callback function is called.
osso | The library context as returned by osso_initialize. |
const gchar* osso_application_version_get | ( | osso_context_t * | osso | ) |