00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KABC_VCARDTOOL_H
00022 #define KABC_VCARDTOOL_H
00023
00024 #include "addressee.h"
00025 #include "vcardparser.h"
00026
00027 class QDateTime;
00028
00029 namespace KABC {
00030
00031 class Agent;
00032 class Key;
00033 class Picture;
00034 class Secrecy;
00035 class Sound;
00036
00037 class KABC_EXPORT VCardTool
00038 {
00039 public:
00040 VCardTool();
00041 ~VCardTool();
00042
00047 KDE_DEPRECATED QString createVCards( Addressee::List list, VCard::Version version = VCard::v3_0 );
00048
00049 QCString createVCardsRaw( Addressee::List list, VCard::Version version = VCard::v3_0 );
00050
00054 KDE_DEPRECATED Addressee::List parseVCards( const QString& vcard );
00055
00056 Addressee::List parseVCardsRaw( const QCString& vcard );
00057
00058 private:
00059 VCard::List createVCardsInternal( Addressee::List list, VCard::Version version );
00060 Addressee::List parseVCardsInternal( const VCard::List &vCardList );
00061
00066 QStringList splitString( const QChar &sep, const QString &value );
00067
00068 QDateTime parseDateTime( const QString &str );
00069 QString createDateTime( const QDateTime &dateTime );
00070
00071 Picture parsePicture( const VCardLine &line );
00072 VCardLine createPicture( const QString &identifier, const Picture &pic );
00073
00074 Sound parseSound( const VCardLine &line );
00075 VCardLine createSound( const Sound &snd );
00076
00077 Key parseKey( const VCardLine &line );
00078 VCardLine createKey( const Key &key );
00079
00080 Secrecy parseSecrecy( const VCardLine &line );
00081 VCardLine createSecrecy( const Secrecy &secrecy );
00082
00083 Agent parseAgent( const VCardLine &line );
00084 VCardLine createAgent( VCard::Version version, const Agent &agent );
00085
00086 QMap<QString, int> mAddressTypeMap;
00087 QMap<QString, int> mPhoneTypeMap;
00088
00089 class VCardToolPrivate;
00090 VCardToolPrivate *d;
00091 };
00092
00093 }
00094
00095 #endif