libpnd; header and body for get_description() were a little out of sync; header was...
[pandora-libraries.git] / lib / pnd_pxml.c
index 2cde635..a6516ab 100644 (file)
@@ -176,6 +176,9 @@ void pnd_pxml_delete ( pnd_pxml_handle h ) {
   if ( p -> startdir ) {
     free ( p -> startdir );
   }
+  if ( p -> appdata_dirname ) {
+    free ( p -> appdata_dirname );
+  }
 
   free(p); /*very important!*/
 
@@ -338,6 +341,11 @@ char *pnd_pxml_get_unique_id ( pnd_pxml_handle h ) {
   return ( p -> unique_id );
 }
 
+char *pnd_pxml_get_appdata_dirname ( pnd_pxml_handle h ) {
+  pnd_pxml_t *p = (pnd_pxml_t*) h;
+  return ( p -> appdata_dirname );
+}
+
 char *pnd_pxml_get_standalone ( pnd_pxml_handle h ) {
   pnd_pxml_t *p = (pnd_pxml_t*) h;
   return ( p -> standalone );
@@ -348,6 +356,10 @@ char *pnd_pxml_get_icon ( pnd_pxml_handle h ) {
   return ( p -> icon );
 }
 
+// this guy's func name is 'out of sync' with the family of functions below; but since it
+// exists, rather than just remove it and break someones code, will add in the appropriate
+// function wrapper; the header only specifies the other guy (always did), so the header
+// was already on the right path.
 char *pnd_pxml_get_app_description ( pnd_pxml_handle h, char *iso_lang ) {
   pnd_pxml_t *p = (pnd_pxml_t *) h;
   return pnd_pxml_get_best_localized_string(p->descriptions, p->descriptions_c, iso_lang);
@@ -369,6 +381,11 @@ char *pnd_pxml_get_description_fr ( pnd_pxml_handle h ) {
   return pnd_pxml_get_app_description(h, "fr");
 }
 
+// wrapper added so family of function names is consistent; see comment for pnd_pxml_get_app_description() above
+char *pnd_pxml_get_description ( pnd_pxml_handle h, char *iso_lang) {
+  return ( pnd_pxml_get_app_description ( h, iso_lang ) );
+}
+
 char *pnd_pxml_get_previewpic1 ( pnd_pxml_handle h ) {
   pnd_pxml_t *p = (pnd_pxml_t*) h;
   return ( p -> previewpic1 );
@@ -554,3 +571,33 @@ unsigned char pnd_pxml_is_affirmative ( char *v ) {
 
   return ( 0 );
 }
+
+pnd_pxml_x11_req_e pnd_pxml_get_x11 ( char *pxmlvalue ) {
+
+  if ( ! pxmlvalue ) {
+    return ( pnd_pxml_x11_ignored );
+  } else if ( strcasecmp ( pxmlvalue, "req" ) == 0 ) {
+    return ( pnd_pxml_x11_required );
+  } else if ( strcasecmp ( pxmlvalue, "stop" ) == 0 ) {
+    return ( pnd_pxml_x11_stop );
+  } else if ( strcasecmp ( pxmlvalue, "ignore" ) == 0 ) {
+    return ( pnd_pxml_x11_ignored );
+  }
+
+  return ( pnd_pxml_x11_ignored ); // default
+}
+
+char *pnd_pxml_get_info_name ( pnd_pxml_handle h ) {
+  pnd_pxml_t *p = (pnd_pxml_t*) h;
+  return ( p -> info_name );
+}
+
+char *pnd_pxml_get_info_type ( pnd_pxml_handle h ) {
+  pnd_pxml_t *p = (pnd_pxml_t*) h;
+  return ( p -> info_type );
+}
+
+char *pnd_pxml_get_info_src ( pnd_pxml_handle h ) {
+  pnd_pxml_t *p = (pnd_pxml_t*) h;
+  return ( p -> info_filename );
+}