OnixS C++ Tullett Prebon SURF Handler 1.6.1
API documentation
Loading...
Searching...
No Matches
Handler.h
Go to the documentation of this file.
1/*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any
13 * part of this source code or associated reference material to any other location for further
14 * reproduction or redistribution, and any amendments to this copyright notice, are expressly
15 * 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
21#pragma once
22
24#include <OnixS/SURF/MarketData/Export.h>
30
31#include <string>
32
33namespace OnixS { namespace SURF { namespace MarketData {
34
36class ONIXS_TP_SURF_EXPORT Handler
37{
38public:
43 Handler(const HandlerSettings& settings);
44
46 virtual ~Handler();
47
53
59
65
71
75 void connect(const std::string& host, int port);
76
78 void disconnect();
79
84 void subscribe(FieldId fieldId);
85
90 void unsubscribe(FieldId fieldId);
91
94
96 void log(LogLevel::Enum logLevel, const char* logMessage, size_t length);
97
99 void log(LogLevel::Enum logLevel, const char* logMessage);
100
102 void log(LogLevel::Enum logLevel, const std::string& str);
103
105 const char* licenseExpirationDate() const;
106
108 static const char* version();
109
110private:
111 Handler(const Handler&); // no implementation
112 Handler& operator=(const Handler&); // no implementation
113
114private:
115 struct Impl;
116 Impl* impl_;
117};
118
119}}} // namespace OnixS::SURF::MarketData
void registerWarningListener(WarningListener *listener)
void registerRecordListener(RecordListener *listener)
void registerHandlerStateListener(HandlerStateListener *listener)
void connect(const std::string &host, int port)
void registerErrorListener(ErrorListener *listener)
void unsubscribe(FieldId fieldId)
void log(LogLevel::Enum logLevel, const std::string &str)
Logs the given user-level message to the handler log.
void log(LogLevel::Enum logLevel, const char *logMessage, size_t length)
Logs the given user-level message to the handler log.
Handler(const HandlerSettings &settings)
void disconnect()
Disconnects the Handler.
static const char * version()
Returns Handler's version.
void subscribe(FieldId fieldId)
HandlerState::Enum state() const
Returns handler state.
virtual ~Handler()
Finalizes the Handler.
const char * licenseExpirationDate() const
Returns the license expiration date.
void log(LogLevel::Enum logLevel, const char *logMessage)
Logs the given user-level message to the handler log.
unsigned int FieldId
Alias for field ID.
Definition Defines.h:49
Enum
Defines the state that the handler is in.