02af9dedd3443875fc2b3eee09c48a5e6f85b1c3
chmalee
  Wed Nov 6 15:27:22 2024 -0800
Start of work on optional subdir and hubName metadata for hubtools uploads

diff --git src/hg/inc/userdata.h src/hg/inc/userdata.h
index bfe72e5..6348917 100644
--- src/hg/inc/userdata.h
+++ src/hg/inc/userdata.h
@@ -45,33 +45,34 @@
 char *webDataDir(char *userName);
 /* Return a web accesible path to the userDataDir, this is different from the full path tusd uses */
 
 char *getDataDir(char *userName);
 /* Return the full path to the user specific data directory, can be configured via hg.conf
  * on hgwdev, this is /data/apache/userdata/userStore/hash/userName/
  * on the RR, this is /userdata/userStore/hash/userName/ */
 
 char *prefixUserFile(char *userName, char *fname);
 /* Allocate a new string that contains the full per-user path to fname, NULL otherwise */
 
 char *writeHubText(char *path, char *userName, char *encodedHubName, char *hubName, char *db);
 /* Create a hub.txt file, optionally creating the directory holding it. For convenience, return
  * the file name of the created hub, which can be freed. */
 
-char *createNewTempHubForUpload(char *requestId, char *userName, char *db, char *trackName, char *trackType);
+char *createNewTempHubForUpload(char *requestId, char *userName, char *db, char *trackFileName, char *trackType, char *reqHubName);
 /* Creates a hub.txt for this upload with a random hub name. Returns the full path to the hub
- * for convenience. */
+ * for convenience. If the reqHubName argument is non-NULL, use that as the hub name instead of
+ * a random string AND do not create a hub.txt, only for use from hubtools up command */
 
 void addHubSpaceRowForFile(struct hubSpace *row);
 /* We created a file for a user, now add an entry to the hubSpace table for it */
 
 void removeFileForUser(char *fname, char *userName);
 /* Remove a file for this user if it exists */
 
 void removeHubForUser(char *path, char *userName);
 /* Remove a hub directory for this user (and all files in the directory), if it exists */
 
 struct userHubs *listHubsForUser(char *userName);
 /* Lists the directories for a particular user */
 
 time_t getHubLatestTime(struct userHubs *hub);
 /* Return the latest access time of the files in a hub */