summaryrefslogtreecommitdiffabout
path: root/kabc/vcardformatplugin.cpp
Unidiff
Diffstat (limited to 'kabc/vcardformatplugin.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kabc/vcardformatplugin.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/kabc/vcardformatplugin.cpp b/kabc/vcardformatplugin.cpp
index 8db8c11..0b97a08 100644
--- a/kabc/vcardformatplugin.cpp
+++ b/kabc/vcardformatplugin.cpp
@@ -1,70 +1,70 @@
1/* 1/*
2 This file is part of libkabc. 2 This file is part of libkabc.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@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 "vcardformatplugin.h" 21#include "vcardformatplugin.h"
22#include "vcardformatimpl.h" 22#include "vcardformatimpl.h"
23 23
24using namespace KABC; 24using namespace KABC;
25 25
26VCardFormatPlugin::VCardFormatPlugin() 26VCardFormatPlugin::VCardFormatPlugin()
27{ 27{
28 mImpl = new VCardFormatImpl; 28 mImpl = new VCardFormatImpl;
29} 29}
30 30
31VCardFormatPlugin::~VCardFormatPlugin() 31VCardFormatPlugin::~VCardFormatPlugin()
32{ 32{
33 delete mImpl; 33 delete mImpl;
34} 34}
35 35
36bool VCardFormatPlugin::load( Addressee &addressee, QFile *file ) 36bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
37{ 37{
38 qDebug("VCardFormatPlugin::load"); 38 qDebug("VCardFormatPlugin::load");
39 return mImpl->load( addressee, file ); 39 return mImpl->load( addressee, file );
40} 40}
41 41
42bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file ) 42bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
43{ 43{
44 // qDebug("VCardFormatPlugin::loadAll"); 44 // qDebug("VCardFormatPlugin::loadAll");
45 return mImpl->loadAll( addressBook, resource, file ); 45 return mImpl->loadAll( addressBook, resource, file );
46} 46}
47 47
48void VCardFormatPlugin::save( const Addressee &addressee, QFile *file ) 48void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
49{ 49{
50 qDebug("VCardFormatPlugin::save"); 50 qDebug("VCardFormatPlugin::save");
51 mImpl->save( addressee, file ); 51 mImpl->save( addressee, file );
52} 52}
53 53
54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file ) 54void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file )
55{ 55{
56 qDebug("VCardFormatPlugin::saveAll"); 56 qDebug("VCardFormatPlugin::saveAll");
57 mImpl->saveAll( addressBook, resource, file ); 57 mImpl->saveAll( addressBook, resource, file );
58} 58}
59 59
60bool VCardFormatPlugin::checkFormat( QFile *file ) const 60bool VCardFormatPlugin::checkFormat( QFile *file ) const
61{ 61{
62 QString line; 62 QString line;
63 63
64 file->readLine( line, 1024 ); 64 char tmp[1024]; file->readLine( tmp, 1024 ); line = tmp;
65 line = line.stripWhiteSpace(); 65 line = line.stripWhiteSpace();
66 if ( line == "BEGIN:VCARD" ) 66 if ( line == "BEGIN:VCARD" )
67 return true; 67 return true;
68 else 68 else
69 return false; 69 return false;
70} 70}