vcardformatimpl.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KABC_VCARDFORMATIMPL_H
00022 #define KABC_VCARDFORMATIMPL_H
00023
00024 #include <qstring.h>
00025 #include <qfile.h>
00026
00027 #include "address.h"
00028 #include "addressee.h"
00029
00030 #include <VCard.h>
00031
00032 namespace KABC {
00033
00034 class AddressBook;
00035
00042 class VCardFormatImpl
00043 {
00044 public:
00045 bool load( Addressee &, QFile *file );
00046 bool loadAll( AddressBook *, Resource *, QFile *file );
00047 void save( const Addressee &, QFile *file );
00048 void saveAll( AddressBook *, Resource *, QFile *file );
00049
00050 bool readFromString( const QString &vcard, Addressee &addr );
00051 bool writeToString( const Addressee &addressee, QString &vcard );
00052
00053 protected:
00054 bool loadAddressee( Addressee &, VCARD::VCard & );
00055 void saveAddressee( const Addressee &, VCARD::VCard *, bool intern );
00056
00057 void addTextValue (VCARD::VCard *, VCARD::EntityType, const QString & );
00058 QString readTextValue( VCARD::ContentLine * );
00059
00060 void addDateValue( VCARD::VCard *, VCARD::EntityType, const QDate & );
00061 QDate readDateValue( VCARD::ContentLine * );
00062
00063 void addDateTimeValue( VCARD::VCard *, VCARD::EntityType, const QDateTime & );
00064 QDateTime readDateTimeValue( VCARD::ContentLine * );
00065
00066 void addAddressValue( VCARD::VCard *, const Address & );
00067 Address readAddressValue( VCARD::ContentLine * );
00068
00069 void addLabelValue( VCARD::VCard *, const Address & );
00070
00071 void addTelephoneValue( VCARD::VCard *, const PhoneNumber & );
00072 PhoneNumber readTelephoneValue( VCARD::ContentLine * );
00073
00074 void addNValue( VCARD::VCard *, const Addressee & );
00075 void readNValue( VCARD::ContentLine *, Addressee & );
00076
00077 void addCustomValue( VCARD::VCard *, const QString & );
00078
00079 void addAddressParam( VCARD::ContentLine *, int );
00080 int readAddressParam( VCARD::ContentLine * );
00081
00082 void addGeoValue( VCARD::VCard *, const Geo & );
00083 Geo readGeoValue( VCARD::ContentLine * );
00084
00085 void addUTCValue( VCARD::VCard *, const TimeZone & );
00086 TimeZone readUTCValue( VCARD::ContentLine * );
00087
00088 void addClassValue( VCARD::VCard *, const Secrecy & );
00089 Secrecy readClassValue( VCARD::ContentLine * );
00090
00091 void addKeyValue( VCARD::VCard *, const Key & );
00092 Key readKeyValue( VCARD::ContentLine * );
00093
00094 void addPictureValue( VCARD::VCard *, VCARD::EntityType, const Picture &, const Addressee &, bool );
00095 Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType, const Addressee &addr );
00096
00097 void addSoundValue( VCARD::VCard *, const Sound &, const Addressee &, bool );
00098 Sound readSoundValue( VCARD::ContentLine *, const Addressee &addr );
00099
00100 void addAgentValue( VCARD::VCard *, const Agent & );
00101 Agent readAgentValue( VCARD::ContentLine * );
00102 };
00103
00104 }
00105 #endif
This file is part of the documentation for kdelibs Version 3.1.4.