* expand dir names (ie. ~/Maildir => /home/user/Maildir); add init/uninit

This commit is contained in:
Dirk-Jan C. Binnema
2009-11-30 00:04:16 +02:00
parent 1b30f4c8e5
commit 06ad732d81
2 changed files with 37 additions and 9 deletions

View File

@ -29,13 +29,14 @@
struct _MuConfigOptions {
/* general options */
gboolean quiet; /* don't give any output */
gboolean debug; /* spew out debug info */
gboolean quiet; /* don't give any output */
gboolean debug; /* spew out debug info */
const char *muhome;/* the House of Mu */
gboolean version; /* request mu version */
gboolean log_stderr; /*log to stderr (instead of logfile)*/
gboolean log_append; /* append to log (instead of overwriting)*/
/* options for indexing */
const char *maildir; /* where the mails are */
gboolean cleanup; /* cleanup deleted mails form db */
@ -57,12 +58,22 @@ typedef struct _MuConfigOptions MuConfigOptions;
/**
* set default values for the configuration options
* set default values for the configuration options; when you call
* mu_config_init, you should also call mu_config_uninit when the data
* is no longer needed.
*
* @param opts options
*/
void mu_config_init (MuConfigOptions *opts);
/**
* free the MuOptionsCOnfig structure; the the muhome and maildir
* members are heap-allocated, so must be freed.
*
* @param opts
*/
void mu_config_set_defaults (MuConfigOptions *opts);
void mu_config_uninit (MuConfigOptions *opts);
/**
* get the general options option group
@ -92,4 +103,6 @@ GOptionGroup* mu_config_options_group_index (MuConfigOptions *opts);
GOptionGroup* mu_config_options_group_query (MuConfigOptions *opts);
char* mu_config_expanded_mu_home (MuConfigOptions *opts);
#endif /*__MU_CONFIG_H__*/