Update arguments passed to upload script.
[cumulus.git] / remote.h
index 705fe80..7c084c7 100644 (file)
--- a/remote.h
+++ b/remote.h
@@ -24,7 +24,9 @@ public:
 
     RemoteStore(const std::string &stagedir);
     ~RemoteStore();
-    RemoteFile *alloc_file(const std::string &name);
+    void set_script(const std::string &script)
+        { backup_script = script; }
+    RemoteFile *alloc_file(const std::string &name, const std::string &type);
     void enqueue(RemoteFile *file);
     void sync();
 
@@ -33,7 +35,7 @@ private:
     pthread_mutex_t lock;
     pthread_cond_t cond;
 
-    std::string staging_dir;
+    std::string staging_dir, backup_script;
     bool terminate;             // Set when thread should shut down
     bool busy;                  // True while there are pending transfers
     std::list<RemoteFile *> transfer_queue;
@@ -63,12 +65,13 @@ private:
     friend class RemoteStore;
 
     RemoteFile(RemoteStore *remote,
-               const std::string &name, const std::string &local_path);
+               const std::string &name, const std::string &type,
+               const std::string &local_path);
 
     RemoteStore *remote_store;
 
     int fd;
-    std::string local_path;
+    std::string type, local_path;
     std::string remote_path;
 };