X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-libraries.git;a=blobdiff_plain;f=include%2Fpnd_discovery.h;h=b296f463e7fbe2b68566c9d6a504541fa3e34ae3;hp=33513d3be4824c630fff983930d00f41d3e7c4c5;hb=9d8efac55eedac560ba5928853142f0bc92e1cdd;hpb=24706968659a55b5ac69d8f569eb12148154fe17 diff --git a/include/pnd_discovery.h b/include/pnd_discovery.h index 33513d3..b296f46 100644 --- a/include/pnd_discovery.h +++ b/include/pnd_discovery.h @@ -16,6 +16,7 @@ extern "C" { * overridespath may be NULL if you do not wish to search for pxml overrides */ pnd_box_handle pnd_disco_search ( char *searchpath, char *overridespath ); +pnd_box_handle pnd_disco_file ( char *path, char *filename ); // should you wish to 'discover' one .pnd-file /* pnd_disco_t describes a given entry found by the discovery code; ie: the containers key is the path to * the PXML file (since this is relatively unique), with the fields below detailing the executable path, @@ -43,7 +44,11 @@ typedef enum { // fetch the full PXML and get all the details. But I think we got out of control here :) // NOTE: We really need to rework disco-t so it can include non-english titles/desc; perhaps more info as optional, // or a name/value pairing system so it can have extra data in it, without a complex structure. -#define PND_DISCO_FLAG_OVR 1 // An ovr file was found for this app (not per subapp, just per .pnd) +#define PND_DISCO_FLAG_OVR 1 // An ovr file was found for this app (not per subapp, just per .pnd) +#define PND_DISCO_GENERATED 2 // This disco is 'faux', made up and not reflecting a real 'pnd file' +#define PND_DISCO_LIBPND_DD 4 // This disco is from libpnd .desktop parsing +#define PND_DISCO_CUSTOM1 (1<<30) // An app may make use of this bitflag safely +#define PND_DISCO_CUSTOM2 (1<<31) // An app may make use of this bitflag safely typedef struct { // base unsigned char object_type; // see enum above @@ -51,11 +56,13 @@ typedef struct { char *object_filename; // filename within object_path of the app: the PXML.xml or awesomeapp.pnd file itself unsigned int pnd_icon_pos; // offset to the byte after end of PXML in a pnd file (should be icon if present) unsigned char subapp_number; // # of app within PXML (ie: 0, 1, 2, 3, up to the number of apps within the PXML) - unsigned int object_flags; + unsigned int object_flags; // see PND_DISCO_ bitmasks above // strdup'd from PXML -- hey, who was the idiot who thought it was a reat idea not to just re-use the pxml-struct? + char *package_id; char *title_en; char *desc_en; char *unique_id; + char *appdata_dirname; // preferred dir name for appdata; if missing, use unique-id char *icon; char *exec; char *execargs; @@ -74,6 +81,25 @@ typedef struct { char *info_name; // should be a struct.. char *info_filename; char *info_type; + char *version_major; + char *version_minor; + char *version_release; + char *version_build; + char *package_version_major; + char *package_version_minor; + char *package_version_release; + char *package_version_build; + // why are we not using typedef'd arrays here? :/ in the name of consistency with + // existing above, lets just copy from pxml and use a list of [123] members.. + char *associationitem1_name; + char *associationitem1_filetype; + char *associationitem1_parameter; // placeholder + char *associationitem2_name; + char *associationitem2_filetype; + char *associationitem2_parameter; // placeholder + char *associationitem3_name; + char *associationitem3_filetype; + char *associationitem3_parameter; // placeholder } pnd_disco_t; void pnd_disco_destroy ( pnd_disco_t *p ); // a function name that simply could not be avoided