/* mini
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
 * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
*/

#ifndef zz_message_h
#define zz_message_h

#include <zz_string.h>
#include <map>
#include <zz_export.h>

typedef map<CzzString, CzzString > CzzMessageBody;

class ZZ_API CzzMessage
{
public:

    CzzMessage();
    virtual ~CzzMessage();

    void send( const CzzString& queue );

    void setId( const CzzString& id );
    void setQueue( const CzzString& queue );
    void setTime( long t );

    CzzString getId( void );
    CzzString getQueue( void );
    long getTime( void );

    void add( const CzzString& key, const CzzString& value );

    CzzString* get( const CzzString& key );

    CzzMessageBody* get( void );

protected:
private:

    CzzString m_Id;
    CzzString m_Queue;
    long m_Time;
    CzzMessageBody m_Map;
};

#endif // zz_message_h