kopete/libkopete
kabcpersistence.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef KABCPERSISTENCE_H
00019 #define KABCPERSISTENCE_H
00020
00021 #include "kopete_export.h"
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031 namespace KABC
00032 {
00033 class AddressBook;
00034 class Resource;
00035 }
00036
00037 namespace Kopete
00038 {
00039
00040 class MetaContact;
00041
00042 class KOPETE_EXPORT KABCPersistence : public QObject
00043 {
00044 Q_OBJECT
00045 public:
00055 static KABCPersistence* self();
00056
00057 explicit KABCPersistence( QObject * parent = 0, const char * name = 0 );
00058 ~KABCPersistence();
00062 static KABC::AddressBook* addressBook();
00069 void write( MetaContact * mc );
00070
00074 void removeKABC( MetaContact * mc );
00075
00081 bool syncWithKABC( MetaContact * mc );
00082
00086 void writeAddressBook( KABC::Resource * res );
00087 protected:
00088
00089 static void splitField( const QString &str, QString &app, QString &name, QString &value );
00090 protected slots:
00094 void slotWriteAddressBook();
00095 private:
00096 class Private;
00097 Private *d;
00098 };
00099
00100 }
00101
00102 #endif // KABCPERSISTENCE_H