kpilot
conduitstate.h
Go to the documentation of this file.00001 #ifndef _KPILOT_CONDUITSTATE_H 00002 #define _KPILOT_CONDUITSTATE_H 00003 /* vcal-conduitstate.h KPilot 00004 ** 00005 ** Copyright (C) 2006 Bertjan Broeksema 00006 ** 00007 ** This file defines the vcal-conduitstate. 00008 */ 00009 00010 /* 00011 ** This program is free software; you can redistribute it and/or modify 00012 ** it under the terms of the GNU General Public License as published by 00013 ** the Free Software Foundation; either version 2 of the License, or 00014 ** (at your option) any later version. 00015 ** 00016 ** This program is distributed in the hope that it will be useful, 00017 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 ** GNU General Public License for more details. 00020 ** 00021 ** You should have received a copy of the GNU General Public License 00022 ** along with this program in a file called COPYING; if not, write to 00023 ** the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 00024 ** MA 02110-1301, USA. 00025 */ 00026 00027 /* 00028 ** Bug reports and questions can be sent to kde-pim@kde.org 00029 */ 00030 00031 #include "plugin.h" 00032 00038 class ConduitState 00039 { 00040 public: 00041 enum state_t { 00042 eTest, 00043 eInit, 00044 ePCToHH, 00045 eHHToPC, 00046 eDeleteUnsyncedHH, 00047 eDeleteUnsyncedPC, 00048 eCleanUp 00049 }; 00050 00051 protected: 00052 state_t fState; 00053 bool fStarted; 00054 00055 public: 00056 ConduitState(){ fState = eInit; fStarted = false; }; 00057 virtual ~ConduitState() {}; 00058 00063 virtual void startSync( ConduitAction * ) = 0; 00064 00068 virtual void handleRecord( ConduitAction * ) = 0; 00069 00073 virtual void finishSync( ConduitAction * ) = 0; 00074 00078 state_t state() { return fState; }; 00079 00083 bool started() { return fStarted; }; 00084 }; 00085 00086 #endif