kabc
vcardtool.h
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 "kabc_export.h"
00025 #include "addressee.h"
00026 #include "vcardparser/vcardparser.h"
00027
00028 class QDateTime;
00029
00030 namespace KABC {
00031
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 QByteArray createVCards( const Addressee::List &list,
00048 VCard::Version version = VCard::v3_0 ) const;
00049
00053 Addressee::List parseVCards( const QByteArray &vcard ) const;
00054
00055 private:
00060 QStringList splitString( const QChar &sep, const QString &value ) const;
00061
00062 QDateTime parseDateTime( const QString &str ) const;
00063 QString createDateTime( const QDateTime &dateTime ) const;
00064
00065 Picture parsePicture( const VCardLine &line ) const;
00066 VCardLine createPicture( const QString &identifier, const Picture &pic ) const;
00067
00068 Sound parseSound( const VCardLine &line ) const;
00069 VCardLine createSound( const Sound &snd ) const;
00070
00071 Key parseKey( const VCardLine &line ) const;
00072 VCardLine createKey( const Key &key ) const;
00073
00074 Secrecy parseSecrecy( const VCardLine &line ) const;
00075 VCardLine createSecrecy( const Secrecy &secrecy ) const;
00076
00077 QMap<QString, Address::TypeFlag> mAddressTypeMap;
00078 QMap<QString, PhoneNumber::TypeFlag> mPhoneTypeMap;
00079
00080 class VCardToolPrivate;
00081 VCardToolPrivate *d;
00082 };
00083
00084 }
00085
00086 #endif