daemon-conf: Add conf file parsing

Support to parse configuration files. By default, the default conf file
is parsed ({sysconfdir}/pinos/pinos.conf), but that can be changed with
an environment variable (PINOS_CONFIG_FILE). The file can contain
commands and assignments (no assignment supported this far).

Support for command module-load is added.
This commit is contained in:
Linus Svensson 2016-08-29 18:29:07 +02:00 committed by Wim Taymans
parent d654a1bcd6
commit 7d8e2d53f7
14 changed files with 729 additions and 59 deletions

View file

@ -81,18 +81,20 @@ typedef enum
/**
* PinosModuleInitFunc:
* @module: A #PinosModule
* @args: Arguments to the module
*
* A module should provide an init function with this signature. This function
* will be called when a module is loaded.
*
* Returns: %TRUE on success, %FALSE otherwise
*/
typedef gboolean (*PinosModuleInitFunc) (PinosModule *module);
typedef gboolean (*PinosModuleInitFunc) (PinosModule *module, gchar *args);
GType pinos_module_get_type (void);
PinosModule * pinos_module_load (PinosDaemon *daemon,
const gchar *name,
const gchar *args,
GError **err);
G_END_DECLS