MFClient  1.3.0
 All Classes Functions Variables Enumerations
MFStpBookingHandler.h
1 /*
2  * Copyright (C) 2015 MarketFactory, Inc. All rights reserved.
3  * Use in source and binary forms, with or without modification, is permitted
4  * provided that the following conditions are met:
5  * 1. You may only use this software for internal evaluation and testing
6  * purposes and may not use the software for engaging
7  * in live trades, unless and until you have entered into a separate agreement
8  * with MarketFactory governing the use of
9  * MarketFactory software in a production environment.
10  * 2. You may not distribute the software (in either source or binary forms) to
11  * third parties.
12  * 3. All copies of source code must retain the above copyright notice, this
13  * list of conditions and the following disclaimer.
14  * THIS SOFTWARE IS PROVIDED BY MARKETFACTORY AND ITS LICENSORS "AS IS" AND
15  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING,
16  * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
17  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
18  * NO EVENT SHALL MARKETFACTORY OR ITS LICENSORS BE LIABLE FOR ANY DIRECT,
19  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
22  * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23  * LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF
26  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27  */
28 #ifndef _MF_STPBOOKINGHANDLER_H_
29 #define _MF_STPBOOKINGHANDLER_H_
30 
31 #include <MFStpBookingSession.h>
32 
33 #include <mfstp_booking/LogonResponse.hpp>
34 #include <mfstp_booking/Logout.hpp>
35 #include <mfstp_booking/LogoutResponse.hpp>
36 #include <mfstp_booking/SecurityDefinition.hpp>
37 #include <mfstp_booking/SecurityDefinitionRequest.hpp>
38 #include <mfstp_booking/Heartbeat.hpp>
39 #include <mfstp_booking/TradeCaptureReportRequest.hpp>
40 #include <mfstp_booking/TradeCaptureReportAck.hpp>
41 #include <mfstp_booking/TradeCaptureReportSpotForward.hpp>
42 
43 #include <mfstp_booking/TradeCaptureReportSwap.hpp>
44 #include <mfstp_booking/TradeReportRejectReason.hpp>
45 #include <mfstp_booking/TrdRptStatus.hpp>
46 
52  public:
57  virtual void onStart(MFStpBookingSession& session) = 0;
58 
63  virtual void onStop(MFStpBookingSession& session) = 0;
64 
68  virtual void onConnect(MFStpBookingSession& session) = 0;
69 
73  virtual void onDisconnect(const std::string& msg,
74  MFStpBookingSession& session) = 0;
75 
79  virtual void on(const mfstp_booking::LogonResponse& logonResponse,
80  MFStpBookingSession& session) = 0;
81 
86  virtual void on(const mfstp_booking::Logout& logout,
87  MFStpBookingSession& session) = 0;
88 
92  virtual void on(const mfstp_booking::LogoutResponse& logoutResponse,
93  MFStpBookingSession& session) = 0;
94 
98  virtual void on(const mfstp_booking::Heartbeat& heartbeat,
99  MFStpBookingSession& session) = 0;
100 
104  virtual void on(const mfstp_booking::SecurityDefinition& sd,
105  MFStpBookingSession& session) = 0;
106 
110  virtual void on(const mfstp_booking::TradeCaptureReportRequest& tcrr,
111  MFStpBookingSession& session) = 0;
112 
116  virtual void on(const mfstp_booking::TradeCaptureReportAck& tcra,
117  MFStpBookingSession& session) = 0;
118 
122  virtual void on(const mfstp_booking::Confirmation& c,
123  MFStpBookingSession& session) = 0;
124 
125  };
126 
127 #endif
virtual void onStart(MFStpBookingSession &session)=0
Called right before the handler becomes active in the MFClient::run() event loop. ...
Applications implement this interface in order to process events from a MFStpBookingSession ...
Definition: MFStpBookingHandler.h:51
virtual void onDisconnect(const std::string &msg, MFStpBookingSession &session)=0
Called when the session socket disconnects.
virtual void onConnect(MFStpBookingSession &session)=0
Called when the session establishes a socket connection.
virtual void on(const mfstp_booking::LogonResponse &logonResponse, MFStpBookingSession &session)=0
Called when a logon is successful.
A session with MarketFactory for trading with all the venues for which a user has access...
Definition: MFStpBookingSession.h:69
virtual void onStop(MFStpBookingSession &session)=0
Called when the session is being removed from processing in the event loop.