vcardconverter.h
/*
This file is part of libkabc.
Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KABC_VCARDCONVERTER_H
#define KABC_VCARDCONVERTER_H
#include <qstring.h>
#include "addressee.h"
namespace KABC {
class KABC_EXPORT VCardConverter
{
public:
enum Version
{
v2_1,
v3_0
};
VCardConverter();
~VCardConverter();
QString createVCard( const Addressee &addr, Version version = v3_0 );
// FIXME: Add error handling
QString createVCards( Addressee::List list, Version version = v3_0 );
// FIXME: Add "createVCards( AddressBook * )"
Addressee parseVCard( const QString& vcard );
// FIXME: Add error handling
Addressee::List parseVCards( const QString& vcard );
// FIXME: Add "bool parseVCards( AddressBook *, const QString &vcard )"
bool vCardToAddressee( const QString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED;
bool addresseeToVCard( const Addressee&, QString&, Version version = v3_0 ) KDE_DEPRECATED;
private:
QStringList splitString( const QChar &sep, const QString &value );
struct VCardConverterData;
VCardConverterData *d;
};
KABC_EXPORT QString dateToVCardString( const QDateTime &dateTime );
KABC_EXPORT QString dateToVCardString( const QDate &date );
KABC_EXPORT QDateTime VCardStringToDate( const QString &dateString );
}
#endif
KABC::VCardConverter
Class to converting contact objects into vCard format and vice versa.
Definition: vcardconverter.h:53
KABC::VCardConverter::Version
Version
Definition: vcardconverter.h:61
KABC::dateToVCardString
KABC_EXPORT QString dateToVCardString(const QDateTime &dateTime)
Helper functions.
Definition: vcardconverter.cpp:104
KABC::VCardStringToDate
KABC_EXPORT QDateTime VCardStringToDate(const QString &dateString)
Converts a date string as it is used in VCard and LDIF files to a QDateTime value.
Definition: vcardconverter.cpp:114
KABC::Addressee
address book entry
Definition: addressee.src.h:74

KDE Home | KDE Accessibility Home | Description of Access Keys