EMA C++ Edition
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AckMsg.h
Go to the documentation of this file.
1 /*|-----------------------------------------------------------------------------
2  *| This source code is provided under the Apache 2.0 license --
3  *| and is provided AS IS with no warranty or guarantee of fit for purpose. --
4  *| See the project's LICENSE.md for details. --
5  *| Copyright (C) 2019 Refinitiv. All rights reserved. --
6  *|-----------------------------------------------------------------------------
7  */
8 
9 #ifndef __thomsonreuters_ema_access_AckMsg_h
10 #define __thomsonreuters_ema_access_AckMsg_h
11 
59 #include "Access/Include/Msg.h"
60 
61 namespace thomsonreuters {
62 
63 namespace ema {
64 
65 namespace access {
66 
67 class EMA_ACCESS_API AckMsg : public Msg
68 {
69 public :
70 
74  enum NackCode
75  {
76  NoneEnum = 0,
78  AccessDeniedEnum = 1,
80  DeniedBySourceEnum = 2,
82  SourceDownEnum = 3,
84  SourceUnknownEnum = 4,
86  NoResourcesEnum = 5,
88  NoResponseEnum = 6,
90  GatewayDownEnum = 7,
92  SymbolUnknownEnum = 10,
94  NotOpenEnum = 11,
96  InvalidContentEnum = 12
97  };
98 
100 
101 
103  AckMsg();
104 
109  AckMsg( const AckMsg& other );
111 
113 
114 
116  virtual ~AckMsg();
118 
120 
121 
124  const EmaString& getNackCodeAsString() const;
125 
129  DataType::DataTypeEnum getDataType() const;
130 
134  Data::DataCode getCode() const;
135 
139  const EmaBuffer& getAsHex() const;
140 
144  const EmaString& toString() const;
145 
150  bool hasSeqNum() const;
151 
156  bool hasNackCode() const;
157 
162  bool hasText() const;
163 
168  bool hasServiceName() const;
169 
174  UInt32 getSeqNum() const;
175 
179  UInt32 getAckId() const;
180 
185  UInt8 getNackCode() const;
186 
191  const EmaString& getText() const;
192 
196  bool getPrivateStream() const;
197 
202  const EmaString& getServiceName() const;
204 
206 
207 
211  AckMsg& clear();
212 
217  AckMsg& streamId( Int32 streamId );
218 
224  AckMsg& domainType( UInt16 domainType = rdm::MMT_MARKET_PRICE );
225 
230  AckMsg& name( const EmaString& name );
231 
236  AckMsg& nameType( UInt8 nameType = rdm::INSTRUMENT_NAME_RIC );
237 
243  AckMsg& serviceName( const EmaString& serviceName );
244 
250  AckMsg& serviceId( UInt32 serviceId );
251 
256  AckMsg& id( Int32 id );
257 
262  AckMsg& filter( UInt32 filter );
263 
268  AckMsg& seqNum( UInt32 seqNum );
269 
274  AckMsg& ackId( UInt32 postId );
275 
280  AckMsg& nackCode( UInt8 nackCode );
281 
286  AckMsg& text( const EmaString& text );
287 
292  AckMsg& attrib( const ComplexType& attrib );
293 
298  AckMsg& payload( const ComplexType& payload );
299 
304  AckMsg& extendedHeader( const EmaBuffer& buffer );
305 
310  AckMsg& privateStream( bool privateStream = false );
312 
313 private :
314 
315  friend class ItemCallbackClient;
316 
317  const EmaString& toString( UInt64 indent ) const;
318 
319  Decoder& getDecoder();
320 
321  AckMsg& operator=( const AckMsg& );
322 
323  mutable EmaString _toString;
324 };
325 
326 }
327 
328 }
329 
330 }
331 
332 #endif // __thomsonreuters_ema_access_AckMsg_h
unsigned short UInt16
represents 16-bit unsigned integer
Definition: Common.h:44
unsigned long long UInt64
represents 64-bit unsigned integer
Definition: Common.h:68
Msg class is a parent class for all message representing classes.
Definition: Msg.h:45
unsigned int UInt32
represents 32-bit unsigned integer
Definition: Common.h:56
EmaString class is a container of a null terminated Ascii character string.
Definition: EmaString.h:56
EmaBuffer represents a general use binary buffer.
Definition: EmaBuffer.h:32
#define EMA_ACCESS_API
Definition: Common.h:95
ComplexType class is a parent class from whom all complex data types inherit.
Definition: ComplexType.h:33
int Int32
represents 32-bit signed integer
Definition: Common.h:62
static const thomsonreuters::ema::access::UInt8 INSTRUMENT_NAME_RIC
Definition: EmaRdm.h:197
static const thomsonreuters::ema::access::UInt8 MMT_MARKET_PRICE
Definition: EmaRdm.h:50
AckMsg indicates success or failure of PostMsg.
Definition: AckMsg.h:67
unsigned char UInt8
represents 8-bit unsigned integer
Definition: Common.h:32