X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=apps%2Fpndvalidator.c;h=b3831f396561dcb290d4b6679e19124a7d39c408;hb=38d0da186bbf6c0fd0ac1375d9b1f5f07a15ef62;hp=4307b31d3e0cb1dce1ea9f16375699f998e2e028;hpb=1bac127998050c23f12853896a8d64ce0f04fa9d;p=pandora-libraries.git diff --git a/apps/pndvalidator.c b/apps/pndvalidator.c index 4307b31..b3831f3 100644 --- a/apps/pndvalidator.c +++ b/apps/pndvalidator.c @@ -68,33 +68,52 @@ int main ( int argc, char *argv[] ) { // 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 ); }