#ifndef _H_SM_DIALOG_MESSAGE_SM
#define _H_SM_DIALOG_MESSAGE_SM

/*
 * ex: set ro:
 * DO NOT EDIT.
 * generated by smc (http://smc.sourceforge.net/)
 * from file : sm_dialog_message.sm
 */


#define SMC_USES_IOSTREAMS

#define SMC_NO_EXCEPTIONS

#include <statemap.h>

namespace dgo
{
    // Forward declarations.
    class map_dialog_message;
    class map_dialog_message_Initialized;
    class map_dialog_message_Trying;
    class map_dialog_message_Authentifying;
    class map_dialog_message_Terminated;
    class map_dialog_message_Default;
    class sip_dialog_messageState;
    class sip_dialog_messageContext;
    class sip_dialog_message;

    class sip_dialog_messageState :
        public statemap::State
    {
    public:

        sip_dialog_messageState(const char *name, int stateId)
        : statemap::State(name, stateId)
        {};

        virtual void Entry(sip_dialog_messageContext&) {};
        virtual void Exit(sip_dialog_messageContext&) {};

        virtual void sm_1xx_response(sip_dialog_messageContext& context);
        virtual void sm_2xx_response(sip_dialog_messageContext& context);
        virtual void sm_401_407_421_494_response(sip_dialog_messageContext& context);
        virtual void sm_authentificationSent(sip_dialog_messageContext& context);
        virtual void sm_messageSent(sip_dialog_messageContext& context);
        virtual void sm_xxx_response(sip_dialog_messageContext& context);

    protected:

        virtual void Default(sip_dialog_messageContext& context);
    };

    class map_dialog_message
    {
    public:

        static map_dialog_message_Initialized Initialized;
        static map_dialog_message_Trying Trying;
        static map_dialog_message_Authentifying Authentifying;
        static map_dialog_message_Terminated Terminated;
    };

    class map_dialog_message_Default :
        public sip_dialog_messageState
    {
    public:

        map_dialog_message_Default(const char *name, int stateId)
        : sip_dialog_messageState(name, stateId)
        {};

        virtual void sm_401_407_421_494_response(sip_dialog_messageContext& context);
        virtual void Default(sip_dialog_messageContext& context);
    };

    class map_dialog_message_Initialized :
        public map_dialog_message_Default
    {
    public:
        map_dialog_message_Initialized(const char *name, int stateId)
        : map_dialog_message_Default(name, stateId)
        {};

        void Entry(sip_dialog_messageContext&);
        void sm_messageSent(sip_dialog_messageContext& context);
    };

    class map_dialog_message_Trying :
        public map_dialog_message_Default
    {
    public:
        map_dialog_message_Trying(const char *name, int stateId)
        : map_dialog_message_Default(name, stateId)
        {};

        void Entry(sip_dialog_messageContext&);
        void sm_1xx_response(sip_dialog_messageContext& context);
        void sm_2xx_response(sip_dialog_messageContext& context);
        void sm_401_407_421_494_response(sip_dialog_messageContext& context);
        void sm_xxx_response(sip_dialog_messageContext& context);
    };

    class map_dialog_message_Authentifying :
        public map_dialog_message_Default
    {
    public:
        map_dialog_message_Authentifying(const char *name, int stateId)
        : map_dialog_message_Default(name, stateId)
        {};

        void Entry(sip_dialog_messageContext&);
        void Default(sip_dialog_messageContext& context);
        void sm_1xx_response(sip_dialog_messageContext& context);
        void sm_2xx_response(sip_dialog_messageContext& context);
        void sm_authentificationSent(sip_dialog_messageContext& context);
        void sm_xxx_response(sip_dialog_messageContext& context);
    };

    class map_dialog_message_Terminated :
        public map_dialog_message_Default
    {
    public:
        map_dialog_message_Terminated(const char *name, int stateId)
        : map_dialog_message_Default(name, stateId)
        {};

        void Entry(sip_dialog_messageContext&);
        void Default(sip_dialog_messageContext& context);
    };

    class sip_dialog_messageContext :
        public statemap::FSMContext
    {
    public:

        sip_dialog_messageContext(sip_dialog_message& owner)
        : FSMContext(map_dialog_message::Initialized),
          _owner(owner)
        {};

        sip_dialog_messageContext(sip_dialog_message& owner, const statemap::State& state)
        : FSMContext(state),
          _owner(owner)
        {};

        virtual void enterStartState()
        {
            getState().Entry(*this);
            return;
        }

        sip_dialog_message& getOwner() const
        {
            return (_owner);
        };

        sip_dialog_messageState& getState() const
        {
            if (_state == NULL)
            {
                assert(1 == 0);
            }

            return (dynamic_cast<sip_dialog_messageState&>(*_state));
        };

        void sm_1xx_response()
        {
            (getState()).sm_1xx_response(*this);
        };

        void sm_2xx_response()
        {
            (getState()).sm_2xx_response(*this);
        };

        void sm_401_407_421_494_response()
        {
            (getState()).sm_401_407_421_494_response(*this);
        };

        void sm_authentificationSent()
        {
            (getState()).sm_authentificationSent(*this);
        };

        void sm_messageSent()
        {
            (getState()).sm_messageSent(*this);
        };

        void sm_xxx_response()
        {
            (getState()).sm_xxx_response(*this);
        };

    private:

        sip_dialog_message& _owner;
    };
}


/*
 * Local variables:
 *  buffer-read-only: t
 * End:
 */

#endif // _H_SM_DIALOG_MESSAGE_SM
