From 47b948c866faa38598fc96292d90a13cf60cebd2 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Mon, 5 Sep 2011 08:49:10 -0400 Subject: [PATCH] Command - synchronize - Added a placeholder synchronize command, which will be implemented in mumble for the mumble mumble. --- src/commands/CMakeLists.txt | 1 + src/commands/CmdSynch.cpp | 54 +++++++++++++++++++++++++++++++++++++ src/commands/CmdSynch.h | 42 +++++++++++++++++++++++++++++ src/commands/Command.cpp | 2 ++ 4 files changed, 99 insertions(+) create mode 100644 src/commands/CmdSynch.cpp create mode 100644 src/commands/CmdSynch.h diff --git a/src/commands/CMakeLists.txt b/src/commands/CMakeLists.txt index ccc9971d1..53d219402 100644 --- a/src/commands/CMakeLists.txt +++ b/src/commands/CMakeLists.txt @@ -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 diff --git a/src/commands/CmdSynch.cpp b/src/commands/CmdSynch.cpp new file mode 100644 index 000000000..0814b8f3f --- /dev/null +++ b/src/commands/CmdSynch.cpp @@ -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 +#include +#include + +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; +} + +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/CmdSynch.h b/src/commands/CmdSynch.h new file mode 100644 index 000000000..07d43a4c2 --- /dev/null +++ b/src/commands/CmdSynch.h @@ -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 +#include + +class CmdSynch : public Command +{ +public: + CmdSynch (); + int execute (std::string&); +}; + +#endif +//////////////////////////////////////////////////////////////////////////////// diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index daaf2b336..9665da479 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -79,6 +79,7 @@ #include #include #include +#include #include #include #include @@ -149,6 +150,7 @@ void Command::factory (std::map & 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;