src/hg/inc/hdb.h 1.167

1.167 2009/05/20 20:59:55 mikep
Libified findTdbForTable, findTypeForTable, trackIsType, hIsBigBed from hgTables so that other code can easily determine if a track is a bigBed.
Index: src/hg/inc/hdb.h
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/inc/hdb.h,v
retrieving revision 1.166
retrieving revision 1.167
diff -b -B -U 4 -r1.166 -r1.167
--- src/hg/inc/hdb.h	17 Mar 2009 19:54:56 -0000	1.166
+++ src/hg/inc/hdb.h	20 May 2009 20:59:55 -0000	1.167
@@ -29,8 +29,12 @@
 
 #ifndef BED_H
 #include "bed.h"
 #endif
+
+#ifndef CUSTOMTRACK_H
+#include "customTrack.h"
+#endif
 struct chromInfo;
 
 /* At or below this number of sequences, allow split tables: */
 #define HDB_MAX_SEQS_FOR_SPLIT 100
@@ -783,5 +788,29 @@
 char *hGenbankModDate(char *acc, struct sqlConnection *conn);
 /* Get string for genbank last modification date, or NULL if not found..
  * Free resulting string. */
 
+struct trackDb *findTdbForTable(char *db,struct trackDb *parent,char *table, struct customTrack *(*ctLookupName)(char *table));
+/* Find or creates the tdb for this table.  Might return NULL! (e.g. all tables) 
+ * If this is a custom track, pass in function ctLookupName(table) which looks up a 
+ * custom track by name, otherwise pass NULL
+ */
+
+char *findTypeForTable(char *db,struct trackDb *parent,char *table, struct customTrack *(*ctLookupName)(char *table));
+/* Finds the TrackType for this Table */
+
+boolean trackIsType(char *database, char *table, struct trackDb *parent, char *type, struct customTrack *(*ctLookupName)(char *table));
+/* Return TRUE track is a specific type.  Type should be something like "bed" or
+ * "bigBed" or "bigWig" 
+ * if table has no parent trackDb pass NULL for parent 
+ * If this is a custom track, pass in function ctLookupName(table) which looks up a 
+ * custom track by name, otherwise pass NULL
+ */
+
+boolean hIsBigBed(char *database, char *table, struct trackDb *parent, struct customTrack *(*ctLookupName)(char *table));
+/* Return TRUE if table corresponds to a bigBed file. 
+ * if table has no parent trackDb pass NULL for parent 
+ * If this is a custom track, pass in function ctLookupName(table) which looks up a 
+ * custom track by name, otherwise pass NULL
+ */
+
 #endif /* HDB_H */