X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fpnd_pxml.h;h=bca88f48511925de43026286ce72518625d43e43;hb=1dc86c4abd7c13213dfc10bee604089445ade5c8;hp=f381dde8f3b9edf19ef5fe7a28647983fd797e2c;hpb=dcb607f8312d117aa5827925a9602ff2363eabf1;p=pandora-libraries.git diff --git a/include/pnd_pxml.h b/include/pnd_pxml.h index f381dde..bca88f4 100644 --- a/include/pnd_pxml.h +++ b/include/pnd_pxml.h @@ -12,7 +12,10 @@ extern "C" { #define PXML_TAGHEAD "" /* case insensitive */ -#define PXML_MAXAPPS 20 /* max number of 's within a single PXML */ +#define PXML_MAXAPPS 50 /* max number of 's within a single PXML */ /* TODO: make this realloc() and dynamicly grow instead.. */ + +// for DaveC, we will support same-path-as-.pnd file override, that is simple format and not XML +#define PXML_SAMEPATH_OVERRIDE_FILEEXT ".ovr" /* ./foo/bar.pnd could have overrides in ./foo/bar.ovr */ // 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 @@ -20,8 +23,8 @@ 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 ); // fetch from file +pnd_pxml_handle *pnd_pxml_fetch_buffer ( char *filename, char *buffer ); // fetch from a buffer void pnd_pxml_delete ( pnd_pxml_handle h ); /* overrides() allow for customization of a PXML that persists; ie: An application might be sitting @@ -46,6 +49,7 @@ char *pnd_pxml_get_app_name_it ( pnd_pxml_handle h ); char *pnd_pxml_get_app_name_fr ( pnd_pxml_handle h ); char *pnd_pxml_get_app_name ( pnd_pxml_handle h, char *iso_lang ); char *pnd_pxml_get_unique_id ( pnd_pxml_handle h ); +char *pnd_pxml_get_appdata_dirname ( pnd_pxml_handle h ); char *pnd_pxml_get_standalone ( pnd_pxml_handle h ); char *pnd_pxml_get_icon ( pnd_pxml_handle h ); char *pnd_pxml_get_description_en ( pnd_pxml_handle h ); @@ -87,12 +91,22 @@ 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 '!' @@ -104,11 +118,12 @@ typedef struct typedef struct { - unsigned char subapp_number; // 0 for 'only app'; 1+ for # .. first is 1. + unsigned char subapp_number; // 0+ for # .. first is 0 pnd_localized_string_t *titles; int titles_c; int titles_alloc_c; char *unique_id; + char *appdata_dirname; // preferred dir name for appdata; if missing, use unique-id char *standalone; char *icon; pnd_localized_string_t *descriptions; @@ -151,6 +166,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