00001
00002
00003
00004
00005 #ifndef ICppSessionListener_h
00006 #define ICppSessionListener_h
00007
00008 #include "FIXEngineDefines.h"
00009
00010 namespace FIXForge{
00011 namespace FIX{
00012 class Message;
00013 class Session;
00014
00015
00016 class FF_API ISessionListener{
00017 public:
00018
00019 virtual void onInboundApplicationMsg(const Message& msg, Session* sn){;}
00020
00021
00022 virtual void onInboundSessionMsg(const Message& msg, Session* sn){}
00023
00024
00025 virtual void onOutboundApplicationMsg(const Message& msg, Session* sn){};
00026
00027
00028 virtual void onOutboundSessionMsg(const Message& msg, Session* sn){};
00029
00030
00031 virtual void onStateChange(Session::State newState, Session::State prevState, Session* sn){;}
00032
00033
00034
00035
00036 virtual bool onResendRequest(const Message& msg, Session* sn){return true;}
00037
00038
00039 enum ErrorReason{FIRST_MESSAGE_NOT_A_LOGON, MSG_SEQ_NUM_TOO_LOW, CANNOT_RESTORE_CONNECTION};
00040
00041
00042 virtual void onError(ErrorReason reason, const std::string& description, Session* sn){};
00043
00044
00045 enum WarningReason{GARBLED_MESSAGE_RECEIVED, LINK_ERROR};
00046
00047
00048 virtual void onWarning(WarningReason reason, const std::string& description, Session* sn){}
00049 };
00050 }};
00051
00052 #endif