vcardformatplugin.cpp Source File (kabc Library)

| # kabc Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# vcardformatplugin.cpp

    00001 /*
    00002     This file is part of libkabc.
    00003     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
    00004
    00005     This library is free software; you can redistribute it and/or
    00006     modify it under the terms of the GNU Library General Public
    00007     License as published by the Free Software Foundation; either
    00008     version 2 of the License, or (at your option) any later version.
    00009
    00010     This library is distributed in the hope that it will be useful,
    00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
    00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    00013     Library General Public License for more details.
    00014
    00015     You should have received a copy of the GNU Library General Public License
    00016     along with this library; see the file COPYING.LIB.  If not, write to
    00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    00018     Boston, MA 02111-1307, USA.
    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.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:29:24 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001