//
//     Copyright 2008 Simon Edwards <simon@simonzone.com>

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 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 General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

namespace Akonadi
{

class ResourceBase : Akonadi::AgentBase
{
%TypeHeaderCode
#include <akonadi/resourcebase.h>
%End

public:
    void                    setName (const QString& name);
    QString                 name () const;

signals:
    void                    nameChanged (const QString& name);

protected:
    virtual void            retrieveCollections () = 0;
    virtual void            retrieveItems (const Akonadi::Collection& collection) = 0;
    virtual bool            retrieveItem (const Akonadi::Item& item, const QSet<QByteArray>& parts) = 0;
                            ResourceBase (const QString& id);
                            ~ResourceBase ();
    void                    itemRetrieved (const Akonadi::Item& item);
    void                    changeCommitted (const Akonadi::Item& item);
    void                    changeCommitted (const Akonadi::Collection& collection);
    void                    collectionsRetrieved (const Akonadi::Collection::List& collections);
    void                    collectionsRetrievedIncremental (const Akonadi::Collection::List& changedCollections, const Akonadi::Collection::List& removedCollections);
    void                    itemsRetrieved (const Akonadi::Item::List& items);
    void                    setTotalItems (int amount);
    void                    setItemStreamingEnabled (bool enable);
    void                    itemsRetrievedIncremental (const Akonadi::Item::List& changedItems, const Akonadi::Item::List& removedItems);
    void                    itemsRetrievalDone ();
    Akonadi::Collection     currentCollection () const;
    Akonadi::Item           currentItem () const;
    void                    synchronize ();
    void                    synchronizeCollection (qint64 id);
    void                    synchronizeCollectionTree ();
    void                    cancelTask ();
    void                    cancelTask (const QString& error);
    void                    doSetOnline (bool online);
};   // ResourceBase

};   // Akonadi


