Add some startup hints .. normally shows 'select for menu', but now also suggests...
[pandora-libraries.git] / include / pnd_conf.h
index 0332c7c..04bc063 100644 (file)
@@ -50,7 +50,7 @@ extern "C" {
  * 'conf' config, and then use its suggested searchpath!
  *
  */
-#define PND_CONF_SEARCHPATH "/media/mmcblk0p1/pandora/conf:/media/mmcblk1p1/pandora/conf:/etc/pandora/conf:./testdata/conf"
+#define PND_CONF_SEARCHPATH "/media/*/pandora/conf:/etc/pandora/conf:./testdata/conf"
 
 /* within the base conf file 'conf', the key for the searchpath is 'conf.searchpath' */
 #define PND_CONF_FILE       "conf" /* a config file for config settings! */
@@ -67,6 +67,8 @@ typedef enum {
   pnd_conf_apps,           // provides application search-path, pxml override location, etc.
   pnd_conf_startup,        // provides list of startup applications, basic shell application, etc.
   pnd_conf_desktop,        // provides settings for the launchers
+  pnd_conf_categories,     // provides mapping from PXML category to dot-desktop category
+  pnd_conf_evmap,          // provides mapping from event to sh-script
 } pnd_conf_filename_e;
 
 typedef struct {
@@ -114,11 +116,20 @@ pnd_conf_handle pnd_conf_fetch_by_path ( char *fullpath );
  * config file accessor functions public API
  */
 
-/* get_as_char() will attempt to locate the specified key string (of format section,key) in the
+/* get_as_char() will attempt to locate the specified key string (of format section.key) in the
  * provided config handle. Do not free up this value, it is considered read only.
  * Returns NULL on error, otherwise a READ ONLY char* reference to the value.
  */
 char *pnd_conf_get_as_char ( pnd_conf_handle c, char *key );
+#define PND_CONF_BADNUM (-31337) /* really lame hack, I know */
+int pnd_conf_get_as_int ( pnd_conf_handle c, char *key );
+int pnd_conf_get_as_int_d ( pnd_conf_handle c, char *key, int def ); // same as _as_int, but returns default instead of BADNUM
+
+/* writes and saves
+ */
+int *pnd_conf_set_int ( pnd_conf_handle c, char *key, int v );
+char *pnd_conf_set_char ( pnd_conf_handle c, char *key, char *v );
+unsigned char pnd_conf_write ( pnd_conf_handle c, char *fullpath );
 
 #ifdef __cplusplus
 } /* "C" */