2a1b2c58c1fbc54cb24b1476670557fdfdfef187 braney Tue Aug 16 19:20:29 2011 -0700 cleaning up the library to remove a dependency on the cart that used to be necessary when private hubs were saved in the trash, rather than the hubStatus table. This fixes up an ifdef that Tim did to fix some bug with right-click in v255 diff --git src/hg/inc/hubConnect.h src/hg/inc/hubConnect.h index c4f964a..b2011d3 100644 --- src/hg/inc/hubConnect.h +++ src/hg/inc/hubConnect.h @@ -37,87 +37,86 @@ unsigned status; /* 1 if private */ }; /* status bits */ #define HUB_UNLISTED (1 << 0) boolean isHubUnlisted(struct hubConnectStatus *hub) ; /* Return TRUE if it's an unlisted hub */ void hubConnectStatusFree(struct hubConnectStatus **pHub); /* Free hubConnectStatus */ void hubConnectStatusFreeList(struct hubConnectStatus **pList); /* Free a list of dynamically allocated hubConnectStatus's */ -struct hubConnectStatus *hubConnectStatusForId(struct cart *cart, - struct sqlConnection *conn, int id); +struct hubConnectStatus *hubConnectStatusForId( struct sqlConnection *conn, + int id); /* Given a hub ID return associated status. */ struct hubConnectStatus *hubConnectStatusListFromCart(struct cart *cart); /* Return list of track hubs that are turned on by user in cart. */ struct hubConnectStatus *hubConnectStatusListFromCartAll(struct cart *cart); /* Return list of all track hubs that are referenced by cart. */ #define hubConnectTrackHubsVarName "trackHubs" /* Name of cart variable with list of track hubs. */ #define hgHubConnectCgiDestUrl "hgHubConnect.destUrl" /* Cart variable to tell hgHubConnect where to go on submit. */ #define hgHubConnectRemakeTrackHub "hgHubConnect.remakeTrackHub" /* Cart variable to indicate trackHub cart variable needs refreshing. */ #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 */ -int hubIdFromTrackName(char *trackName); +unsigned hubIdFromTrackName(char *trackName); /* Given something like "hub_123_myWig" return 123 */ -struct trackDb *hubConnectAddHubForTrackAndFindTdb(struct cart *cart, - char *database, char *trackName, struct trackDb **pTdbList, - struct hash *trackHash); +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); /* write out a hubConnectStatus structure to a file */ unsigned hubFindOrAddUrlInStatusTable(char *database, struct cart *cart, char *url, char **errorMessage); /* find or add a URL to the status table */ unsigned hubResetError(char *url); /* 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 */ boolean hubCheckForNew(char *database, struct cart *cart); /* see if the user just typed in a new hub url, return TRUE if so */ -struct trackHub *trackHubFromId(struct cart *cart, unsigned hubId); +struct trackHub *trackHubFromId(unsigned hubId); /* Given a hub ID number, return corresponding trackHub structure. * ErrAbort if there's a problem. */ void hubSetErrorMessage(char *errorMessage, unsigned id); /* set the error message in the hubStatus table */ #endif /* HUBCONNECT_H */