--- /dev/null
+
+Some things to be done..
+
+- review pnd_tinyxml to ensure the PXML_FILENAME is csae insensitive as needed
+
+apps/pndnotifyd.c:// TODO: Catch HUP and reparse config
+apps/pndnotifyd.c:// TODO: Should perhaps direct all printf's through a vsprintf handler to avoid redundant "if ! g_daemon_mode"
+apps/pndnotifyd.c:// TODO: During daemon mode, should perhaps syslog or log errors
+apps/pndnotifyd.c:// TODO: Removing stale .desktop checks that .desktop was created by libpnd; see 'TBD' below
+include/pnd_discovery.h:// TODO: Copy the icon into this directory as well, if its source is a .pnd or info is in the dico struct
+include/pnd_discovery.h:// TODO: A way to release the disco-lists and reclaim RAM :)
+include/pnd_discovery.h:// TODO: A way to determine the list of excess .desktop files and remove them (ie: after poo.pnd is removed, ditch the .desktop)
unsigned char pnd_emit_dotdesktop ( char *targetpath, pnd_disco_t *p );
// TODO: A way to release the disco-lists and reclaim RAM :)
-// TODO: A way to determine the list of excess .desktop files and remove them (ie: after poo.pnd is removed, ditch the .desktop)
#ifdef __cplusplus
} /* "C" */
--- /dev/null
+
+#ifndef h_pnd_pndfiles_h
+#define h_pnd_pndfiles_h
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define PND_PACKAGE_FILEEXT ".pnd" /* case insensitive due to SD FAT fs */
+
+#ifdef __cplusplus
+} /* "C" */
+#endif
+
+#endif
#include "pnd_discovery.h"
#include "pnd_pathiter.h"
#include "pnd_apps.h"
-
-#warning "PND/PNZ support is not included yet; scripts need writing"
-#warning " /usr/pandora/bin/pnd_valid.sh"
-#warning " /usr/pandora/bin/pnd_prepare.sh"
-#warning " /usr/pandora/bin/pnd_unprepare.sh"
+#include "pnd_pndfiles.h"
// need these 'globals' due to the way nftw and ftw work :/
static pnd_box_handle disco_box;
return ( 0 ); // skip directories and other non-regular files
}
+ // PND/PNZ file and others may be valid as well .. but lets leave that for now
if ( strcasecmp ( fpath + ftwbuf -> base, PXML_FILENAME ) == 0 ) {
valid = 1;
+ } else if ( strcasecmp ( fpath + ftwbuf -> base, PND_PACKAGE_FILEEXT "\0" ) == 0 ) {
+ valid = 2;
}
- // PND file and others may be valid as well .. but lets leave that for now
- //
- // PND and PNZ and whatever
- //
-
// if not a file of interest, just keep looking until we run out
if ( ! valid ) {
return ( 0 );
}
// look for any overrides, if requested
-#warning pnd_pxml_merge_override removed by Cpasjuste ...
- // pnd_pxml_merge_override ( pxmlh, disco_overrides );
+ pnd_pxml_merge_override ( pxmlh, disco_overrides );
// check for validity and add to resultset if it looks executable
if ( pnd_is_pxml_valid_app ( pxmlh ) ) {
}
// ditch pxml
- pnd_pxml_delete ( pxmlh );
+ pnd_pxml_delete ( pxmlh );
- return 0;
} else if ( valid == 2 ) {
// PND ... ??
}
--- /dev/null
+
+#include <stdio.h> /* for FILE etc */
+#include <stdlib.h> /* for malloc */
+#include <string.h> /* for making ftw.h happy */
+
+#include "pnd_container.h"
+#include "pnd_pxml.h"
+#include "pnd_apps.h"
+#include "pnd_pndfiles.h"
pnd_pxml_handle pnd_pxml_fetch ( char *fullpath ) {
- pnd_pxml_t *p = malloc ( sizeof(pnd_pxml_t) );
+ pnd_pxml_t *p = malloc ( sizeof(pnd_pxml_t) );
- pnd_pxml_load(fullpath, p);
+ memset ( p, '\0', sizeof(pnd_pxml_t) );
- return (p);
+ pnd_pxml_load ( fullpath, p );
+
+ return ( p );
}
void pnd_pxml_delete ( pnd_pxml_handle h ) {
+++ /dev/null
-<?xml version="1.0"?>
-<PXML>
-<title>
- <en>Program Title</en>
- <de>Program Title in German Language</de>
- <fr>Program Title in French Language</fr>
- <it>Program Title in Italian Language</it>
-</title>
-
-<unique_id>123shaboo</unique_id>
-
-<standalone>Yes</standalone>
-
-<icon>program.png</icon>
-
-<description>
- <en>This is the [b]English Description[/b] of the file.
- Can use [i]multiple lines[/i] and BBCode.</en>
- <de>The German Description</de>
- <it>The Italian Description</it>
- <fr>The French Description</fr>
-</description>
-
-<previewpic>
- <pic1>./preview/pic1.jpg</pic1>
- <pic2>./preview/pic2.jpg</pic2>
-</previewpic>
-
-<author>
- <name>EvilDragon</name>
- <website>http://www.openpandora.org</website>
-</author>
-
-<version>
- <major>1</major>
- <minor>1</minor>
- <release>1</release>
- <build>2</build>
-</version>
-
-<exec>program.exe</exec>
-
-<category>
- <main>Main category</main>
- <subcategory1>Subcategory 1</subcategory1>
- <subcategory2>Subcategory 2</subcategory2>
-</category>
-
-<altcategory>
- <main>Alternate category</main>
- <subcategory1>Alternate Subcategory 1</subcategory1>
- <subcategory2>Alternate Subcategory 2</subcategory2>
-</altcategory>
-
-<osversion>
- <major>1</major>
- <minor>1</minor>
- <release>1</release>
- <build>2</build>
-</osversion>
-
-<associationitem1>
- <name>View this Picture</name>
- <filetype>jpg,bmp,gif</filetype>
- <parameter>view</parameter>
-</associationitem1>
-
-<associationitem2>
- <name>Convert this Picture</name>
- <filetype>jpg,bmp,gif</filetype>
- <parameter>convert</parameter>
-</associationitem2>
-
-<associationitem3>
- <name>Watch This Movie</name>
- <filetype>mpg,avi,wmv</filetype>
- <parameter>convert</parameter>
-</associationitem3>
-
-<clockspeed>600</clockspeed>
-
-<background>Yes</background>
-
-<startdir>../differentdir</startdir>
-
-</PXML>
+++ /dev/null
-<?xml version="1.0"?>
-<PXML>
-<title>
- <en>Program Title</en>
- <de>Program Title in German Language</de>
- <fr>Program Title in French Language</fr>
- <it>Program Title in Italian Language</it>
-</title>
-
-<unique_id>124bingle</unique_id>
-
-<standalone>Yes</standalone>
-
-<icon>program.png</icon>
-
-<description>
- <en>This is the [b]English Description[/b] of the file.
- Can use [i]multiple lines[/i] and BBCode.</en>
- <de>The German Description</de>
- <it>The Italian Description</it>
- <fr>The French Description</fr>
-</description>
-
-<previewpic>
- <pic1>./preview/pic1.jpg</pic1>
- <pic2>./preview/pic2.jpg</pic2>
-</previewpic>
-
-<author>
- <name>EvilDragon</name>
- <website>http://www.openpandora.org</website>
-</author>
-
-<version>
- <major>1</major>
- <minor>1</minor>
- <release>1</release>
- <build>2</build>
-</version>
-
-<exec>program.exe</exec>
-
-<category>
- <main>Main category</main>
- <subcategory1>Subcategory 1</subcategory1>
- <subcategory2>Subcategory 2</subcategory2>
-</category>
-
-<altcategory>
- <main>Alternate category</main>
- <subcategory1>Alternate Subcategory 1</subcategory1>
- <subcategory2>Alternate Subcategory 2</subcategory2>
-</altcategory>
-
-<osversion>
- <major>1</major>
- <minor>1</minor>
- <release>1</release>
- <build>2</build>
-</osversion>
-
-<associationitem1>
- <name>View this Picture</name>
- <filetype>jpg,bmp,gif</filetype>
- <parameter>view</parameter>
-</associationitem1>
-
-<associationitem2>
- <name>Convert this Picture</name>
- <filetype>jpg,bmp,gif</filetype>
- <parameter>convert</parameter>
-</associationitem2>
-
-<associationitem3>
- <name>Watch This Movie</name>
- <filetype>mpg,avi,wmv</filetype>
- <parameter>convert</parameter>
-</associationitem3>
-
-<clockspeed>600</clockspeed>
-
-<background>Yes</background>
-
-<startdir>../differentdir</startdir>
-
-</PXML>