kabc Library: dbwrapper.h Source File (kabc Library)

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

# dbwrapper.h

    00001 #ifndef KABC_EVOLUTION_DB_WRAPPER
    00002 #define KABC_EVOLUTION_DB_WRAPPER
    00003
    00004 #include <db.h>
    00005
    00006 #include <qstring.h>
    00007 #include <qpair.h>
    00008
    00009 namespace Evolution {
    00010
    00011     class DBWrapper;
    00012     class DBIterator {
    00013         friend class DBWrapper;
    00014     public:
    00015         DBIterator( DBWrapper* = 0l );
    00016         ~DBIterator();
    00017
    00018         DBIterator( const DBIterator& );
    00019         DBIterator &operator=( const DBIterator& );
    00020
    00021         QString key()const;
    00022         QString value()const;
    00023
    00024         QString operator*();
    00025
    00026         DBIterator &operator++();
    00027         DBIterator &operator--();
    00028
    00029         bool operator==( const DBIterator& );
    00030         bool operator!=( const DBIterator& );
    00031     private:
    00032         struct Data;
    00033         Data* data;
    00034     };
    00035     class DBWrapper {
    00036     public:
    00037         DBWrapper();
    00038         ~DBWrapper();
    00039
    00040         QString lastError()const;
    00041
    00042         bool open( const QString& file, bool readOnly = false);
    00043         bool save();
    00044         DBIterator begin();
    00045         DBIterator end();
    00046
    00047         bool find( const QString& key, QString& value );
    00048         bool add( const QString& key,  const QString& val );
    00049         bool remove( const QString& key );
    00050     private:
    00051         //  DBT element( const QString& );
    00052         struct Data;
    00053         Data* data;
    00054
    00055     };
    00056
    00057 }
    00058
    00059
    00060 #endif

This file is part of the documentation for kabc Library Version 3.4.1.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat Jun 11 20:31:29 2005 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003