author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (side-by-side diff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /kabc/vcard21parser.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | kabc/vcard21parser.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/kabc/vcard21parser.h b/kabc/vcard21parser.h index 77e69b6..80ba6ef 100644 --- a/kabc/vcard21parser.h +++ b/kabc/vcard21parser.h @@ -1,101 +1,101 @@ /* This file is part of libkabc. Copyright (c) 2002 Mark Westcott <mark@houseoffish.org> Copyright (c) 2000 George Staikos <staikos@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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #ifndef KABC_VCARD21FORMAT_H #define KABC_VCARD21FORMAT_H #include <qdatetime.h> #include <kdebug.h> #include <qregexp.h> #include <qstring.h> #include <kurl.h> -#include <qvaluelist.h> +#include <q3valuelist.h> #include "addressee.h" #include "addressbook.h" #include "phonenumber.h" #define VCARD_BEGIN "begin:vcard" #define VCARD_END "end:vcard" #define VCARD_BEGIN_N "begin" #define VCARD_END_N "end" #define VCARD_VERSION "version" #define VCARD_FN "fn" #define VCARD_N "n" // optional #define VCARD_NAME "name" #define VCARD_NICKNAME "nickname" #define VCARD_PHOTO "photo" #define VCARD_BDAY "bday" #define VCARD_ADR "adr" // types #define VCARD_ADR_DOM "dom" #define VCARD_ADR_INTL "intl" #define VCARD_ADR_POSTAL "postal" #define VCARD_ADR_PARCEL "parcel" #define VCARD_ADR_HOME "home" #define VCARD_ADR_WORK "work" #define VCARD_ADR_PREF "pref" // values #define VCARD_ADR_POBOX "PO Box" #define VCARD_ADR_EXTADR "Extended Address" #define VCARD_ADR_STREET "Street" #define VCARD_ADR_LOCALITY "Locality" #define VCARD_ADR_REGION "Region" #define VCARD_ADR_POSTCODE "Postal Code" #define VCARD_ADR_COUNTRY "Country Name" #define VCARD_LABEL "label" #define VCARD_PROFILE "profile" #define VCARD_SOURCE "source" #define VCARD_TEL "tel" // types #define VCARD_TEL_HOME "home" #define VCARD_TEL_WORK "work" #define VCARD_TEL_PREF "pref" #define VCARD_TEL_VOICE "voice" #define VCARD_TEL_FAX "fax" #define VCARD_TEL_MSG "msg" #define VCARD_TEL_CELL "cell" #define VCARD_TEL_PAGER "pager" #define VCARD_TEL_BBS "bbs" #define VCARD_TEL_MODEM "modem" #define VCARD_TEL_CAR "car" #define VCARD_TEL_ISDN "isdn" #define VCARD_TEL_VIDEO "video" #define VCARD_TEL_PCS "pcs" #define VCARD_TEL_SIP "sip" #define VCARD_EMAIL "email" // types #define VCARD_EMAIL_PREF "pref" #define VCARD_EMAIL_INTERNET "internet" #define VCARD_EMAIL_X400 "x400" #define VCARD_TZ "tz" @@ -135,92 +135,92 @@ $Id$ #define VC_ERR_NO_BEGIN 1 #define VC_ERR_NO_END 2 #define VC_ERR_INVALID_LINE 3 #define VC_ERR_INTERNAL 4 #define VC_ERR_INVALID_NAME 5 #define VC_ERR_MISSING_MANDATORY 6 namespace KABC { class AddressBook; class VCard21Parser { public: /** * Constructor. */ VCard21Parser(); /** * Destructor. */ virtual ~VCard21Parser(); /** * Parses a string in vcard2.1 format and saves the single addressees * to the address book. * * @param ab The address book. * @param str The vcard string. */ void readFromString( KABC::AddressBook *ab, const QString &str ); /** * FIXME: we need a writeToString method * QString writeToString (KABC::AddressBook *); */ /** * Parses a string in vcard2.1 format and returns the inherent addressee. */ KABC::Addressee readFromString( const QString &data); /** * Helper method to store a address. * * @param data A string list, that is filled with 'street', 'house number' ... * @param type The type of the returned address. */ static KABC::Address readAddressFromQStringList (const QStringList &data, const int type); }; } /** * @short Helper class */ class VCardLineX { public: QString name; bool qualified; - QValueList<QString> qualifiers; - QValueList<QString> parameters; + Q3ValueList<QString> qualifiers; + Q3ValueList<QString> parameters; bool isValid() const; }; /** * @short Helper class */ class VCard21ParserImpl { friend class VCardLineX; public: VCard21ParserImpl() { }; virtual ~VCard21ParserImpl() { }; static VCard21ParserImpl *parseVCard(const QString& vc, int *err = NULL); QString getValue(const QString& name, const QString& qualifier); QString getValue(const QString& name); QStringList getValues(const QString& name, const QString& qualifier); QStringList getValues(const QString& name); - QValueList<VCardLineX> *_vcdata; + Q3ValueList<VCardLineX> *_vcdata; private: - VCard21ParserImpl (QValueList<VCardLineX> *_vcd); + VCard21ParserImpl (Q3ValueList<VCardLineX> *_vcd); }; #endif |