6cf16b43c692baeafcc0522d33f5fa1ef2824673
[pandora-libraries.git] / include / pnd_apps.h
1
2 #ifndef h_pnd_apps_h
3 #define h_pnd_apps_h
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 #define PND_APPS_SEARCHPATH "/mnt/sd1/pandora/apps:/mnt/sd2/pandora/apps:./testdata/apps"
10 #define PND_APPS_KEY "autodiscovery.searchpath"
11
12 #define PND_PNDRUN_SEARCHPATH "pnd.searchpath"
13 #define PND_PNDRUN_KEY "pnd.default"
14 #define PND_PNDRUN_FILENAME "pnd_run.sh"
15 #define PND_PNDRUN_DEFAULT "./testdata/scripts/pnd_run.sh"
16
17 #define PND_PXML_OVERRIDE_SEARCHPATH "~/pxml-overrides"
18 #define PND_PXML_OVERRIDE_KEY "overrides.searchpath"
19
20 #define PND_MOUNT_PATH "/mnt/apps/" /* all mounted PND images should be here.. /mnt/apps/myapp/... */
21
22 // .desktop support
23 #define PND_DOTDESKTOP_KEY "dotfiles.dotdesktoppath"
24 #define PND_DOTDESKTOP_DEFAULT "/usr/share/applications"
25
26 // apps
27 #define PND_DEFAULT_WORKDIR "/tmp"
28
29 /* pnd_apps_exec() is used to blindly launch an app, be it a .pnd file bundle or a plain executable
30  * (shell, bin, whatever.) pndrun specifies the full path to the pnd_run sh script, which should be
31  * found using searchpaths and locates.. see locatetest.c for a sample
32  *   if fullpath ends in PXML_FILENAME (PXML.xml) then pnd_run will be invoked (after extracting goodies
33  *     from PXML file as appropriate)
34  *   if fullpath ends in .pnd then pnd_run will be invoked (after inspecting embedded PXML or best-guess)
35  *   otherwise the fullpath will be executed as-is
36  */
37 signed char pnd_apps_exec ( char *fullpath, char *pndrun );
38
39 #ifdef __cplusplus
40 } /* "C" */
41 #endif
42
43 #endif