9 // this code is for very basic PXML.xml file parsing
11 #define PXML_FILENAME "PXML.xml" /* a specification defined name */
13 // use this handle to interact with PXML; this hides the mechanics of parsing a PXML file so that
14 // it can be upgraded with impacting applications
15 typedef void* pnd_pxml_handle;
17 /* pxml_fetch() will return NULL on fail, otherwise a valid handle which may be further queried
19 pnd_pxml_handle pnd_pxml_fetch ( char *fullpath );
20 void pnd_pxml_delete ( pnd_pxml_handle h );
22 /* overrides() allow for customization of a PXML that persists; ie: An application might be sitting
23 * on an SD card and popped out while we need to edit its personalized category; more to point, the
24 * PXML itself could be in a read-only SD or packed into an ISO, or just sitting in a directory.
25 * Rather than have a _second_ PXML in the same place or have to write back to read-only media or
26 * worry about losing customizations when an app is temporarily deleted, we can just keep the
27 * overrides themselves in NAND.
29 /* merge_override() will attempt to locate an override of the given PXML, and will modify the
30 * PXML in-place to include any overrides found.
31 * Returns >0 if a merge was done, 0 if no merge was done, and <0 on error
32 * NOTE: For searchpath, should query configs for PND_PXML_OVERRIDES_KEY (or use PND_PXML_OVERRIDES_SEARCHPATH)
34 signed char pnd_pxml_merge_override ( pnd_pxml_handle h, char *searchpath );
36 /* these accessor functions will return READ ONLY char*s; do not free them or modify them.
38 char *pnd_pxml_get_app_name ( pnd_pxml_handle h );
39 char *pnd_pxml_get_icon_path ( pnd_pxml_handle h );
40 char *pnd_pxml_get_unique_id ( pnd_pxml_handle h );
41 char *pnd_pxml_get_primary_category ( pnd_pxml_handle h );
42 char *pnd_pxml_get_exec_path ( pnd_pxml_handle h );
43 char *pnd_pxml_get_clockspeed ( pnd_pxml_handle h );
45 // for 'set' functions, pass NULL value to delete existing value without setting new one
46 void pnd_pxml_set_app_name ( pnd_pxml_handle h, char *v );
50 unsigned char pnd_is_pxml_valid_app ( pnd_pxml_handle h ); // returns 1 when pxml seems like a valid application
71 char *version_release;
78 char *altsubcategory1;
79 char *altsubcategory2;
80 char *osversion_major;
81 char *osversion_minor;
82 char *osversion_release;
83 char *osversion_build;
84 char *associationitem1_name;
85 char *associationitem1_filetype;
86 char *associationitem1_parameter;
87 char *associationitem2_name;
88 char *associationitem2_filetype;
89 char *associationitem2_parameter;
90 char *associationitem3_name;
91 char *associationitem3_filetype;
92 char *associationitem3_parameter;