1*0Sstevel@tonic-gate // Copyright (c) 1994 James Clark 2*0Sstevel@tonic-gate // See the file COPYING for copying permission. 3*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 4*0Sstevel@tonic-gate 5*0Sstevel@tonic-gate #ifndef MessageEventHandler_INCLUDED 6*0Sstevel@tonic-gate #define MessageEventHandler_INCLUDED 1 7*0Sstevel@tonic-gate 8*0Sstevel@tonic-gate #include "Event.h" 9*0Sstevel@tonic-gate #include "ErrorCountEventHandler.h" 10*0Sstevel@tonic-gate 11*0Sstevel@tonic-gate #ifdef SP_NAMESPACE 12*0Sstevel@tonic-gate namespace SP_NAMESPACE { 13*0Sstevel@tonic-gate #endif 14*0Sstevel@tonic-gate 15*0Sstevel@tonic-gate class OutputCharStream; 16*0Sstevel@tonic-gate class SgmlParser; 17*0Sstevel@tonic-gate 18*0Sstevel@tonic-gate class SP_API MessageEventHandler : public ErrorCountEventHandler { 19*0Sstevel@tonic-gate public: 20*0Sstevel@tonic-gate // if parser is non-null then subdocs will be parsed automatically 21*0Sstevel@tonic-gate MessageEventHandler(Messenger *messenger, const SgmlParser *parser = 0); 22*0Sstevel@tonic-gate void message(MessageEvent *); 23*0Sstevel@tonic-gate void subdocEntity(SubdocEntityEvent *); 24*0Sstevel@tonic-gate Messenger *messenger() const; 25*0Sstevel@tonic-gate private: 26*0Sstevel@tonic-gate Messenger *messenger_; 27*0Sstevel@tonic-gate const SgmlParser *parser_; 28*0Sstevel@tonic-gate }; 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate inline messenger()31*0Sstevel@tonic-gateMessenger *MessageEventHandler::messenger() const 32*0Sstevel@tonic-gate { 33*0Sstevel@tonic-gate return messenger_; 34*0Sstevel@tonic-gate } 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate #ifdef SP_NAMESPACE 37*0Sstevel@tonic-gate } 38*0Sstevel@tonic-gate #endif 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #endif /* not MessageEventHandler_INCLUDED */ 41