XML period definition module
[Period definition modules]

Collaboration diagram for XML period definition module:


Data Structures

struct  xml_period_context

Defines

#define XML_DEFS_PERIODFILE   CONFIG_DIR "/" "periods.xml"

Functions

G_MODULE_EXPORT uint32_t get_api_version ()
G_MODULE_EXPORT gboolean unload_module_with_params (gpointer params_p)
G_MODULE_EXPORT gboolean init_module_from_conf (module_t *module)
static void period_start_element_handler (GMarkupParseContext *context, const gchar *element_name, const gchar **attribute_names, const gchar **attribute_values, gpointer user_data, GError **error)
static void period_end_element_handler (GMarkupParseContext *context, const gchar *element_name, gpointer user_data, GError **error)
G_MODULE_EXPORT void define_periods (GHashTable *periods, struct xml_defs_params *params)
 Period parsing function.

Variables

static GMarkupParser period_parser

Define Documentation

#define XML_DEFS_PERIODFILE   CONFIG_DIR "/" "periods.xml"

Definition at line 39 of file xml_defs.c.

Referenced by init_module_from_conf().


Function Documentation

G_MODULE_EXPORT void define_periods ( GHashTable *  periods,
struct xml_defs_params params 
)

Period parsing function.

This function is exported by the module and fill the hash table containing the periods.

Parameters:
periods A hash table containing all the periods.
params A pointer to the parameters of the module instance we're working for
The hash table keys are the name of the periods.

Remarks:
The conflict between period definition (with same name) is not resolved.

Definition at line 227 of file xml_defs.c.

References DEBUG_AREA_MAIN, log_message, xml_period_context::periods, and xml_defs_params::xml_defs_periodfile.

G_MODULE_EXPORT uint32_t get_api_version (  ) 

Definition at line 44 of file xml_defs.c.

References NUAUTH_API_VERSION.

G_MODULE_EXPORT gboolean init_module_from_conf ( module_t module  ) 

Definition at line 61 of file xml_defs.c.

References DEBUG_AREA_MAIN, log_message, nubase_config_table_get_or_default(), module_t::params, TRUE, XML_DEFS_PERIODFILE, and xml_defs_params::xml_defs_periodfile.

Here is the call graph for this function:

static void period_end_element_handler ( GMarkupParseContext *  context,
const gchar *  element_name,
gpointer  user_data,
GError **  error 
) [static]

Definition at line 181 of file xml_defs.c.

References add_perioditem_to_period(), DEBUG_AREA_MAIN, log_message, xml_period_context::perioditem, xml_period_context::periodname, and xml_period_context::periods.

Here is the call graph for this function:

static void period_start_element_handler ( GMarkupParseContext *  context,
const gchar *  element_name,
const gchar **  attribute_names,
const gchar **  attribute_values,
gpointer  user_data,
GError **  error 
) [static]

Definition at line 81 of file xml_defs.c.

References DEBUG, DEBUG_AREA_MAIN, define_new_period(), period_item::end_date, period_item::end_day, period_item::end_hour, log_message, xml_period_context::perioditem, xml_period_context::periodname, xml_period_context::periods, period_item::start_date, period_item::start_day, and period_item::start_hour.

Here is the call graph for this function:

G_MODULE_EXPORT gboolean unload_module_with_params ( gpointer  params_p  ) 

Definition at line 49 of file xml_defs.c.

References TRUE.


Variable Documentation

GMarkupParser period_parser [static]

Initial value:

Definition at line 207 of file xml_defs.c.


Generated on Sat Nov 22 04:01:02 2008 for NuFW by  doxygen 1.4.7