timer-loader

timer-loader — Timer plugin loader subsystem

Synopsis




void        timer_plugins_set_startup       (GSList *plugins,
                                             gboolean is_startup);
void        close_timer_plugins             (GSList *plugins);
GSList*     load_timer_plugins              (const gchar *path);
TimerPlugin* timers_get_plugin              (GSList *plugins,
                                             gboolean need_power_up);

Description

These functions are used to un/load timer plugins and to get them.

Details

timer_plugins_set_startup ()

void        timer_plugins_set_startup       (GSList *plugins,
                                             gboolean is_startup);

Sets the is_startup field for each plugin.

plugins : Plugin list as returned by load_timer_plugins.
is_startup : Boolean indicating the startup status of alarmd.

close_timer_plugins ()

void        close_timer_plugins             (GSList *plugins);

Closes all plugins and frees all data.

plugins : Plugin list as returned by load_timer_plugins.

load_timer_plugins ()

GSList*     load_timer_plugins              (const gchar *path);

Loads all timer plugins from given directory. Gets the plugin priorities and closes all but the highest priority power up and non power up ones.

path : Directory to load the plugins from.
Returns : List of plugins.

timers_get_plugin ()

TimerPlugin* timers_get_plugin              (GSList *plugins,
                                             gboolean need_power_up);

Gets one plugin (and loads it if necessary) from the list. The one with the highest priority is returned.

plugins : List of plugins as returned by load_timer_plugins.
need_power_up : TRUE if the plugin wanted should have the power up functionality.
Returns : The highest priority plugin.