kabc Library API Documentation

vcardconverter.h

00001 /*
00002     This file is part of libkabc.
00003     Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 */
00020 
00021 #ifndef KABC_VCARDCONVERTER_H
00022 #define KABC_VCARDCONVERTER_H
00023 
00024 #include <qstring.h>
00025 
00026 #include "addressee.h"
00027 
00028 namespace KABC {
00029 
00056 class VCardConverter
00057 {
00058   public:
00059 
00064    enum Version
00065     {
00066       v2_1,
00067       v3_0
00068     };
00069 
00073     VCardConverter();
00074 
00078     ~VCardConverter();
00079   
00087     QString createVCard( const Addressee &addr, Version version = v3_0 );
00088 
00096     QString createVCards( Addressee::List list, Version version = v3_0 );
00097 
00101     Addressee parseVCard( const QString& vcard );
00102 
00106     Addressee::List parseVCards( const QString& vcard );
00107 
00111     bool vCardToAddressee( const QString&, Addressee &, Version version = v3_0 ) KDE_DEPRECATED;
00112 
00116     bool addresseeToVCard( const Addressee&, QString&, Version version = v3_0 ) KDE_DEPRECATED;
00117 
00118   private:
00123     QStringList splitString( const QChar &sep, const QString &value );
00124 
00125     struct VCardConverterData;
00126     VCardConverterData *d;
00127 };
00128 
00129 
00140 QString dateToVCardString( const QDateTime &dateTime );
00141 
00148 QString dateToVCardString( const QDate &date );
00149 
00157 QDateTime VCardStringToDate( const QString &dateString );
00158 
00159 }
00160 #endif
KDE Logo
This file is part of the documentation for kabc Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Mar 3 19:24:31 2005 by doxygen 1.3.6 written by Dimitri van Heesch, © 1997-2003