d1bc57639309864bb2665bd46eddfe75863f76e4
braney
  Tue Apr 23 16:42:54 2024 -0700
rearrange how we're doing hub groups.

diff --git src/hg/inc/hubConnect.h src/hg/inc/hubConnect.h
index 39e7f02..59fe87c 100644
--- src/hg/inc/hubConnect.h
+++ src/hg/inc/hubConnect.h
@@ -106,30 +106,33 @@
 #define hgHubConnectHubVarPrefix "hgHubConnect.hub."
 /* Prefix to temporary variable holding selected cart names. */
 
 boolean hubConnectTableExists();
 /* Return TRUE if the hubConnect table exists. */
 
 struct slName  *hubConnectHubsInCart(struct cart *cart);
 /* Return list of track hub ids that are turned on by user. */
 
 int hubIdFromCartName(char *trackName);
 /* Given something like "hgHubConnect.hub.123" return 123 */
 
 unsigned hubIdFromTrackName(char *trackName);
 /* Given something like "hub_123_myWig" return 123 */
 
+char *hubNameFromGroupName(char *groupName);
+/* Given something like "hub_123_myWig" return hub_123 */
+
 void hubConnectAddDescription(char *database, struct trackDb *tdb);
 /* Fetch tdb->track's html description (or nearest ancestor's non-empty description)
  * and store in tdb->html. */
 
 struct trackDb *hubConnectAddHubForTrackAndFindTdb( char *database, 
     char *trackName, struct trackDb **pTdbList, struct hash *trackHash);
 /* Go find hub for trackName (which will begin with hub_), and load the tracks
  * for it, appending to end of list and adding to trackHash.  Return the
  * trackDb associated with trackName. */
 
 char *hubFileVar();
 /* return the name of the cart variable that holds the name of the
  * file in trash that has private hubs */
 
 boolean hubWriteToFile(FILE *f, struct hubConnectStatus *el);
@@ -142,31 +145,31 @@
 /* clear the error for this url in the hubStatus table,return the id */
 
 unsigned hubClearStatus(char *url);
 /* drop the information about this url from the hubStatus table,return the id */
 
 void hubDisconnect(struct cart *cart, char *url);
 /* drop the information about this url from the hubStatus table, and 
  * the cart variable the references this hub */
 
 void hubUpdateStatus(char *errorMessage, struct hubConnectStatus *hub);
 /* set the error message in the hubStatus table */
 
 boolean trackHubHasDatabase(struct trackHub *hub, char *database) ;
 /* Return TRUE if hub has contents for database */
 
-struct trackDb *hubAddTracks(struct hubConnectStatus *hub, char *database, boolean *foundFirstGenome, struct hash *trackDbNameHash);
+struct trackDb *hubAddTracks(struct hubConnectStatus *hub, char *database, boolean *foundFirstGenome, struct hash *trackDbNameHash, struct grp **hubGroups);
 /* Load up stuff from data hub and append to list. The hubUrl points to
  * a trackDb.ra format file. Only the first example of a genome gets to 
  * populate groups, the others get a group for the trackHub.  A particular 
  * trackDb is only read once even if referenced from more than one hub.  */
 
 char *hubConnectLoadHubs(struct cart *cart);
 /* load the track data hubs.  Set a static global to remember them */
 
 struct hubConnectStatus *hubConnectGetHubs();
 /* return the static global to the track data hubs */
 
 struct trackHub *hubConnectGetHub(char *hubUrl);
 /* Return the connected hub for hubUrl, or NULL if not found.  Do not free result. */
 
 struct trackHub *hubConnectGetHubForDb(char *db);