From c48296cd6b036a545008d40ef91fc1a71d134ee9 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (laptop)" <j.wuttke@fz-juelich.de>
Date: Thu, 17 Jan 2013 20:33:38 +0100
Subject: [PATCH] prepare file backup

---
 pub/src/commands.cpp | 12 ++++++++++++
 pub/src/mem.cpp      | 20 ++++++++++++++++++++
 pub/src/mem.h        |  4 ++++
 3 files changed, 36 insertions(+)

diff --git a/pub/src/commands.cpp b/pub/src/commands.cpp
index 40e4c53d..f16ac942 100644
--- a/pub/src/commands.cpp
+++ b/pub/src/commands.cpp
@@ -64,6 +64,7 @@ bool fridaCommand( string cmd )
             "  !    execute shell command\n"
             "  quit terminate Frida session\n"
             "Command groups (type initial letter for help):\n"
+            "  b    backup of online files\n"
             "  c    curves and fits\n"
             "  d    directory (inspect internal files)\n"
             "  e    edit (change textual parameters)\n"
@@ -89,6 +90,17 @@ bool fridaCommand( string cmd )
     } else if (cmd == "hf") {
         cout << NFunctions::list();
 
+    } else if (cmd == "b") {
+        cout << "Backup commands:\n"
+            "  br   retrieved backup copy\n"
+            "  bs   store copy of selected files (automatically before cf)\n";
+
+    } else if (cmd == "br") {
+        NOlm::mem_retrieve();
+
+    } else if (cmd == "bs") {
+        NOlm::mem_backup();
+
     } else if (cmd == "c") {
         cout << "Curve and fit commands:\n"
             "  cc   create\n"
diff --git a/pub/src/mem.cpp b/pub/src/mem.cpp
index a0d537ef..94abd93f 100644
--- a/pub/src/mem.cpp
+++ b/pub/src/mem.cpp
@@ -317,3 +317,23 @@ namespace NOlm {
         mem_del();
     }
 }
+
+//***************************************************************************//
+//*  Backup and retrieve                                                    *//
+//***************************************************************************//
+
+namespace NOlm {
+
+    //! Copy selected files to backup.
+    void mem_backup()
+    {
+        throw "not yet implemented";
+    }
+
+    //! Retrieve files from backup.
+
+    void mem_retrieve()
+    {
+        throw "not yet implemented";
+    }
+}
diff --git a/pub/src/mem.h b/pub/src/mem.h
index 1aebe439..21a72717 100644
--- a/pub/src/mem.h
+++ b/pub/src/mem.h
@@ -37,6 +37,10 @@ namespace NOlm {
     void sel_collect_end();
     void sel_increment( int step );
 
+    // Backup:
+    void mem_backup();
+    void mem_retrieve();
+
     //! Iterate over all files in selection.
     class IterateO {
     protected:
-- 
GitLab