kitchensync

kabckonnector.h

00001 /*
00002     This file is part of KitchenSync.
00003 
00004     Copyright (c) 2004 Tobias Koenig <tokoe@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., 51 Franklin Street, Fifth Floor,
00019     Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KSYNC_KABCKONNECTOR_H
00023 #define KSYNC_KABCKONNECTOR_H
00024 
00025 #include <kabc/addressbook.h>
00026 
00027 #include <konnector.h>
00028 
00029 namespace KABC {
00030 class ResourceFile;
00031 }
00032 
00033 namespace KSync {
00034 
00035 class KABCKonnectorConfig;
00036 
00037 class KABCKonnector : public KSync::Konnector
00038 { 
00039   Q_OBJECT
00040 
00041   public:
00042     KABCKonnector( const KConfig *config );
00043     ~KABCKonnector();
00044 
00045     void writeConfig( KConfig * );
00046 
00047     SynceeList syncees() { return mSyncees; }
00048 
00049     bool readSyncees();
00050     bool writeSyncees();
00051 
00052     bool connectDevice();
00053     bool disconnectDevice();
00054 
00055     KSync::KonnectorInfo info() const;
00056     virtual QStringList supportedFilterTypes() const;
00057 
00058     void setCurrentResource( const QString &identifier ) { mResourceIdentifier = identifier; }
00059     QString currentResource() const { return mResourceIdentifier; }
00060 
00061   protected slots:
00062     void loadingFinished();
00063 
00064   private:
00065     KABC::Resource* createResource( const QString& );
00066 
00067     KABCKonnectorConfig *mConfigWidget;
00068     QString mResourceIdentifier;
00069     QString mMd5sum;
00070 
00071     KABC::AddressBook mAddressBook;
00072     KABC::Resource *mResource;
00073 
00074     KSync::AddressBookSyncee *mAddressBookSyncee;
00075 
00076     SynceeList mSyncees;
00077 };
00078 
00079 }
00080 
00081 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys