vcardformatplugin.cpp
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "vcardformatplugin.h"
00022 #include "vcardformatimpl.h"
00023
00024 using namespace KABC;
00025
00026 VCardFormatPlugin::VCardFormatPlugin()
00027 {
00028 mImpl = new VCardFormatImpl;
00029 }
00030
00031 VCardFormatPlugin::~VCardFormatPlugin()
00032 {
00033 delete mImpl;
00034 }
00035
00036 bool VCardFormatPlugin::load( Addressee &addressee, QFile *file )
00037 {
00038 return mImpl->load( addressee, file );
00039 }
00040
00041 bool VCardFormatPlugin::loadAll( AddressBook *addressBook, Resource *resource, QFile *file )
00042 {
00043 return mImpl->loadAll( addressBook, resource, file );
00044 }
00045
00046 void VCardFormatPlugin::save( const Addressee &addressee, QFile *file )
00047 {
00048 mImpl->save( addressee, file );
00049 }
00050
00051 void VCardFormatPlugin::saveAll( AddressBook *addressBook, Resource *resource, QFile *file )
00052 {
00053 mImpl->saveAll( addressBook, resource, file );
00054 }
00055
00056 bool VCardFormatPlugin::checkFormat( QFile *file ) const
00057 {
00058 QString line;
00059
00060 file->readLine( line, 1024 );
00061 line = line.stripWhiteSpace();
00062 if ( line == "BEGIN:VCARD" )
00063 return true;
00064 else
00065 return false;
00066 }
This file is part of the documentation for kdelibs Version 3.1.5.