OnixS C++ MTS Cash SDP Handler 1.9.4
API documentation
Loading...
Searching...
No Matches
Handler.h
Go to the documentation of this file.
1#pragma once
2/*
3* Copyright Onix Solutions Limited [OnixS]. All rights reserved.
4*
5* This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
6* and international copyright treaties.
7*
8* Access to and use of the software is governed by the terms of the applicable ONIXS Software
9* Services Agreement (the Agreement) and Customer end user license agreements granting
10* a non-assignable, non-transferable and non-exclusive license to use the software
11* for it's own data processing purposes under the terms defined in the Agreement.
12*
13* Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
14* of this source code or associated reference material to any other location for further reproduction
15* or redistribution, and any amendments to this copyright notice, are expressly prohibited.
16*
17* Any reproduction or redistribution for sale or hiring of the Software not in accordance with
18* the terms of the Agreement is a violation of copyright law.
19*/
20
34
35#include <cstddef>
36#include <string>
37
38namespace OnixS {
39namespace Mts {
40namespace Cash {
41namespace SDP {
42
43class Class;
44struct ReplayOptions;
45
46template <typename TResultEnum>
48{
50 TResultEnum result;
51
54};
55
58
61
64
66class ONIXS_MTS_CASH_SDP_API Handler
67{
68public:
73 Handler (const HandlerSettings& settings);
74
75 virtual ~Handler();
76
96 void connect (const ConnectionSettings& connectionSettings, const LogonSettings& logonSettings, const std::string& hostName, UInt16 port, const std::string& localNetworkInterface = "");
97
101 void disconnect ();
102
106
108 void replay(const ReplayOptions& options);
109
117
127
130
138
145 UInt32 act(ActionType::Enum actionType, Class* msg, bool dataInResponse = false);
146
149 UInt32 addFilter(UInt32 filterId, const std::string& value);
150
153 CreateFilterResponse createFilter(FilterId::Enum filterId, const std::string& value);
154
157 SetFilterResponse setFilter(UInt32 filterKey, const std::string& value);
158
162
168
174
180
186
192
198
204
210
216
220
223 Handler& log (LogLevel::Enum logLevel, const char* logMessage, size_t length);
224
227 Handler& log (LogLevel::Enum logLevel, const char* logMessage);
228
231 Handler& log (LogLevel::Enum logLevel, const std::string& str);
232
235 const std::string& licenseExpirationDate () const;
236
239 static const std::string version ();
240
241private:
242 Handler (const Handler&); // no implementation
243 Handler& operator = (const Handler&); // no implementation
244
245private:
246 struct Impl;
247 Impl* impl_;
248};
249}
250}
251}
252}
void registerWarningListener(WarningListener *listener)
SetFilterResponse setFilter(UInt32 filterKey, const std::string &value)
void registerClassListener(ClassListener *listener)
void registerHandlerStateListener(HandlerStateListener *listener)
Handler & log(LogLevel::Enum logLevel, const std::string &str)
void unsubscribe(ClassId::Enum classId)
void registerAdminMessageListener(AdminMessageListener *listener)
void registerErrorListener(ErrorListener *listener)
UInt32 act(ActionType::Enum actionType, Class *msg, bool dataInResponse=false)
void replay(const ReplayOptions &options)
Replays previously logged data.
void connect(const ConnectionSettings &connectionSettings, const LogonSettings &logonSettings, const std::string &hostName, UInt16 port, const std::string &localNetworkInterface="")
void registerSessionListener(SessionListener *listener)
void registerServiceAddressInformationListener(ServiceAddressInformationListener *listener)
void registerActResultListener(ActResultListener *listener)
Handler(const HandlerSettings &settings)
void registerSubscriptionListener(SubscriptionListener *listener)
UInt32 addFilter(UInt32 filterId, const std::string &value)
void subscribeFiltered(ClassId::Enum classId, UInt32 filterKey, SubscribeType::Enum subscribeType=SubscribeType::All)
subscribe to market information with filter
const std::string & licenseExpirationDate() const
Handler & log(LogLevel::Enum logLevel, const char *logMessage)
static const std::string version()
HandlerState::Enum state() const
DestroyFilterResponse destroyFilter(UInt32 filterKey)
Handler & log(LogLevel::Enum logLevel, const char *logMessage, size_t length)
CreateFilterResponse createFilter(FilterId::Enum filterId, const std::string &value)
void subscribe(ClassId::Enum classId, SubscribeType::Enum subscribeType=SubscribeType::All)
FilterResponse< SetFilterResult::Enum > SetFilterResponse
Definition Handler.h:60
unsigned int UInt32
Definition Defines.h:46
FilterResponse< CreateFilterResult::Enum > CreateFilterResponse
Definition Handler.h:57
FilterResponse< DestroyFilterResult::Enum > DestroyFilterResponse
Definition Handler.h:63
unsigned short UInt16
Definition Defines.h:45
Defines ONIXS_CBOECFE_PITCH_API which affect logs replay.
Definition Replay.h:57