9 // default application searchpath (and key to look it up in config)
10 #define PND_APPS_SEARCHPATH "/media/*/pandora/apps:/usr/pandora/apps"
11 #define PND_APPS_KEY "autodiscovery.searchpath"
13 // default notify searchpath (and key to look it up in config)
14 #define PND_APPS_NOTIFYPATH "/media:/media/*/pandora/apps:/usr/pandora/apps"
15 #define PND_APPS_NOTIFY_KEY "autodiscovery.notifypath"
17 #define PND_PNDRUN_SEARCHPATH_KEY "pnd.searchpath"
18 #define PND_PNDRUN_KEY "pnd.runscript"
19 #define PND_PNDRUN_FILENAME "pnd_run.sh"
20 #define PND_PNDRUN_DEFAULT "/usr/pandora/scripts/pnd_run.sh"
22 #define PND_PXML_OVERRIDE_SEARCHPATH "~/pxml-overrides"
23 #define PND_PXML_OVERRIDE_KEY "overrides.searchpath"
25 #define PND_MOUNT_PATH "/mnt/apps/" /* all mounted PND images should be here.. /mnt/apps/myapp/... */
28 #define PND_DOTDESKTOP_KEY "dotfiles.dotdesktoppath"
29 #define PND_DOTDESKTOP_DEFAULT "~/.applications"
32 #define PND_DEFAULT_WORKDIR "./"
34 /* pnd_apps_exec() is used to blindly launch an app, be it a .pnd file bundle or a plain executable
35 * (shell, bin, whatever.) pndrun specifies the full path to the pnd_run sh script, which should be
36 * found using searchpaths and locates.. see locatetest.c for a sample
37 * pnd_run, fullpath, unique_id, rel_exec required
38 * rel_startdir, clockspeed, options are optional
39 * NOTE: Use pnd_locate function to locate the pnd_run, for example
40 * NOTE: if specified, clock speed will be set prior to invoking the script, and set back on exit
41 * NOTE: No values can be except clockspeed; a 0 clockspeed means 'leave alone'. Set startdoir to "." instead of NULL.
42 * fork() is implied; calling this function does not kill this process :)
43 * NOTE: PAss in the full path to the awesomeapp.pnd or to the directory containing PXML.xml (not the PXML.xml itself.)
44 * Options is a set of boolean flags, derived from the #define's below; OR them together.
45 * option-block, when set, suggests the launch should wait until the invoked application exits (disregarding why app exits)
46 * example: options = PND_EXEC_OPTION_BLOCK | PND_EXEC_OPTION_2;
48 #define PND_EXEC_OPTION_NIL 0
49 #define PND_EXEC_OPTION_BLOCK 1 /* wait till children complete; note, children might fork on their own.. */
50 #define PND_EXEC_OPTION_NOUNION 2 /* request pnd_run not use a union, just do the mount/run */
51 #define PND_EXEC_OPTION_FUTURE2 4
53 unsigned char pnd_apps_exec ( char *pndrun, char *fullpath, char *unique_id,
54 char *rel_exec, char *rel_startdir,
55 unsigned int clockspeed, unsigned int options );