]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/wx-console/wxbrestorepanel.h
kes Simplify locking in the reservations system.
[bacula/bacula] / bacula / src / wx-console / wxbrestorepanel.h
index 56a172494b87daf807742e418ee67f71a515f337..4f6bae9d83763798f1771297c6ce7c5f24f84d72 100644 (file)
@@ -7,22 +7,32 @@
  *    Version $Id$
  */
 /*
-   Copyright (C) 2004 Kern Sibbald and John Walker
+   Bacula® - The Network Backup Solution
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License
-   as published by the Free Software Foundation; either version 2
-   of the License, or (at your option) any later version.
+   Copyright (C) 2004-2006 Free Software Foundation Europe e.V.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+   General Public License for more details.
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
- */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
+
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
 
 #ifndef WXBRESTOREPANEL_H
 #define WXBRESTOREPANEL_H
 
 WX_DECLARE_LIST(wxEvent, wxbEventList);
 
+/* Class for storing directory entries (results from dir commands). */
+class wxbDirEntry {
+public:
+   wxString perm;
+   wxString nlink;
+   wxString user;
+   wxString group;
+   wxString size;
+   wxString date;
+   int marked; /* 0 - Not Marked, 1 - Marked, 2 - Some file under is marked */
+   wxString fullname; /* full name with path */
+   wxString filename; /* only filename, no path */
+};
+
 /*
  * wxbPanel for restoring files
  */
@@ -100,7 +124,7 @@ class wxbRestorePanel : public wxbPanel
       void UpdateTreeItem(wxTreeItemId item, bool updatelist, bool recurse);
 
       /* Parse dir command results. */
-      wxString* ParseList(wxString line);
+      int ParseList(wxString line, wxbDirEntry* entry);
 
       /* Sets a list item state, and update its parents and children if it is a directory */
       void SetListItemState(long listitem, int newstate);
@@ -126,14 +150,14 @@ class wxbRestorePanel : public wxbPanel
 /* Status related */
       enum status_enum
       {
-        disabled,    // The panel is not activatable
-        activable,   // The panel is activable, but not activated
-        entered,     // The panel is activated
-        choosing,    // The user is choosing files to restore
-        listing,     // Dir listing is in progress
-        configuring, // The user is configuring restore process
-        restoring,   // Bacula is restoring files
-        finished     // Retore done (state will change in activable)
+         disabled,    // The panel is not activatable
+         activable,   // The panel is activable, but not activated
+         entered,     // The panel is activated
+         choosing,    // The user is choosing files to restore
+         listing,     // Dir listing is in progress
+         configuring, // The user is configuring restore process
+         restoring,   // Bacula is restoring files
+         finished     // Retore done (state will change in activable)
       };
 
       status_enum status;
@@ -151,7 +175,7 @@ class wxbRestorePanel : public wxbPanel
       bool working; // A command is running, discard GUI events
       void SetWorking(bool working);
       bool IsWorking();
-      bool markWhenListingDone;
+      bool markWhenCommandDone; //If an item should be (un)marked after the current listing/marking is done
       wxTreeItemId currentTreeItem; // Currently selected tree item
 
       /* Enable or disable config controls status */