Allow parse_dotdesktop() to mark libpnd origin or not, and convenience filter to...
[pandora-libraries.git] / include / pnd_desktop.h
index 550b03e..5c53812 100644 (file)
@@ -6,16 +6,24 @@
 extern "C" {
 #endif
 
-
 #define PND_PNDHUP_KEY "launcher.hupscript"
 #define PND_PNDHUP_FILENAME "pnd_hup.sh"
 
 // emit_dotdesktop() will determine a filename and create a FILENAME.desktop file in the targetpath
 // TODO: Copy the icon into this directory as well, if its source is a .pnd or info is in the dico struct
 #define PND_DOTDESKTOP_HEADER "[Desktop Entry]"
-#define PND_DOTDESKTOP_SOURCE "_Source=libpnd"
+#define PND_DOTDESKTOP_SOURCE "X-Pandora-Source=libpnd"
 unsigned char pnd_emit_dotdesktop ( char *targetpath, char *pndrun, pnd_disco_t *p );
 
+#define PND_DOTDESKTOP_LIBPND_ONLY 1 /* convenience flag; caller can do this himself as well */
+pnd_disco_t *pnd_parse_dotdesktop ( char *ddpath, unsigned int flags ); // sets object_flag CUSTOM1 for non-libpnd-origin
+
+// emit_dotinfo() will spit out a .desktop 'info entry', similar to the way emit_dotdesktop does its thing
+// - rather than slide this into emit_dotdesktop(), we wish to allow apps to do this or not by calling this
+//   function, and also let them specify an alternate path to emit to.. without adding all these
+//   extra fields to emit_dotdesktop()'s function and breaking apps, or annoying callers down the road
+unsigned char pnd_emit_dotinfo ( char *targetpath, char *pndrun, pnd_disco_t *p );
+
 // emit_icon() will attempt to copy the icon from a PXML directory, or from a pnd file if appended,
 // to the given directory; returns 1 on sucess, otherwise is a fail.
 unsigned char pnd_emit_icon ( char *targetpath, pnd_disco_t *p );