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
00039 class KABC_EXPORT_DEPRECATED VCardFormatImpl
00040 {
00041
public:
00042
bool load(
Addressee &,
QFile *file );
00043
bool loadAll(
AddressBook *, Resource *,
QFile *file );
00044
void save(
const Addressee &,
QFile *file );
00045
void saveAll(
AddressBook *, Resource *,
QFile *file );
00046
00047
bool readFromString(
const QString &vcard,
Addressee &addr );
00048
bool writeToString(
const Addressee &addressee,
QString &vcard );
00049
00050
protected:
00051
bool loadAddressee(
Addressee &, VCARD::VCard & );
00052
void saveAddressee(
const Addressee &, VCARD::VCard *,
bool intern );
00053
00054
void addTextValue (VCARD::VCard *, VCARD::EntityType,
const QString & );
00055
QString readTextValue( VCARD::ContentLine * );
00056
00057
void addDateValue( VCARD::VCard *, VCARD::EntityType,
const QDate & );
00058
QDate readDateValue( VCARD::ContentLine * );
00059
00060
void addDateTimeValue( VCARD::VCard *, VCARD::EntityType,
const QDateTime & );
00061
QDateTime readDateTimeValue( VCARD::ContentLine * );
00062
00063
void addAddressValue( VCARD::VCard *,
const Address & );
00064
Address readAddressValue( VCARD::ContentLine * );
00065
00066
void addLabelValue( VCARD::VCard *,
const Address & );
00067
00068
void addTelephoneValue( VCARD::VCard *,
const PhoneNumber & );
00069
PhoneNumber readTelephoneValue( VCARD::ContentLine * );
00070
00071
void addNValue( VCARD::VCard *,
const Addressee & );
00072
void readNValue( VCARD::ContentLine *,
Addressee & );
00073
00074
void addCustomValue( VCARD::VCard *,
const QString & );
00075
00076
void addAddressParam( VCARD::ContentLine *,
int );
00077
int readAddressParam( VCARD::ContentLine * );
00078
00079
void addGeoValue( VCARD::VCard *,
const Geo & );
00080
Geo readGeoValue( VCARD::ContentLine * );
00081
00082
void addUTCValue( VCARD::VCard *,
const TimeZone & );
00083
TimeZone readUTCValue( VCARD::ContentLine * );
00084
00085
void addClassValue( VCARD::VCard *,
const Secrecy & );
00086 Secrecy readClassValue( VCARD::ContentLine * );
00087
00088
void addKeyValue( VCARD::VCard *,
const Key & );
00089
Key readKeyValue( VCARD::ContentLine * );
00090
00091
void addPictureValue( VCARD::VCard *, VCARD::EntityType,
const Picture &,
const Addressee &,
bool );
00092 Picture readPictureValue( VCARD::ContentLine *, VCARD::EntityType,
const Addressee &addr );
00093
00094
void addSoundValue( VCARD::VCard *,
const Sound &,
const Addressee &,
bool );
00095 Sound readSoundValue( VCARD::ContentLine *,
const Addressee &addr );
00096
00097
void addAgentValue( VCARD::VCard *,
const Agent & );
00098
Agent readAgentValue( VCARD::ContentLine * );
00099 };
00100
00101 }
00102
#endif