vcardformat.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "vcardformatimpl.h"
00022
00023 #include "vcardformat.h"
00024
00025 using namespace KABC;
00026
00027 VCardFormat::VCardFormat()
00028 {
00029 mImpl = new VCardFormatImpl;
00030 }
00031
00032 VCardFormat::~VCardFormat()
00033 {
00034 delete mImpl;
00035 }
00036
00037 bool VCardFormat::load( AddressBook *addressBook, const QString &fileName )
00038 {
00039 QFile f( fileName );
00040 if ( !f.open( IO_ReadOnly ) ) return false;
00041
00042 bool result = mImpl->loadAll( addressBook, 0, &f );
00043
00044 f.close();
00045
00046 return result;
00047 }
00048
00049 bool VCardFormat::save( AddressBook *addressBook, const QString &fileName )
00050 {
00051 QFile f( fileName );
00052 if ( !f.open( IO_WriteOnly ) ) return false;
00053
00054 mImpl->saveAll( addressBook, 0, &f );
00055
00056 f.close();
00057
00058 return true;
00059 }
This file is part of the documentation for kdelibs Version 3.1.0.