/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2008 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:  Declaration of the class ICommandEventHandler
 *   Handler of specific range of command IDs. Once your tool/service requests
 *   command ids range, it's registered as commandHandler. Once extracted from
 *   queue, a message is delivered to it's appropriate handler
 *--------------------------------------------------------------------------
 * @created: Sunday, April 06, 2003 19:06:08
 */

#if !defined(ICommandEventHandler_h_included)
#define ICommandEventHandler_h_included
//forward declaration of this class might require
namespace core
{ namespace events
  { class ICommandEventHandler; class CCommandEventHandlerCol; }; };
#include <zmodeler.h>
#include <core/events/eventsTypes.h>
#include <core/events/IEventHandler.h>


namespace core
{
  namespace events
  {
    
    class ICommandEventHandler : public core::events::IEventHandler
    {
    public:
      virtual ZRESULT onCommand(DWORD dwCommand)=0;
      virtual ZRESULT onUpdateState(DWORD nID, DWORD& dwStatus)=0;
      virtual ZRESULT getHintString(DWORD dwCommand, ZString& strHint)=0;
    
    };//class ICommandEventHandler
    
    //
    // collection template
    //
    class CCommandEventHandlerCol : public ZUnknown,
        public ZIntrCollection<ICommandEventHandler>
    {
    public:
      INTERFACE_FUNCTIONS_DEFAULT(CCommandEventHandlerCol)
    };//class CCommandEventHandlerCol
  };//events
};//core

#endif
