3e20c7e4c1538c4f2509b3ce8113d5782ecbd743
tdreszer
  Fri Jun 10 13:40:52 2011 -0700
tdbIsDownloadsOnly moved to trackDb.h to be more widely available
diff --git src/hg/inc/trackDb.h src/hg/inc/trackDb.h
index d399a1a..8d4b9c6 100644
--- src/hg/inc/trackDb.h
+++ src/hg/inc/trackDb.h
@@ -231,30 +231,38 @@
 // Is this trackDb struct marked as a child of a composite or multiTrack ?
 {
 return tdb && tdb->parent && CONTAINER_CHILD_NODE(tdb->treeNodeType);
 }
 #define tdbIsSubtrack(tdb) tdbIsContainerChild(tdb)
 
 INLINE struct trackDb *tdbGetContainer(struct trackDb *tdb)
 // Return closest ancestor who is a container track.
 {
 struct trackDb *parent = tdb->parent;
 for ( ; parent != NULL && !tdbIsContainer(parent); parent = parent->parent)
      ;
 return parent;
 }
 
+#define DOWNLOADS_ONLY_TYPE  "downloadsOnly"
+INLINE boolean tdbIsDownloadsOnly(struct trackDb *tdb)
+// Is this a downloadsOnly tdb
+{
+return (tdb && sameWord(tdb->type,DOWNLOADS_ONLY_TYPE));
+}
+
+
 
 struct trackDb *trackDbLoad(char **row);
 /* Load a trackDb from row fetched with select * from trackDb
  * from database.  Dispose of this with trackDbFree(). */
 
 struct trackDb *trackDbLoadAll(char *fileName);
 /* Load all trackDb from whitespace-separated file.
  * Dispose of this with trackDbFreeList(). */
 
 struct trackDb *trackDbLoadWhere(struct sqlConnection *conn, char *table,
 	char *where);
 /* Load all trackDb from table that satisfy where clause. The
  * where clause may be NULL in which case whole table is loaded
  * Dispose of this with trackDbFreeList(). */