Initial commit of libpnd 0.0.5 so we cna restart with GIT
[pandora-libraries.git] / include / pnd_discovery.h
1
2 #ifndef h_pnd_discovery_h
3 #define h_pnd_discovery_h
4
5 #ifdef __cplusplus
6 extern "C" {
7 #endif
8
9 // this code is for doing the application discovery against a given directory and its children (ie: this
10 // code could be called on appliction startup, or as a result of media eject/insert, and so forth.)
11
12 /* disco_search() will walk the given search path (one or more paths, colon separated) in order left to
13  * right; as PXML's are found, basic analysis is performed to verfy validity. A list of valid applications
14  * is returned, the union of all matches in the search path
15  * If no matches are found, NULL is returned (to save you deleting the container)
16  * overridespath may be NULL if you do not wish to search for pxml overrides
17  */
18 pnd_box_handle pnd_disco_search ( char *searchpath, char *overridespath );
19
20 /* pnd_disco_t describes a given entry found by the discovery code; ie: the containers key is the path to
21  * the PXML file (since this is relatively unique), with the fields below detailing the executable path,
22  * application name, unique-id and so on
23  *
24  * NOTE: this struct is dynamicly populated; you are responsible for invoking the destroy() function to
25  * kill its contents, and the pnt_box_destroy() to kill the container at the end
26  *
27  * NOTE: The PXML path (or .pnd file path in bundle files) is used as a key since it is unique. The
28  * application 'unique id' will be unique for a given app, but that app could be in multiple directories
29  * or on multiple SD cards or wifi or whatever, so only the mounted path is truly unique. The key
30  * is only used internally so the consumer can refer to multiple versions of the same app without
31  * confusion.. it is not displayed. So no big deal.
32  */
33
34 typedef struct\r
35 {
36         char *title_en;
37         char *title_de;
38         char *title_it;
39         char *title_fr;
40         char *unique_id;
41         char *standalone;
42         char *icon;
43         char *description_en;
44         char *description_de;
45         char *description_it;
46         char *description_fr;
47         char *previewpic1;
48         char *previewpic2;
49         char *author_name;
50         char *author_website;
51         char *version_major;
52         char *version_minor;
53         char *version_release;
54         char *version_build;
55         char *exec;
56         char *main_category;
57         char *subcategory1;
58         char *subcategory2;
59         char *altcategory;
60         char *altsubcategory1;
61         char *altsubcategory2;
62         char *osversion_major;
63         char *osversion_minor;
64         char *osversion_release;
65         char *osversion_build;
66         char *associationitem1_name;
67         char *associationitem1_filetype;
68         char *associationitem1_parameter;
69         char *associationitem2_name;
70         char *associationitem2_filetype;
71         char *associationitem2_parameter;
72         char *associationitem3_name;
73         char *associationitem3_filetype;
74         char *associationitem3_parameter;
75         char *clockspeed;
76         char *background;
77         char *startdir;
78 \r
79 } pnd_disco_t;
80
81 void pnd_disco_destroy ( pnd_disco_t *p ); // a function name that simply could not be avoided
82
83 #ifdef __cplusplus
84 } /* "C" */
85 #endif
86
87 #endif