a80b650af2368300e4fd69251ff9d47e83c235a3 tdreszer Fri Dec 17 14:53:16 2010 -0800 New CFI 'hgFileUi' for composites with downloadable files diff --git src/hg/inc/fileUi.h src/hg/inc/fileUi.h index 99abead..6b0fcf5 100644 --- src/hg/inc/fileUi.h +++ src/hg/inc/fileUi.h @@ -1,23 +1,33 @@ /* hui - human genome browser user interface controls that are shared * between more than one CGI. */ #ifndef FILEUI_H #define FILEUI_H #include "cart.h" #include "trackDb.h" +#define DOWNLOADS_ONLY_TYPE "downloadsOnly" +#define DOWNLOADS_ONLY_TITLE "Downloadable Files" +#define FILE_SORT_ORDER "fileSortOrder" + +INLINE boolean tdbIsDownloadsOnly(struct trackDb *tdb) +// Is this a downloadsOnly tdb +{ +return (tdb && sameWord(tdb->type,DOWNLOADS_ONLY_TYPE)); +} + struct fileDb // File in a list of downloadable files { struct fileDb *next; // single link list char *fileName; // File Name unsigned long fileSize; // File size char *fileDate; // File Modified? date and time struct mdbObj *mdb; // The files are not trackDb entries but are found in the metaDb only char **sortFields; // Array of strings to sort on in sort Order boolean *reverse; // Direction of sort for array }; struct fileDb *fileDbGet(char *db, char *dir, char *subDir, char *fileName); // Returns NULL or if found a fileDb struct with name, size and date filled in.