karm

karmdcopiface.h
00001 /*
00002  *   This file only:
00003  *     Copyright (C) 2004  Mark Bucciarelli <mark@hubcapconsulting.com>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License along
00016  *   with this program; if not, write to the
00017  *      Free Software Foundation, Inc.
00018  *      51 Franklin Street, Fifth Floor
00019  *      Boston, MA  02110-1301  USA.
00020  */
00021 #ifndef KARM_DCOP_IFAC_H
00022 #define KARM_DCOP_IFAC_H
00023 
00024 #include <dcopobject.h>
00025 
00027 class KarmDCOPIface : virtual public DCOPObject
00028 {
00029   K_DCOP
00030   k_dcop:
00031 
00033   virtual TQString version() const = 0;
00034 
00036   virtual TQString taskIdFromName( const TQString& taskName ) const = 0;
00037 
00047   virtual int addTask( const TQString& taskName ) = 0;
00048 
00057    virtual TQString setPerCentComplete( const TQString& taskName, int perCent ) = 0;
00058 
00077   virtual int bookTime( const TQString& taskId, const TQString& iso8601StartDateTime, 
00078                         long durationInMinutes ) = 0;
00079 
00090   virtual TQString getError( int karmErrorNumber ) const = 0;
00091 
00100   virtual int totalMinutesForTaskId( const TQString& taskId ) = 0;
00101 
00103   // may conflict with unitaskmode
00104   virtual TQString starttimerfor( const TQString& taskname ) = 0;
00105 
00107   // may conflict with unitaskmode
00108   virtual TQString stoptimerfor( const TQString& taskname ) = 0;
00109 
00111   virtual TQString deletetodo() = 0;
00112 
00114   virtual TQString setpromptdelete( bool prompt ) = 0;
00115 
00117   virtual bool getpromptdelete() = 0;
00118 
00120   virtual TQString exportcsvfile( TQString filename, TQString from, TQString to, int type = 0, bool decimalMinutes=true, bool allTasks=true, TQString delimiter=";", TQString quote="'" ) = 0;
00121 
00123   virtual TQString importplannerfile( TQString filename ) = 0;
00124 
00126   virtual bool save() = 0;
00127 
00129   virtual void quit() = 0;
00130 };
00131 
00132 #endif // KARM_DCOP_IFAC_H