change one comment in pnd_pxml.h to be more right
[pandora-libraries.git] / include / pnd_pxml.h
index a9733fd..1cc2df3 100644 (file)
@@ -12,14 +12,16 @@ extern "C" {
 #define PXML_TAGHEAD "<PXML" /* case insensitive; allow for trailing attributes */
 #define PXML_TAGFOOT "</PXML>" /* case insensitive */
 
+#define PXML_MAXAPPS 20 /* max number of <application>'s within a single PXML */
+
 // use this handle to interact with PXML; this hides the mechanics of parsing a PXML file so that
 // it can be upgraded with impacting applications
 typedef void* pnd_pxml_handle;
 
 /* pxml_fetch() will return NULL on fail, otherwise a valid handle which may be further queried
  */
-pnd_pxml_handle pnd_pxml_fetch ( char *fullpath );
-pnd_pxml_handle pnd_pxml_fetch_buffer ( char *filename, char *buffer );
+pnd_pxml_handle *pnd_pxml_fetch ( char *fullpath );
+pnd_pxml_handle *pnd_pxml_fetch_buffer ( char *filename, char *buffer );
 void pnd_pxml_delete ( pnd_pxml_handle h );
 
 /* overrides() allow for customization of a PXML that persists; ie: An application might be sitting
@@ -60,6 +62,7 @@ char *pnd_pxml_get_version_minor ( pnd_pxml_handle h );
 char *pnd_pxml_get_version_release ( pnd_pxml_handle h );
 char *pnd_pxml_get_version_build ( pnd_pxml_handle h );
 char *pnd_pxml_get_exec ( pnd_pxml_handle h );
+char *pnd_pxml_get_execargs ( pnd_pxml_handle h );
 char *pnd_pxml_get_exec_option_no_x11 ( pnd_pxml_handle h );
 char *pnd_pxml_get_main_category ( pnd_pxml_handle h );
 char *pnd_pxml_get_subcategory1 ( pnd_pxml_handle h );
@@ -84,13 +87,24 @@ char *pnd_pxml_get_clockspeed ( pnd_pxml_handle h );
 char *pnd_pxml_get_background ( pnd_pxml_handle h );
 char *pnd_pxml_get_startdir ( pnd_pxml_handle h );
 char *pnd_pxml_get_mkdir ( pnd_pxml_handle h );
+char *pnd_pxml_get_info_name ( pnd_pxml_handle h );
+char *pnd_pxml_get_info_type ( pnd_pxml_handle h );
+char *pnd_pxml_get_info_src ( pnd_pxml_handle h );
 
 // for 'set' functions, pass NULL value to delete existing value without setting new one
 void pnd_pxml_set_app_name ( pnd_pxml_handle h, char *v );
 
 /* utilities
  */
+typedef enum {
+  pnd_pxml_x11_error = 0,
+  pnd_pxml_x11_required,
+  pnd_pxml_x11_ignored,
+  pnd_pxml_x11_stop
+} pnd_pxml_x11_req_e;
+pnd_pxml_x11_req_e pnd_pxml_get_x11 ( char *pxmlvalue ); // returns error, required, ignored, stop hint
 unsigned char pnd_is_pxml_valid_app ( pnd_pxml_handle h ); // returns 1 when pxml seems like a valid application
+unsigned char pnd_pxml_is_affirmative ( char *v ); // return 1 for 'Y' or '!'
 
 typedef struct
 {
@@ -100,6 +114,7 @@ typedef struct
 
 typedef struct
 {
+        unsigned char subapp_number; // 0+ for <application> # .. first <application> is 0
        pnd_localized_string_t *titles;
        int titles_c;
        int titles_alloc_c;
@@ -118,6 +133,7 @@ typedef struct
        char *version_release;
        char *version_build;
        char *exec;
+       char *execargs;
        char *main_category;
        char *subcategory1;
        char *subcategory2;
@@ -145,6 +161,10 @@ typedef struct
        char *package_release_date;
         char *mkdir_sp; // a colon separated list of paths to be mkdir'd (silently fail) when pnd is autodiscovered. path is always relative to the root of the hosting device.
 
+        char *info_name;      // should be a struct..
+        char *info_filename;
+        char *info_type;
+
 }  pnd_pxml_t;
 
 #ifdef __cplusplus