// actually do useful work
//
- pnd_pxml_handle pxmlh;
+ pnd_pxml_handle *pxmlapps;
- pxmlh = pnd_pxml_get_by_path ( fullpath );
+ pxmlapps = pnd_pxml_get_by_path ( fullpath );
- if ( ! pxmlh ) {
+ if ( ! pxmlapps ) {
printf ( "ERROR: PXML could not be extracted meaningfully.\n" );
return ( 0 );
}
- printf ( "Got back a meaningful PXML structure.\n" );
+ printf ( "Got back a meaningful list of PXMLs.\n" );
- /* check the content
- */
+ unsigned int appiter = 0;
+ while ( 1 ) {
+
+ pnd_pxml_handle h = pxmlapps [ appiter ];
+
+ if ( ! h ) {
+ break;
+ }
+
+ // if you want to just go direct to struct - not wise!
+ //pnd_pxml_t *p = pxmlapps [ appiter ];
+ //printf ( "uid %s\n", p -> unique_id );
- // check for required fields
+ /* check the content
+ */
+ printf ( "Found name: '%s'\n", pnd_pxml_get_app_name_en ( h ) );
- // exec-path?
+ // check for required fields
- // app name?
+ // exec-path?
- // unique ID
+ // app name?
- // package-name (shortname)
+ // unique ID
+
+ // package-name (shortname)
+
+ // free up that particular pxml_handle within the return-list
+
+ // next
+ appiter++;
+ } // while
/* done!
*/
- pnd_pxml_delete ( pxmlh );
return ( 0 );
}