~ubuntu-branches/ubuntu/maverick/luckybackup/maverick

« back to all changes in this revision

Viewing changes to src/commandline.h

  • Committer: Bazaar Package Importer
  • Author(s): Patrick Matthäi
  • Date: 2009-05-21 20:09:36 UTC
  • Revision ID: james.westby@ubuntu.com-20090521200936-jcbu6euvoxz7sef7
Tags: upstream-0.3
Import upstream version 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-------------------------commandline.h------------------------------------------
 
2
        header file for commandline.cpp
 
3
 
 
4
===============================================================================================================================
 
5
===============================================================================================================================
 
6
     This file is part of "luckyBackup" project
 
7
     Copyright 2008-2009, Loukas Avgeriou
 
8
     luckyBackup is distributed under the terms of the GNU General Public License
 
9
     luckyBackup is free software: you can redistribute it and/or modify
 
10
     it under the terms of the GNU General Public License as published by
 
11
     the Free Software Foundation, either version 3 of the License, or
 
12
     (at your option) any later version.
 
13
 
 
14
     luckyBackup is distributed in the hope that it will be useful,
 
15
     but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
     GNU General Public License for more details.
 
18
 
 
19
     You should have received a copy of the GNU General Public License
 
20
     along with luckyBackup.  If not, see <http://www.gnu.org/licenses/>.
 
21
 
 
22
 project version        : Please see "main.cpp" for project version
 
23
 
 
24
 developer              : luckyb 
 
25
 last modified          : 25 January 2009
 
26
===============================================================================================================================
 
27
===============================================================================================================================
 
28
 
 
29
 runs luckybackup in command line mode
 
30
*/
 
31
 
 
32
#ifndef COMMANDLINE_H
 
33
#define COMMANDLINE_H
 
34
 
 
35
#include <iostream>
 
36
 
 
37
using namespace std;
 
38
 
 
39
//==============================================================================================================
 
40
//Declaration of commandline class (this is the class that runs luckybackup in command line mode)
 
41
class commandline
 
42
{
 
43
        public:
 
44
                commandline ();
 
45
                ~commandline();
 
46
 
 
47
                void rsyncIT();         //perform rsync execution
 
48
                void thats_all();       //display a "finished" message
 
49
                void help();            //displays a help message
 
50
                int result();           //executes all necessary function & returns an integer
 
51
                bool argsTest(int, char**);     //returns true if the umber of arguments is valid (2)
 
52
 
 
53
                bool console;           //these become true depending on the argument given at command line
 
54
                bool NoQuestions;
 
55
                bool SkipCritical;
 
56
                bool DryRun;
 
57
                int count;              //simple count variable !!
 
58
                QString CheckedData;    //String holding the ok - notOK message after the backup dirs check
 
59
                bool writeToLog;        //if the log file is ok to write this becomes TRUE
 
60
 
 
61
        private:
 
62
                char* profileName;
 
63
                void intro();           //display an intro message
 
64
                bool loadCurrentProfile();      //loads an already created profile
 
65
                bool check_list();      //check the operations list
 
66
                bool check_dirs();      //check directories of declared profile data
 
67
};
 
68
 
 
69
#endif
 
70
// end of commandline.h---------------------------------------------------------
 
71