/* ============================================================
 * File  : albumxml.h
 * Author: Renchi Raju <renchi@pooh.tam.uiuc.edu>
 * Date  : 2003-09-23
 * Description : 
 * 
 * Copyright 2003 by Renchi Raju

 * This program is free software; you can redistribute it
 * and/or modify it under the terms of the GNU General
 * Public License as published bythe Free Software Foundation;
 * either version 2, or (at your option)
 * any later version.
 * 
 * This program 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.
 * 
 * ============================================================ */

#ifndef ALBUMXML_H
#define ALBUMXML_H

class QString;

/*! 
 * AlbumXMLEditor
 *
 * Interface to get/set the item properties in the given
 * album. currently only handles comments for the items. Also writes
 * the album properties to the xml file.
 */

namespace Digikam
{

class AlbumInfo;
class AlbumXMLEditorPriv;

class AlbumXMLEditor
{
public:

    AlbumXMLEditor(AlbumInfo *album);
    ~AlbumXMLEditor();

    void open();
    void close();

    QString find(const QString& item);
    void    insert(const QString& item, const QString& comments);
    void    remove(const QString& item);

    bool    isOpen();
    
private:

    bool save();
    void backup();
    void restore();
    void removeBackup();
    
    AlbumXMLEditorPriv *d;
};

}

#endif /* ALBUMXML_H */
