0615451d856749db2e4febb4995ff8aee72a8f25
angie
  Wed Jan 7 12:04:18 2015 -0800
Adding cartJson lib module (to be used by hgAi).  It parses JSON commands andreturns information in JSON to support moving more UI actions into Javascript.
The lib supports basic queries and actions like getting a list of the groups,
tracks and tables (incl. hubs & CTs) and changing the clade/genome/db.  Apps/CGIs
can extend it to handle new commands by registering handler functions.

diff --git src/hg/inc/hdb.h src/hg/inc/hdb.h
index fbca344..f6954e4 100644
--- src/hg/inc/hdb.h
+++ src/hg/inc/hdb.h
@@ -664,30 +664,43 @@
 
 char *hGetTableForTrack(char *db, char *track);
 /* Given a track name, get table associated with it. */
 
 char *hTrackOpenVis(char *db, char *trackName);
 /* Return "pack" if track is packable, otherwise "full". */
 
 struct dbDb *hGetIndexedDatabases(void);
 /* Get list of all active databases.
  * Dispose of this with dbDbFreeList. */
 
 struct dbDb *hGetIndexedDatabasesForClade(char *db);
 /* Get list of active databases in db's clade.
  * Dispose of this with dbDbFreeList. */
 
+struct slPair *hGetCladeOptions();
+/* Return a list of slPairs, each containing clade menu value (hgcentral.clade.name, e.g. 'mammal')
+ * and clade menu label (hgcentral.clade.label, e.g. 'Mammal'),
+ * useful for constructing a clade menu. */
+
+struct slPair *hGetGenomeOptionsForClade(char *clade);
+/* Return a list of slPairs, each containing genome menu value and menu label,
+ * useful for constructing a genome menu for the given clade. */
+
+struct slPair *hGetDbOptionsForGenome(char *genome);
+/* Return a list of slPairs, each containing db menu value and menu label,
+ * useful for constructing an assembly menu for the given genome. */
+
 struct slName *hLiftOverFromDbs(void);
 /* Return a list of names of the DBs in the
  * fromDb column of the liftOverChain.*/
 
 struct slName *hLiftOverToDbs(char *fromDb);
 /* Return a list of names of the DBs in the
  * toDb column of the liftOverChain.
  * If fromDb!=NULL, return only those with that
  * fromDb. */
 
 struct slName *hLiftOverFromOrgs(void);
 /* Return a list of names of organisms that
  * have databases in the fromDb column of
  * liftOverChain.*/