/**
 * $Id$
 * $Revision$
 * $Author$
 * $Date$
 *
 * This file is part of The iWear Framework.
 * In particular this file is part of the Framework Output
 *
 * The iWear Framework is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by the
 * Free Software Foundation as in version 2 of the License.

 * 
 * The iWear Framework 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
 * The iWear Framework; if not, write to the Free Software Foundation, Inc., 59
 * Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
#ifndef __IMAGEDATA_H
#define __IMAGEDATA_H

#include <iwear_output/outputdata.h>
#include <iwear/debugstream.h>

#include <string>

namespace iwear {
namespace output {

/**
 * What can happen on an image?
 */
enum IMAGE_EVENT
{
    IMAGE_CHANGED_CONTENT,
    num_IMAGE_EVENT
};


/**
 * to_string() method for ImageData changes 
 */
inline const char* to_string(IMAGE_EVENT image_event)
{
    switch(image_event)
	{
	case IMAGE_CHANGED_CONTENT : 
	    return "IMAGE_EVENT::IMAGE_CHANGED_CONTENT";
	default :
	    return "IMAGE_EVENT::<invalid_value>";
	}
}


/**
 * This class holds an image
 * @author Carsten Rachuy
 */
class ImageData : public OutputData{
	
public:

    /**
     * Contains the OutputData type of this object.
     */
    static const string TYPE;

    /**
     * Constructor
     * @param name The name of the output data
     * @param description A description of the output data
     * @param content The content, the path of the 
     */	
    ImageData(const uid& application_id,
	      const string& name, 
	      const string& description, 
	      const string& content);
	    
    /**
     * Destructor
     */
    virtual ~ImageData(void);
    
	
    /**
     * @return The content of the text.
     */
    inline const string& get_content(void) {
	return content;
    }

    /**
     * Set the content of this object - this will cause a changed-event to be
     * fired.
     *
     * @param content The new content to be set.
     */
    void set_content(const string& content);
	
private:    

    /** 
     * The actual content of this imagedata...
     */
    string content;

};

} // namespace output
} // namespace iwear


#endif // __IMAGEDATA_H

