kitchensync Library API Documentation

unknownsyncee.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA 02111-1307, USA.
00020 */
00021 #ifndef KSYNC_UNKNOWNSYNCEE_H
00022 #define KSYNC_UNKNOWNSYNCEE_H
00023 
00024 #include <qdatetime.h>
00025 #include <qcstring.h>
00026 
00027 #include "syncentry.h"
00028 #include "syncee.h"
00029 
00030 namespace KSync {
00031 
00038 class UnknownSyncEntry : public SyncEntry
00039 {
00040   public:
00047     enum DownLoadMode { Tempfile = 0, ByteArray };
00048     typedef QPtrList<UnknownSyncEntry> PtrList;
00049 
00055     UnknownSyncEntry( const QByteArray& array, const QString& path,
00056                       Syncee *parent );
00057 
00063     UnknownSyncEntry( const QString& fileName, const QString& path,
00064                       Syncee *parent );
00065 
00069     UnknownSyncEntry( const UnknownSyncEntry& entry );
00070 
00071     ~UnknownSyncEntry();
00072 
00076     QByteArray array()const;
00077 
00081     QString path()const;
00082 
00086     QString fileName()const;
00087 
00091     int mode()const;
00092 
00096     QDateTime lastAccess()const;
00097 
00101     void setLastAccess(const QDateTime& time);
00102 
00103     QString name();
00104     QString id();
00105     QString timestamp();
00106     QString type()const;
00107     bool equals( SyncEntry* entry );
00108     SyncEntry* clone();
00109 
00110   private:
00111     int mMode;
00112     bool mHasAccess : 1;
00113     QByteArray mArray;
00114     QString mPath;
00115     QString mFileName;
00116     QDateTime mTime;
00117 
00118     class UnknownSyncEntryPrivate;
00119     UnknownSyncEntryPrivate *d;
00120 };
00121 
00122 class UnknownSyncee : public Syncee
00123 {
00124   public:
00125     UnknownSyncee();
00126     ~UnknownSyncee();
00127 
00128     SyncEntry* firstEntry();
00129     SyncEntry* nextEntry();
00130     QString type()const;
00131     void addEntry( SyncEntry*  );
00132     void removeEntry( SyncEntry* );
00133     SyncEntry::PtrList added();
00134     SyncEntry::PtrList modified();
00135     SyncEntry::PtrList removed();
00136     Syncee* clone();
00137 
00138     bool writeBackup( const QString & ) { return false; }
00139     bool restoreBackup( const QString & ) { return false; }
00140 
00141   private:
00143     SyncEntry::PtrList voidi();
00144     UnknownSyncEntry::PtrList mList;
00145 
00146     class UnknownSynceePrivate;
00147     UnknownSynceePrivate *d;
00148 };
00149 
00150 }
00151 
00152 #endif
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Oct 4 14:41:09 2007 by doxygen 1.4.2 written by Dimitri van Heesch, © 1997-2003