72e0ce1046d3a1839e66dd6dc196d734f24a445d kent Thu Jun 17 14:23:40 2010 -0700 Adding a few functions to cart and trackDb to make it easier to buildcarts and trackDbs out of an existing string-valued hash. diff --git src/hg/inc/cart.h src/hg/inc/cart.h index 2df9559..1aaf4f2 100644 --- src/hg/inc/cart.h +++ src/hg/inc/cart.h @@ -44,9 +44,16 @@ * strings to not include. oldVars is an optional hash to put in values * that were just overwritten by cgi-variables. */ -struct cart *cartNewEmpty(unsigned int userId, unsigned int sessionId, +struct cart *cartOfNothing(); +/* Create a new, empty, cart with no real connection to the database. */ + +struct cart *cartFromHash(struct hash *hash); +/* Create a cart from hash */ + +struct cart *cartFromCgiOnly(unsigned int userId, unsigned int sessionId, char **exclude, struct hash *oldVars); -/* Create a new empty cart structure without reading from the database. */ +/* Create a new cart that contains only CGI variables, nothing from the + * database, and no way to write back to database either. */ void cartCheckout(struct cart **pCart); /* Save cart to database and free it up. */