kitchensync Library API Documentation

konnectormanager.h

00001 /* 00002 This file is part of KitchenSync. 00003 00004 Copyright (c) 2002,2003 Holger Freyther <freyther@kde.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_KONNECTORMANAGER_H 00022 #define KSYNC_KONNECTORMANAGER_H 00023 00024 #include <qobject.h> 00025 #include <qstring.h> 00026 00027 #include <kstaticdeleter.h> 00028 #include <kresources/manager.h> 00029 00030 #include <syncee.h> 00031 #include <synceelist.h> 00032 00033 #include "konnector.h" 00034 #include "kdevice.h" 00035 #include "filter.h" 00036 #include "error.h" 00037 #include "progress.h" 00038 00039 namespace KSync 00040 { 00041 00042 class Kapabilities; 00043 class ConfigWidget; 00044 class Konnector; 00045 class KonnectorInfo; 00046 00047 class KonnectorManager : public QObject, public KRES::Manager<Konnector> 00048 { 00049 Q_OBJECT 00050 friend class KStaticDeleter<KonnectorManager>; 00051 public: 00052 static KonnectorManager *self(); 00053 00054 Device::ValueList query(); 00055 Konnector *load( const Device& device ); 00056 Konnector *load( const QString& deviceName ); 00057 bool unload( Konnector * ); 00058 00059 bool autoLoadFilter() const; 00060 00065 void setAutoLoadFilter( bool = true ); 00066 00072 void add( Filter* filter ); 00073 void deleteFilter( Filter* filter ); 00074 const Filter::PtrList filters(); 00075 00076 public slots: 00077 void write( Konnector *, const SynceeList & ); 00078 00079 signals: 00084 void synceesRead( Konnector * ); 00085 00089 void synceeReadError( Konnector * ); 00090 00095 void synceesWritten( Konnector * ); 00096 00100 void synceeWriteError( Konnector * ); 00101 00102 signals: 00103 void sync( Konnector *, const SynceeList & ); 00104 void progress( Konnector *, const Progress & ); 00105 void error( Konnector *, const Error & ); 00106 void downloaded( Konnector *, const SynceeList & ); 00107 00108 private slots: 00109 void slotSync( Konnector *, const SynceeList & ); 00110 void slotProgress( Konnector *, const Progress & ); 00111 void slotError( Konnector *, const Error & ); 00112 void slotDownloaded( Konnector *, const SynceeList & ); 00113 00114 protected: 00115 void connectSignals(); 00116 00117 private: 00118 void filter( const SynceeList &unknown, const SynceeList &real ); 00119 00120 KonnectorManager(); 00121 ~KonnectorManager(); 00122 00123 Device::ValueList allDevices(); 00124 Device parseDevice( const QString& path ); 00125 Device find( const QString& deviceName ); 00126 SynceeList findUnknown( const SynceeList & ); 00127 00128 static KonnectorManager *m_self; 00129 00130 Filter::PtrList m_filter; 00131 Filter::PtrList m_filAdded; 00132 bool m_auto; 00133 00134 Device::ValueList m_devices; 00135 00136 QPtrList<Konnector> m_konnectors; 00137 00138 class Private; 00139 Private *d; 00140 }; 00141 00142 } 00143 00144 #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