#ifndef _H_SM_DIALOG_PUBLISH_SM
#define _H_SM_DIALOG_PUBLISH_SM

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


#define SMC_USES_IOSTREAMS

#define SMC_NO_EXCEPTIONS

#include <statemap.h>

namespace dgo
{
    // Forward declarations.
    class map_dialog_publish;
    class map_dialog_publish_Initialized;
    class map_dialog_publish_Trying;
    class map_dialog_publish_Established;
    class map_dialog_publish_Authentifying;
    class map_dialog_publish_Terminated;
    class map_dialog_publish_Default;
    class sip_dialog_publishState;
    class sip_dialog_publishContext;
    class sip_dialog_publish;

    class sip_dialog_publishState :
        public statemap::State
    {
    public:

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

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

        virtual void sm_1xx_response(sip_dialog_publishContext& context);
        virtual void sm_2xx_response(sip_dialog_publishContext& context, bool unpub);
        virtual void sm_3xx_response(sip_dialog_publishContext& context);
        virtual void sm_401_407_421_494_response(sip_dialog_publishContext& context);
        virtual void sm_4xx_response(sip_dialog_publishContext& context);
        virtual void sm_5xx_response(sip_dialog_publishContext& context);
        virtual void sm_6xx_response(sip_dialog_publishContext& context);
        virtual void sm_authentificationSent(sip_dialog_publishContext& context);
        virtual void sm_cancelSent(sip_dialog_publishContext& context);
        virtual void sm_publishSent(sip_dialog_publishContext& context);
        virtual void sm_unpublishSent(sip_dialog_publishContext& context);
        virtual void sm_xxx_response(sip_dialog_publishContext& context);

    protected:

        virtual void Default(sip_dialog_publishContext& context);
    };

    class map_dialog_publish
    {
    public:

        static map_dialog_publish_Initialized Initialized;
        static map_dialog_publish_Trying Trying;
        static map_dialog_publish_Established Established;
        static map_dialog_publish_Authentifying Authentifying;
        static map_dialog_publish_Terminated Terminated;
    };

    class map_dialog_publish_Default :
        public sip_dialog_publishState
    {
    public:

        map_dialog_publish_Default(const char *name, int stateId)
        : sip_dialog_publishState(name, stateId)
        {};

        virtual void sm_401_407_421_494_response(sip_dialog_publishContext& context);
        virtual void sm_3xx_response(sip_dialog_publishContext& context);
        virtual void sm_4xx_response(sip_dialog_publishContext& context);
        virtual void sm_5xx_response(sip_dialog_publishContext& context);
        virtual void sm_6xx_response(sip_dialog_publishContext& context);
        virtual void sm_xxx_response(sip_dialog_publishContext& context);
        virtual void Default(sip_dialog_publishContext& context);
    };

    class map_dialog_publish_Initialized :
        public map_dialog_publish_Default
    {
    public:
        map_dialog_publish_Initialized(const char *name, int stateId)
        : map_dialog_publish_Default(name, stateId)
        {};

        void Entry(sip_dialog_publishContext&);
        void sm_publishSent(sip_dialog_publishContext& context);
    };

    class map_dialog_publish_Trying :
        public map_dialog_publish_Default
    {
    public:
        map_dialog_publish_Trying(const char *name, int stateId)
        : map_dialog_publish_Default(name, stateId)
        {};

        void Entry(sip_dialog_publishContext&);
        void Default(sip_dialog_publishContext& context);
        void sm_1xx_response(sip_dialog_publishContext& context);
        void sm_2xx_response(sip_dialog_publishContext& context, bool unpub);
        void sm_3xx_response(sip_dialog_publishContext& context);
        void sm_401_407_421_494_response(sip_dialog_publishContext& context);
        void sm_4xx_response(sip_dialog_publishContext& context);
        void sm_5xx_response(sip_dialog_publishContext& context);
        void sm_6xx_response(sip_dialog_publishContext& context);
        void sm_cancelSent(sip_dialog_publishContext& context);
        void sm_xxx_response(sip_dialog_publishContext& context);
    };

    class map_dialog_publish_Established :
        public map_dialog_publish_Default
    {
    public:
        map_dialog_publish_Established(const char *name, int stateId)
        : map_dialog_publish_Default(name, stateId)
        {};

        void Entry(sip_dialog_publishContext&);
        void Default(sip_dialog_publishContext& context);
        void sm_1xx_response(sip_dialog_publishContext& context);
        void sm_2xx_response(sip_dialog_publishContext& context, bool unpub);
        void sm_401_407_421_494_response(sip_dialog_publishContext& context);
        void sm_publishSent(sip_dialog_publishContext& context);
        void sm_unpublishSent(sip_dialog_publishContext& context);
        void sm_xxx_response(sip_dialog_publishContext& context);
    };

    class map_dialog_publish_Authentifying :
        public map_dialog_publish_Default
    {
    public:
        map_dialog_publish_Authentifying(const char *name, int stateId)
        : map_dialog_publish_Default(name, stateId)
        {};

        void Entry(sip_dialog_publishContext&);
        void Default(sip_dialog_publishContext& context);
        void sm_1xx_response(sip_dialog_publishContext& context);
        void sm_2xx_response(sip_dialog_publishContext& context, bool unpub);
        void sm_authentificationSent(sip_dialog_publishContext& context);
        void sm_xxx_response(sip_dialog_publishContext& context);
    };

    class map_dialog_publish_Terminated :
        public map_dialog_publish_Default
    {
    public:
        map_dialog_publish_Terminated(const char *name, int stateId)
        : map_dialog_publish_Default(name, stateId)
        {};

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

    class sip_dialog_publishContext :
        public statemap::FSMContext
    {
    public:

        sip_dialog_publishContext(sip_dialog_publish& owner)
        : FSMContext(map_dialog_publish::Initialized),
          _owner(owner)
        {};

        sip_dialog_publishContext(sip_dialog_publish& owner, const statemap::State& state)
        : FSMContext(state),
          _owner(owner)
        {};

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

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

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

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

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

        void sm_2xx_response(bool unpub)
        {
            (getState()).sm_2xx_response(*this, unpub);
        };

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

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

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

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

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

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

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

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

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

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

    private:

        sip_dialog_publish& _owner;
    };
}


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

#endif // _H_SM_DIALOG_PUBLISH_SM
