kitchensync Library API Documentation

konnector.h

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2002,2003 Holger Freyther <freyther@kde.org> 00005 Copyright (c) 2003 Cornelius Schumacher <schumacher@kde.org> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00020 Boston, MA 02111-1307, USA. 00021 */ 00022 #ifndef KSYNC_KONNECTOR_H 00023 #define KSYNC_KONNECTOR_H 00024 00025 #include <qcstring.h> 00026 #include <qiconset.h> 00027 #include <qwidget.h> 00028 #include <qstringlist.h> 00029 #include <qptrlist.h> 00030 00031 #include <kresources/resource.h> 00032 00033 #include <syncee.h> 00034 #include <synceelist.h> 00035 00036 #include "stderror.h" 00037 #include "stdprogress.h" 00038 00039 namespace KSync { 00040 00041 class KonnectorInfo; 00042 class Kapabilities; 00043 class ConfigWidget; 00044 00053 class Konnector : public KRES::Resource 00054 { 00055 Q_OBJECT 00056 public: 00057 typedef QPtrList<Konnector> List; 00058 00062 Konnector( const KConfig *config ); 00063 00067 virtual ~Konnector(); 00068 00072 void writeConfig( KConfig *config ); 00073 00079 virtual SynceeList syncees() = 0; 00080 00088 virtual bool readSyncees() = 0; 00089 00098 virtual bool writeSyncees() = 0; 00099 00100 signals: 00105 void synceesRead( Konnector * ); 00106 00110 void synceeReadError( Konnector * ); 00111 00116 void synceesWritten( Konnector * ); 00117 00121 void synceeWriteError( Konnector * ); 00122 00123 public: 00127 virtual Kapabilities capabilities() = 0; 00128 00132 virtual bool connectDevice() = 0; 00136 virtual bool disconnectDevice() = 0; 00137 00138 bool isConnected() const; 00139 00143 virtual KonnectorInfo info() const = 0; 00144 00145 // Obsolete ? 00146 virtual void add( const QString &res ); 00147 virtual void remove( const QString &res ); 00148 virtual QStringList resources() const; 00152 virtual QStringList builtIn() const; 00153 00154 protected: 00155 void progress( const Progress & ); 00156 void error( const Error & ); 00157 00158 signals: 00159 void sig_progress( Konnector *, const Progress & ); 00160 void sig_error( Konnector *, const Error & ); 00161 void sig_downloaded( Konnector *, const SynceeList & ); 00162 00163 private: 00164 QStringList m_resources; 00165 bool m_isCon : 1; 00166 }; 00167 00168 } 00169 00170 #endif
KDE Logo
This file is part of the documentation for kitchensync Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Aug 27 12:50:48 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003