//
//     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 Item : Akonadi::Entity
{
%TypeHeaderCode
#include <akonadi/item.h>
%End

public:
    typedef QList<Akonadi::Item> List;

    typedef QByteArray Flag;

    typedef QSet<QByteArray> Flags;

    const char* FullPayload;
                            Item ();
    explicit                Item (Id id);
    explicit                Item (const QString& mimeType);
                            Item (const Akonadi::Item& other);
    static Akonadi::Item    fromUrl (const KUrl& url);
    Akonadi::Item::Flags    flags () const;
    QDateTime               modificationTime () const;
    void                    setModificationTime (const QDateTime& datetime);
    bool                    hasFlag (const QByteArray& name) const;
    void                    setFlag (const QByteArray& name);
    void                    clearFlag (const QByteArray& name);
    void                    setFlags (const Akonadi::Item::Flags& flags);
    void                    clearFlags ();
    void                    setPayloadFromData (const QByteArray& data);
    QByteArray              payloadData () const;
    QSet<QByteArray>        loadedPayloadParts () const;
    void                    setRevision (int revision);
    int                     revision () const;
    Akonadi::Entity::Id     storageCollectionId () const;
    void                    setSize (qint64 size);
    qint64                  size () const;
    void                    setMimeType (const QString& mimeType);
    QString                 mimeType () const;
    bool                    hasPayload () const;

    enum UrlType
    {
        UrlShort,
        UrlWithMimeType
    };

    KUrl                    url (Akonadi::Item::UrlType type = Akonadi::Item::UrlShort) const;
};   // Item

};   // Akonadi


