00001 /** 00002 * This file is part of alarmd 00003 * 00004 * Contact Person: David Weinehall <david.weinehall@nokia.com> 00005 * 00006 * Copyright (C) 2006 Nokia Corporation 00007 * alarmd and libalarm are free software; you can redistribute them 00008 * and/or modify them under the terms of the GNU Lesser General Public 00009 * License version 2.1 as published by the Free Software Foundation. 00010 * 00011 * alarmd and libalarm are distributed in the hope that they will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this software; if not, write to the Free 00018 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 00019 * 02110-1301 USA 00020 */ 00021 00022 #ifndef _TIMER_LOADER_H_ 00023 #define _TIMER_LOADER_H_ 00024 00025 #include "include/timer-interface.h" 00026 00027 /** 00028 * SECTION:timer-loader 00029 * @short_description: Timer plugin loader subsystem 00030 * 00031 * These functions are used to un/load timer plugins and to get them. 00032 **/ 00033 00034 /** 00035 * timer_plugins_set_startup: 00036 * @plugins: Plugin list as returned by #load_timer_plugins. 00037 * @is_startup: Boolean indicating the startup status of alarmd. 00038 * 00039 * Sets the is_startup field for each plugin. 00040 **/ 00041 void timer_plugins_set_startup(GSList *plugins, gboolean is_startup); 00042 00043 /** 00044 * close_timer_plugins: 00045 * @plugins: Plugin list as returned by #load_timer_plugins. 00046 * 00047 * Closes all plugins and frees all data. 00048 **/ 00049 void close_timer_plugins(GSList *plugins); 00050 00051 /** 00052 * load_timer_plugins: 00053 * @path: Directory to load the plugins from. 00054 * 00055 * Loads all timer plugins from given directory. Gets the plugin priorities 00056 * and closes all but the highest priority power up and non power up ones. 00057 * Returns: List of plugins. 00058 **/ 00059 GSList *load_timer_plugins(const gchar *path); 00060 00061 /** 00062 * timers_get_plugin: 00063 * @plugins: List of plugins as returned by #load_timer_plugins. 00064 * @need_power_up: TRUE if the plugin wanted should have the power up 00065 * functionality. 00066 * 00067 * Gets one plugin (and loads it if necessary) from the list. The one with 00068 * the highest priority is returned. 00069 * Returns: The highest priority plugin. 00070 **/ 00071 TimerPlugin *timers_get_plugin(GSList *plugins, gboolean need_power_up); 00072 00073 #endif /* _TIMER_LOADER_H_ */