binaryformat.h
/*
This file is part of libkabc.
Copyright (c) 2002 Tobias Koenig <tokoe@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KABC_BINARYFORMAT_H
#define KABC_BINARYFORMAT_H
#include "formatplugin.h"
namespace KABC {
class AddressBook;
class Addressee;
class BinaryFormat : public FormatPlugin
{
public:
bool load( Addressee &, QFile *file );
bool loadAll( AddressBook *, Resource *, QFile *file );
void save( const Addressee &, QFile *file );
void saveAll( AddressBook *, Resource *, QFile *file );
bool checkFormat( QFile *file ) const;
private:
void loadAddressee( Addressee &, QDataStream & );
void saveAddressee( const Addressee &, QDataStream & );
bool checkHeader( QDataStream & ) const;
void writeHeader( QDataStream & );
};
}
#endif
KABC::BinaryFormat
binary file format for addressbook entries.
Definition: binaryformat.h:33
KABC::BinaryFormat::save
void save(const Addressee &, QFile *file)
Save single addressee to file.
Definition: binaryformat.cpp:84
KABC::BinaryFormat::load
bool load(Addressee &, QFile *file)
Load single addressee from file.
Definition: binaryformat.cpp:47
KABC::BinaryFormat::checkFormat
bool checkFormat(QFile *file) const
Check for valid format of a file.
Definition: binaryformat.cpp:120
KABC::BinaryFormat::loadAll
bool loadAll(AddressBook *, Resource *, QFile *file)
Load whole addressee from file.
Definition: binaryformat.cpp:60
KABC::Addressee
address book entry
Definition: addressee.src.h:74
KABC::FormatPlugin
Base class for address book formats.
Definition: formatplugin.h:42
KABC::AddressBook
Address Book.
Definition: addressbook.h:43
KABC::BinaryFormat::saveAll
void saveAll(AddressBook *, Resource *, QFile *file)
Save all addressees to file.
Definition: binaryformat.cpp:97

KDE Home | KDE Accessibility Home | Description of Access Keys