KContacts

vcardconverter.h
1 /*
2  This file is part of the KContacts framework.
3  SPDX-FileCopyrightText: 2002 Tobias Koenig <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #ifndef KCONTACTS_VCARDCONVERTER_H
9 #define KCONTACTS_VCARDCONVERTER_H
10 
11 #include "kcontacts_export.h"
12 #include "kcontacts/addressee.h"
13 #include <QString>
14 
15 namespace KContacts {
39 class KCONTACTS_EXPORT VCardConverter
40 {
41 public:
42 
48  enum Version {
49  v2_1,
50  v3_0,
51  v4_0
52  };
53 
58 
62  ~VCardConverter();
63 
71  Q_REQUIRED_RESULT QByteArray createVCard(const Addressee &addr, Version version = v3_0) const;
72 
80  // FIXME: Add error handling
81  Q_REQUIRED_RESULT QByteArray createVCards(const Addressee::List &list, Version version = v3_0) const;
82 
86  Q_REQUIRED_RESULT QByteArray exportVCard(const Addressee &addr, Version version) const;
87 
91  Q_REQUIRED_RESULT QByteArray exportVCards(const Addressee::List &list, Version version) const;
92 
96  Q_REQUIRED_RESULT Addressee parseVCard(const QByteArray &vcard) const;
97 
101  // FIXME: Add error handling
102  Q_REQUIRED_RESULT Addressee::List parseVCards(const QByteArray &vcard) const;
103 
104 private:
105  Q_DISABLE_COPY(VCardConverter)
106  class VCardConverterPrivate;
107  VCardConverterPrivate *const d;
108 };
109 
119 Q_REQUIRED_RESULT KCONTACTS_EXPORT QString dateToVCardString(const QDateTime &dateTime);
120 
126 Q_REQUIRED_RESULT KCONTACTS_EXPORT QString dateToVCardString(QDate date);
127 
134 Q_REQUIRED_RESULT KCONTACTS_EXPORT QDateTime VCardStringToDate(const QString &dateString);
135 
140 KCONTACTS_EXPORT void adaptIMAttributes(QByteArray &data);
141 }
142 #endif
Class to converting contact objects into vCard format and vice versa.
address book entry
Definition: addressee.h:68
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Jul 7 2020 22:53:17 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.