summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardparser/vcardtool.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/kabc/vcardparser/vcardtool.cpp b/kabc/vcardparser/vcardtool.cpp
index 32b6c1e..0cf72c0 100644
--- a/kabc/vcardparser/vcardtool.cpp
+++ b/kabc/vcardparser/vcardtool.cpp
@@ -1,70 +1,71 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org> 3 Copyright (c) 2003 Tobias Koenig <tokoe@kde.org>
4 4
5 This library is free software; you can redistribute it and/or 5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public 6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either 7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version. 8 version 2 of the License, or (at your option) any later version.
9 9
10 This library is distributed in the hope that it will be useful, 10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details. 13 Library General Public License for more details.
14 14
15 You should have received a copy of the GNU Library General Public License 15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to 16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20 20
21#include <qdatastream.h> 21#include <qdatastream.h>
22#include <qstring.h> 22#include <qstring.h>
23#include <qregexp.h>
23 24
24#include "agent.h" 25#include "agent.h"
25#include "key.h" 26#include "key.h"
26#include "picture.h" 27#include "picture.h"
27#include "secrecy.h" 28#include "secrecy.h"
28#include "sound.h" 29#include "sound.h"
29 30
30#include "vcardtool.h" 31#include "vcardtool.h"
31 32
32using namespace KABC; 33using namespace KABC;
33 34
34VCardTool::VCardTool() 35VCardTool::VCardTool()
35{ 36{
36 mAddressTypeMap.insert( "dom", Address::Dom ); 37 mAddressTypeMap.insert( "dom", Address::Dom );
37 mAddressTypeMap.insert( "intl", Address::Intl ); 38 mAddressTypeMap.insert( "intl", Address::Intl );
38 mAddressTypeMap.insert( "postal", Address::Postal ); 39 mAddressTypeMap.insert( "postal", Address::Postal );
39 mAddressTypeMap.insert( "parcel", Address::Parcel ); 40 mAddressTypeMap.insert( "parcel", Address::Parcel );
40 mAddressTypeMap.insert( "home", Address::Home ); 41 mAddressTypeMap.insert( "home", Address::Home );
41 mAddressTypeMap.insert( "work", Address::Work ); 42 mAddressTypeMap.insert( "work", Address::Work );
42 mAddressTypeMap.insert( "pref", Address::Pref ); 43 mAddressTypeMap.insert( "pref", Address::Pref );
43 44
44 mPhoneTypeMap.insert( "HOME", PhoneNumber::Home ); 45 mPhoneTypeMap.insert( "HOME", PhoneNumber::Home );
45 mPhoneTypeMap.insert( "WORK", PhoneNumber::Work ); 46 mPhoneTypeMap.insert( "WORK", PhoneNumber::Work );
46 mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg ); 47 mPhoneTypeMap.insert( "MSG", PhoneNumber::Msg );
47 mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref ); 48 mPhoneTypeMap.insert( "PREF", PhoneNumber::Pref );
48 mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice ); 49 mPhoneTypeMap.insert( "VOICE", PhoneNumber::Voice );
49 mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax ); 50 mPhoneTypeMap.insert( "FAX", PhoneNumber::Fax );
50 mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell ); 51 mPhoneTypeMap.insert( "CELL", PhoneNumber::Cell );
51 mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video ); 52 mPhoneTypeMap.insert( "VIDEO", PhoneNumber::Video );
52 mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs ); 53 mPhoneTypeMap.insert( "BBS", PhoneNumber::Bbs );
53 mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem ); 54 mPhoneTypeMap.insert( "MODEM", PhoneNumber::Modem );
54 mPhoneTypeMap.insert( "CAR", PhoneNumber::Car ); 55 mPhoneTypeMap.insert( "CAR", PhoneNumber::Car );
55 mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn ); 56 mPhoneTypeMap.insert( "ISDN", PhoneNumber::Isdn );
56 mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs ); 57 mPhoneTypeMap.insert( "PCS", PhoneNumber::Pcs );
57 mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager ); 58 mPhoneTypeMap.insert( "PAGER", PhoneNumber::Pager );
58} 59}
59 60
60VCardTool::~VCardTool() 61VCardTool::~VCardTool()
61{ 62{
62} 63}
63 64
64// TODO: make list a const& 65// TODO: make list a const&
65QString VCardTool::createVCards( Addressee::List list, VCard::Version version ) 66QString VCardTool::createVCards( Addressee::List list, VCard::Version version )
66{ 67{
67 VCard::List vCardList; 68 VCard::List vCardList;
68 static const QRegExp semiExp(";"); 69 static const QRegExp semiExp(";");
69 70
70 Addressee::List::ConstIterator addrIt; 71 Addressee::List::ConstIterator addrIt;