Command - synchronize

- Added a placeholder synchronize command, which will be implemented
  in mumble for the mumble mumble.
This commit is contained in:
Paul Beckingham 2011-09-05 08:49:10 -04:00
parent 402ac5b418
commit 47b948c866
4 changed files with 99 additions and 0 deletions

View file

@ -45,6 +45,7 @@ set (commands_SRCS Command.cpp Command.h
CmdStatistics.cpp CmdStatistics.h
CmdStop.cpp CmdStop.h
CmdSummary.cpp CmdSummary.h
CmdSynch.cpp CmdSynch.h
CmdTags.cpp CmdTags.h
CmdTimesheet.cpp CmdTimesheet.h
CmdUndo.cpp CmdUndo.h

54
src/commands/CmdSynch.cpp Normal file
View file

@ -0,0 +1,54 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// 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.
//
// 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.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <Context.h>
#include <CmdSynch.h>
extern Context context;
////////////////////////////////////////////////////////////////////////////////
CmdSynch::CmdSynch ()
{
_keyword = "synchronize";
_usage = "task synchronize";
_description = "(Not implemented for 2.0.0beta1)";
_read_only = false;
_displays_id = true;
}
////////////////////////////////////////////////////////////////////////////////
int CmdSynch::execute (std::string& output)
{
std::cout << "\n"
<< "Task Server Synchronization is not implemented in 2.0.0beta1.\n"
<< "\n";
return 1;
}
////////////////////////////////////////////////////////////////////////////////

42
src/commands/CmdSynch.h Normal file
View file

@ -0,0 +1,42 @@
////////////////////////////////////////////////////////////////////////////////
// taskwarrior - a command line task list manager.
//
// Copyright 2006 - 2011, Paul Beckingham, Federico Hernandez.
// All rights reserved.
//
// 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.
//
// 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.,
// 51 Franklin Street, Fifth Floor,
// Boston, MA
// 02110-1301
// USA
//
////////////////////////////////////////////////////////////////////////////////
#ifndef INCLUDED_CMDSYNCH
#define INCLUDED_CMDSYNCH
#define L10N // Localization complete.
#include <string>
#include <Command.h>
class CmdSynch : public Command
{
public:
CmdSynch ();
int execute (std::string&);
};
#endif
////////////////////////////////////////////////////////////////////////////////

View file

@ -79,6 +79,7 @@
#include <CmdStatistics.h>
#include <CmdStop.h>
#include <CmdSummary.h>
#include <CmdSynch.h>
#include <CmdTags.h>
#include <CmdTimesheet.h>
#include <CmdUndo.h>
@ -149,6 +150,7 @@ void Command::factory (std::map <std::string, Command*>& all)
c = new CmdStatistics (); all[c->keyword ()] = c;
c = new CmdStop (); all[c->keyword ()] = c;
c = new CmdSummary (); all[c->keyword ()] = c;
c = new CmdSynch (); all[c->keyword ()] = c;
c = new CmdTags (); all[c->keyword ()] = c;
c = new CmdTimesheet (); all[c->keyword ()] = c;
c = new CmdUndo (); all[c->keyword ()] = c;