/** * @file include/ActivOneApi/IQueryHandler.h * * @brief Header for the IQueryHandler class. */ #if (!defined ACTIV_ONE_API_IQUERY_HANDLER_H) #define ACTIV_ONE_API_IQUERY_HANDLER_H #include "ActivOneApi/External.h" #include "ActivOneApi/TypeDefinitions.h" #include "ActivOneApi/Constants/DataSourceIds.h" //! Activ namespace. namespace Activ { //! OneApi namespace. namespace OneApi { class Context; class QueryAddMessage; class QueryRemoveMessage; class QueryStatusMessage; //! Query symbol pattern (see Session::Query()). class QuerySymbolPattern { public: //! Default constructor. QuerySymbolPattern(); DataSourceId m_dataSourceId; ///< The data source. TableNo m_tableNumber; ///< The table number. String m_symbolPattern; ///< The symbol pattern. }; // --------------------------------------------------------------------------------------------------------------------------------- inline QuerySymbolPattern::QuerySymbolPattern() : m_dataSourceId(DATA_SOURCE_UNDEFINED), m_tableNumber(TABLE_NO_UNDEFINED) { } // --------------------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------------------- //! Query handler interface class. class IQueryHandler { public: //! Destructor. virtual ~IQueryHandler() { } /** * @brief Callback on topic added. * * @param message the @a QueryAddMessage object containing the details of a topic found or added. * @param context the context for this event. */ virtual void OnQueryAdd(const QueryAddMessage &message, const Context &context) { } /** * @brief Callback on topic removed. * * @param message the @a QueryRemoveMessage object containing the details of the topic that has been deleted. * @param context the context for this event. */ virtual void OnQueryRemove(const QueryRemoveMessage &message, const Context &context) { } /** * @brief Callback on query status change. * * @param message the @a QueryStatusMessage object. * @param context the context for this event. */ virtual void OnQueryStatus(const QueryStatusMessage &message, const Context &context) { } }; } // namespace OneApi } // namespace Activ #endif // (!defined ACTIV_ONE_API_IQUERY_HANDLER_H)