BLPAPI C++  3.24.2
blpapi_sessionoptions.h
Go to the documentation of this file.
1 /* Copyright 2012. Bloomberg Finance L.P.
2  *
3  * Permission is hereby granted, free of charge, to any person obtaining a copy
4  * of this software and associated documentation files (the "Software"), to
5  * deal in the Software without restriction, including without limitation the
6  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
7  * sell copies of the Software, and to permit persons to whom the Software is
8  * furnished to do so, subject to the following conditions: The above
9  * copyright notice and this permission notice shall be included in all copies
10  * or substantial portions of the Software.
11  *
12  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
13  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
15  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
16  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
17  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
18  * IN THE SOFTWARE.
19  */
20 
28 #ifndef INCLUDED_BLPAPI_SESSIONOPTIONS
29 #define INCLUDED_BLPAPI_SESSIONOPTIONS
30 
90 #ifndef INCLUDED_BLPAPI_CALL
91 #include <blpapi_call.h>
92 #endif
93 
94 #ifndef INCLUDED_BLPAPI_CORRELATIONID
95 #include <blpapi_correlationid.h>
96 #endif
97 
98 #ifndef INCLUDED_BLPAPI_DEFS
99 #include <blpapi_defs.h>
100 #endif
101 
102 #ifndef INCLUDED_BLPAPI_EXCEPTION
103 #include <blpapi_exception.h>
104 #endif
105 
106 #ifndef INCLUDED_BLPAPI_STREAMPROXY
107 #include <blpapi_streamproxy.h>
108 #endif
109 
110 #ifndef INCLUDED_BLPAPI_TLSOPTIONS
111 #include <blpapi_tlsoptions.h>
112 #endif
113 
114 #ifndef INCLUDED_BLPAPI_TYPES
115 #include <blpapi_types.h>
116 #endif
117 
118 #include <blpapi_authoptions.h>
119 #include <blpapi_error.h>
120 #include <blpapi_socks5config.h>
121 
122 #include <stddef.h>
123 
124 #ifdef __cplusplus
125 
126 extern "C" {
127 #endif
128 
131 
134  const blpapi_SessionOptions_t *parameters);
135 
139 
142 
145  blpapi_SessionOptions_t *parameters, const char *serverHost);
146 
149  blpapi_SessionOptions_t *parameters, unsigned short serverPort);
150 
153  const char *serverHost,
154  unsigned short serverPort,
155  size_t index);
156 
159  blpapi_SessionOptions_t *parameters,
160  const char *serverHost,
161  unsigned short serverPort,
162  const blpapi_Socks5Config_t *socks5Config,
163  size_t index);
164 
167  blpapi_SessionOptions_t *parameters, size_t index);
168 
171  blpapi_SessionOptions_t *parameters,
172  unsigned int timeoutInMilliseconds);
173 
176  blpapi_SessionOptions_t *parameters, const char *defaultServices);
177 
180  blpapi_SessionOptions_t *parameters, const char *serviceIdentifier);
181 
184  blpapi_SessionOptions_t *parameters, const char *prefix);
185 
188  blpapi_SessionOptions_t *parameters,
189  int allowMultipleCorrelatorsPerMsg);
190 
193  blpapi_SessionOptions_t *parameters, int clientMode);
194 
197  blpapi_SessionOptions_t *parameters, int maxPendingRequests);
198 
201  blpapi_SessionOptions_t *parameters, int autoRestart);
202 
205  blpapi_SessionOptions_t *parameters, int autoRestart);
208  blpapi_SessionOptions_t *parameters,
209  const blpapi_AuthOptions_t *authOptions,
210  blpapi_CorrelationId_t *cid);
211 
214  blpapi_SessionOptions_t *parameters, const char *authOptions);
215 
218  blpapi_SessionOptions_t *parameters, int numStartAttempts);
219 
222  blpapi_SessionOptions_t *parameters, size_t maxEventQueueSize);
223 
226  blpapi_SessionOptions_t *parameters, float hiWaterMark);
227 
230  blpapi_SessionOptions_t *parameters, float loWaterMark);
231 
234  blpapi_SessionOptions_t *parameters, int inactivityMsecs);
235 
238  blpapi_SessionOptions_t *parameters, int timeoutMsecs);
239 
242  blpapi_SessionOptions_t *parameters, int isEnabled);
243 
246  blpapi_SessionOptions_t *parameters, int shouldRecord);
247 
250  blpapi_SessionOptions_t *paramaters, int timeoutMsecs);
251 
254  blpapi_SessionOptions_t *paramaters, int timeoutMsecs);
255 
258  const blpapi_TlsOptions_t *tlsOptions);
259 
262  blpapi_SessionOptions_t *paramaters, int timeoutMsecs);
263 
266  blpapi_SessionOptions_t *parameters, int disableBandwidthSaveMode);
267 
270  blpapi_SessionOptions_t *parameters);
271 
274  blpapi_SessionOptions_t *parameters);
275 
278  blpapi_SessionOptions_t *parameters);
279 
282  const char **serverHost,
283  unsigned short *serverPort,
284  size_t index);
285 
288  blpapi_SessionOptions_t *parameters,
289  const char **serverHost,
290  unsigned short *serverPort,
291  const char **socks5Host,
292  unsigned short *sock5Port,
293  size_t index);
294 
297  blpapi_SessionOptions_t *parameters);
298 
301  blpapi_SessionOptions_t *parameters);
302 
305  blpapi_SessionOptions_t *parameters);
306 
309  blpapi_SessionOptions_t *parameters);
310 
313  blpapi_SessionOptions_t *parameters);
314 
317 
320  blpapi_SessionOptions_t *parameters);
321 
324  blpapi_SessionOptions_t *parameters);
325 
328 
331  blpapi_SessionOptions_t *parameters);
332 
335  blpapi_SessionOptions_t *parameters);
336 
339  blpapi_SessionOptions_t *parameters);
340 
343  blpapi_SessionOptions_t *parameters);
344 
347  blpapi_SessionOptions_t *parameters);
348 
351  blpapi_SessionOptions_t *parameters);
352 
355  blpapi_SessionOptions_t *parameters);
356 
359  blpapi_SessionOptions_t *parameters);
360 
363  blpapi_SessionOptions_t *parameters);
364 
367  blpapi_SessionOptions_t *parameters);
368 
371  blpapi_SessionOptions_t *parameters);
372 
375  blpapi_StreamWriter_t streamWriter,
376  void *stream,
377  int indentLevel,
378  int spacesPerLevel);
379 
382  blpapi_SessionOptions_t *parameters);
383 
386  blpapi_SessionOptions_t *parameters);
387 
390  blpapi_SessionOptions_t *parameters,
391  const char *applicationIdentityKey,
392  size_t size);
395  const char **applicationIdentityKey,
396  size_t *size,
397  blpapi_SessionOptions_t *parameters);
398 
401  const char *sessionName,
402  size_t size);
403 
405 int blpapi_SessionOptions_sessionName(const char **sessionName,
406  size_t *size,
407  blpapi_SessionOptions_t *parameters);
408 
409 #ifdef __cplusplus
410 }
411 
419 namespace BloombergLP {
420 namespace blpapi {
421 
432 
433  blpapi_SessionOptions_t *d_handle_p;
434 
435  public:
436  /*
437  * The possible options for how to connect to the API
438  */
439 
440  enum ClientMode {
443 
446 
449  };
450 
451  SessionOptions();
456  SessionOptions(const SessionOptions& original);
461  ~SessionOptions();
466  // MANIPULATORS
467 
474  void setServerHost(const char *host);
484  void setServerPort(unsigned short port);
491  int setServerAddress(
492  const char *serverHost, unsigned short serverPort, size_t index);
501  int setServerAddress(const char *serverHost,
502  unsigned short serverPort,
503  const Socks5Config& socks5Config,
504  size_t index);
513  int removeServerAddress(size_t index);
518  void setConnectTimeout(unsigned int timeoutMilliSeconds);
526  void setDefaultServices(const char *defaultServices);
534  void setDefaultSubscriptionService(const char *serviceIdentifier);
546  void setDefaultTopicPrefix(const char *prefix);
569  void setClientMode(int clientMode);
585  const CorrelationId& correlationId = CorrelationId());
608  void setAuthenticationOptions(const char *authOptions);
620  void setAutoRestartOnDisconnection(bool autoRestart);
627  void setMaxEventQueueSize(size_t eventQueueSize);
636  void setSlowConsumerWarningHiWaterMark(float hiWaterMark);
650  void setSlowConsumerWarningLoWaterMark(float loWaterMark);
664  void setDefaultKeepAliveInactivityTime(int inactivityMsecs);
677  void setDefaultKeepAliveResponseTimeout(int timeoutMsecs);
690  void setKeepAliveEnabled(bool isEnabled);
702  void setRecordSubscriptionDataReceiveTimes(bool shouldRecord);
710  void setServiceCheckTimeout(int timeoutMsecs);
718  void setServiceDownloadTimeout(int timeoutMsecs);
726  void setTlsOptions(const TlsOptions& tlsOptions);
731  void setFlushPublishedEventsTimeout(int timeoutMsecs);
739  void setBandwidthSaveModeDisabled(bool isDisabled);
746  void setApplicationIdentityKey(const std::string& applicationIdentityKey);
752  void setSessionName(const std::string& sessionName);
760  // ACCESSORS
761  const char *serverHost() const;
768  unsigned short serverPort() const;
775  size_t numServerAddresses() const;
780  int getServerAddress(const char **serverHost,
781  unsigned short *serverPort,
782  size_t index) const;
789  int getServerAddress(const char **serverHost,
790  unsigned short *serverPort,
791  Socks5Config *socksConfig,
792  size_t index) const;
800  unsigned int connectTimeout() const;
806  const char *defaultServices() const;
811  const char *defaultSubscriptionService() const;
819  const char *defaultTopicPrefix() const;
826  bool allowMultipleCorrelatorsPerMsg() const;
832  int clientMode() const;
838  int maxPendingRequests() const;
849  bool autoRestartOnDisconnection() const;
854  const char *authenticationOptions() const;
859  int numStartAttempts() const;
865  size_t maxEventQueueSize() const;
871  float slowConsumerWarningHiWaterMark() const;
877  float slowConsumerWarningLoWaterMark() const;
883  int defaultKeepAliveInactivityTime() const;
895  bool keepAliveEnabled() const;
908  int serviceCheckTimeout() const;
914  int serviceDownloadTimeout() const;
920  int flushPublishedEventsTimeout() const;
926  bool bandwidthSaveModeDisabled() const;
932  std::string applicationIdentityKey();
938  std::string sessionName();
943  std::ostream& print(std::ostream& stream,
944  int indentLevel = 0,
945  int spacesPerLevel = 4) const;
958 };
959 
963 // FREE OPERATORS
964 std::ostream& operator<<(
965  std::ostream& stream, const SessionOptions& sessionOptions);
978 // ============================================================================
979 // INLINE FUNCTION DEFINITIONS
980 // ============================================================================
981 
982 // --------------------
983 // class SessionOptions
984 // --------------------
986 {
987  d_handle_p = blpapi_SessionOptions_create();
988 #if BLPAPI_COMPAT_33X
991 #endif
992 }
993 
995 {
996  d_handle_p = blpapi_SessionOptions_duplicate(options.handle());
997 }
998 
1000 {
1001  blpapi_SessionOptions_destroy(d_handle_p);
1002 }
1003 
1005 {
1006  blpapi_SessionOptions_copy(this->handle(), rhs.handle());
1007  return *this;
1008 }
1009 
1010 inline void SessionOptions::setServerHost(const char *newServerHost)
1011 {
1012  blpapi_SessionOptions_setServerHost(d_handle_p, newServerHost);
1013 }
1014 
1015 inline void SessionOptions::setServerPort(unsigned short newServerPort)
1016 {
1017  blpapi_SessionOptions_setServerPort(d_handle_p, newServerPort);
1018 }
1019 
1021  const char *serverHost, unsigned short serverPort, size_t index)
1022 {
1024  d_handle_p, serverHost, serverPort, index);
1025 }
1026 
1027 inline int SessionOptions::setServerAddress(const char *serverHost,
1028  unsigned short serverPort,
1029  const Socks5Config& socks5Config,
1030  size_t index)
1031 {
1033  d_handle_p, serverHost, serverPort, socks5Config.impl(), index);
1034 }
1035 
1036 inline int SessionOptions::removeServerAddress(size_t index)
1037 {
1038  return blpapi_SessionOptions_removeServerAddress(d_handle_p, index);
1039 }
1040 
1041 inline void SessionOptions::setConnectTimeout(unsigned int timeoutMilliSeconds)
1042 {
1044  d_handle_p, timeoutMilliSeconds));
1045 }
1046 
1047 inline void SessionOptions::setDefaultServices(const char *newDefaultServices)
1048 {
1049  blpapi_SessionOptions_setDefaultServices(d_handle_p, newDefaultServices);
1050 }
1051 
1053  const char *serviceIdentifier)
1054 {
1056  d_handle_p, serviceIdentifier);
1057 }
1058 
1059 inline void SessionOptions::setDefaultTopicPrefix(const char *prefix)
1060 {
1061  blpapi_SessionOptions_setDefaultTopicPrefix(d_handle_p, prefix);
1062 }
1063 
1065  bool newAllowMultipleCorrelatorsPerMsg)
1066 {
1068  d_handle_p, newAllowMultipleCorrelatorsPerMsg);
1069 }
1070 
1071 inline void SessionOptions::setClientMode(int newClientMode)
1072 {
1073 #if BLPAPI_COMPAT_33X
1074  newClientMode |= BLPAPI_CLIENTMODE_COMPAT_33X;
1075 #endif
1076 
1077  blpapi_SessionOptions_setClientMode(d_handle_p, newClientMode);
1078 }
1079 
1080 inline void SessionOptions::setMaxPendingRequests(int newMaxPendingRequests)
1081 {
1083  d_handle_p, newMaxPendingRequests);
1084 }
1085 
1087 {
1089  d_handle_p, autoRestart ? 1 : 0);
1090 }
1091 
1093  const AuthOptions& authOptions, const CorrelationId& cid)
1094 {
1095  blpapi_CorrelationId_t cidHandle = cid.impl();
1096 
1099  d_handle_p, authOptions.handle(), &cidHandle));
1100 
1101  return CorrelationId(cidHandle);
1102 }
1103 
1104 inline void SessionOptions::setAuthenticationOptions(const char *authOptions)
1105 {
1106  blpapi_SessionOptions_setAuthenticationOptions(d_handle_p, authOptions);
1107 }
1108 
1109 inline void SessionOptions::setNumStartAttempts(int newNumStartAttempts)
1110 {
1111  blpapi_SessionOptions_setNumStartAttempts(d_handle_p, newNumStartAttempts);
1112 }
1113 
1114 inline void SessionOptions::setMaxEventQueueSize(size_t eventQueueSize)
1115 {
1117  d_handle_p, eventQueueSize);
1118 }
1119 
1121  float hiWaterMark)
1122 {
1125  d_handle_p, hiWaterMark));
1126 }
1127 
1129  float loWaterMark)
1130 {
1133  d_handle_p, loWaterMark));
1134 }
1135 
1137  int inactivityTime)
1138 {
1141  d_handle_p, inactivityTime));
1142 }
1143 
1145  int responseTimeout)
1146 {
1149  d_handle_p, responseTimeout));
1150 }
1151 
1152 inline void SessionOptions::setKeepAliveEnabled(bool isEnabled)
1153 {
1155  d_handle_p, isEnabled));
1156 }
1157 
1159  bool shouldRecrod)
1160 {
1162  d_handle_p, shouldRecrod);
1163 }
1164 
1165 inline void SessionOptions::setServiceCheckTimeout(int timeoutMsecs)
1166 {
1169  d_handle_p, timeoutMsecs));
1170 }
1171 
1172 inline void SessionOptions::setServiceDownloadTimeout(int timeoutMsecs)
1173 {
1176  d_handle_p, timeoutMsecs));
1177 }
1178 
1179 inline void SessionOptions::setTlsOptions(const TlsOptions& tlsOptions)
1180 {
1182  (d_handle_p, tlsOptions.handle());
1183 }
1184 
1186 {
1189  d_handle_p, timeoutMsecs));
1190 }
1191 
1193 {
1196  d_handle_p, isDisabled));
1197 }
1198 
1199 inline const char *SessionOptions::serverHost() const
1200 {
1201  return blpapi_SessionOptions_serverHost(d_handle_p);
1202 }
1203 
1204 inline unsigned short SessionOptions::serverPort() const
1205 {
1206  return static_cast<unsigned short>(
1207  blpapi_SessionOptions_serverPort(d_handle_p));
1208 }
1209 
1211 {
1212  return static_cast<size_t>(
1214 }
1215 
1216 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1217  unsigned short *serverPortOut,
1218  size_t index) const
1219 {
1221  d_handle_p, serverHostOut, serverPortOut, index);
1222 }
1223 
1224 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1225  unsigned short *serverPortOut,
1226  Socks5Config *socksConfig,
1227  size_t index) const
1228 {
1229  const char *socks5ConfigHost = 0;
1230  unsigned short socks5ConfigPort = 0;
1233  serverHostOut,
1234  serverPortOut,
1235  &socks5ConfigHost,
1236  &socks5ConfigPort,
1237  index));
1238 
1239  if (socks5ConfigHost) {
1240  *socksConfig = Socks5Config(socks5ConfigHost, socks5ConfigPort);
1241  }
1242 
1243  return 0;
1244 }
1245 
1246 inline unsigned int SessionOptions::connectTimeout() const
1247 {
1248  return blpapi_SessionOptions_connectTimeout(d_handle_p);
1249 }
1250 
1251 inline const char *SessionOptions::defaultServices() const
1252 {
1253  return blpapi_SessionOptions_defaultServices(d_handle_p);
1254 }
1255 
1257 {
1259 }
1260 
1261 inline const char *SessionOptions::defaultTopicPrefix() const
1262 {
1263  return blpapi_SessionOptions_defaultTopicPrefix(d_handle_p);
1264 }
1265 
1267 {
1269  ? true
1270  : false;
1271 }
1272 
1273 inline int SessionOptions::clientMode() const
1274 {
1275  return blpapi_SessionOptions_clientMode(d_handle_p);
1276 }
1277 
1279 {
1280  return blpapi_SessionOptions_maxPendingRequests(d_handle_p);
1281 }
1282 
1284 {
1285  return blpapi_SessionOptions_autoRestartOnDisconnection(d_handle_p) != 0;
1286 }
1287 
1288 inline const char *SessionOptions::authenticationOptions() const
1289 {
1291 }
1292 
1294 {
1295  return blpapi_SessionOptions_numStartAttempts(d_handle_p);
1296 }
1297 
1299 {
1301 }
1302 
1304 {
1306 }
1307 
1309 {
1311 }
1312 
1314 {
1316  d_handle_p);
1317 }
1318 
1320 {
1322  d_handle_p);
1323 }
1324 
1326 {
1327  return BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(d_handle_p) != 0
1328  ? true
1329  : false;
1330 }
1331 
1333 {
1335  d_handle_p)
1336  ? true
1337  : false;
1338 }
1339 
1341 {
1343 }
1344 
1346 {
1348  d_handle_p);
1349 }
1350 
1352 {
1354  d_handle_p);
1355 }
1356 
1358 {
1360  != 0
1361  ? true
1362  : false;
1363 }
1364 
1366  const std::string& applicationIdentityKey)
1367 {
1370  applicationIdentityKey.data(),
1371  static_cast<int>(applicationIdentityKey.size())));
1372 }
1373 
1375 {
1376  const char *apik;
1377  size_t size;
1380  &apik, &size, d_handle_p));
1381  return std::string(apik, size);
1382 }
1383 
1384 inline void SessionOptions::setSessionName(const std::string& sessionName)
1385 {
1388  d_handle_p, sessionName.data(), sessionName.size()));
1389 }
1390 
1391 inline std::string SessionOptions::sessionName()
1392 {
1393  const char *sessionName = nullptr;
1394  size_t size = 0;
1396  &sessionName, &size, d_handle_p));
1397  return std::string(sessionName, size);
1398 }
1399 
1401 {
1402  return d_handle_p;
1403 }
1404 
1405 inline std::ostream& SessionOptions::print(
1406  std::ostream& stream, int indentLevel, int spacesPerLevel) const
1407 {
1410  (d_handle_p,
1412  &stream,
1413  indentLevel,
1414  spacesPerLevel);
1415  }
1416  return stream;
1417 }
1418 
1419 inline std::ostream& operator<<(
1420  std::ostream& stream, const SessionOptions& sessionOptions)
1421 {
1422  return sessionOptions.print(stream, 0, -1);
1423 }
1424 
1425 } // close namespace blpapi
1426 } // close namespace BloombergLP
1427 
1428 #endif // #ifdef __cplusplus
1429 #endif // #ifndef INCLUDED_BLPAPI_SESSIONOPTIONS
#define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVERESPONSETIMEOUT(a1)
Definition: blpapi_call.h:380
int blpapi_SessionOptions_print(blpapi_SessionOptions_t *parameters, blpapi_StreamWriter_t streamWriter, void *stream, int indentLevel, int spacesPerLevel)
const char * defaultTopicPrefix() const
Definition: blpapi_sessionoptions.h:1261
int numStartAttempts() const
Definition: blpapi_sessionoptions.h:1293
void setBandwidthSaveModeDisabled(bool isDisabled)
Definition: blpapi_sessionoptions.h:1192
std::ostream & print(std::ostream &stream, int indentLevel=0, int spacesPerLevel=4) const
Definition: blpapi_sessionoptions.h:1405
#define BLPAPI_CALL_SESSIONOPTIONS_SETBANDWIDTHSAVEMODEDISABLED(a1, a2)
Definition: blpapi_call.h:390
#define BLPAPI_CLIENTMODE_COMPAT_33X
Definition: blpapi_defs.h:112
int setServerAddress(const char *serverHost, unsigned short serverPort, size_t index)
Definition: blpapi_sessionoptions.h:1020
unsigned int blpapi_SessionOptions_serverPort(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_autoRestartOnDisconnection(blpapi_SessionOptions_t *parameters)
void setConnectTimeout(unsigned int timeoutMilliSeconds)
Definition: blpapi_sessionoptions.h:1041
void setAuthenticationOptions(const char *authOptions)
Definition: blpapi_sessionoptions.h:1104
const char * blpapi_SessionOptions_serverHost(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_flushPublishedEventsTimeout(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_setServiceDownloadTimeout(blpapi_SessionOptions_t *paramaters, int timeoutMsecs)
const char * blpapi_SessionOptions_authenticationOptions(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_setSlowConsumerWarningHiWaterMark(blpapi_SessionOptions_t *parameters, float hiWaterMark)
int clientMode() const
Definition: blpapi_sessionoptions.h:1273
void blpapi_SessionOptions_setAutoRestartOnDisconnection(blpapi_SessionOptions_t *parameters, int autoRestart)
float slowConsumerWarningLoWaterMark() const
Definition: blpapi_sessionoptions.h:1308
#define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVEINACTIVITYTIME(a1, a2)
Definition: blpapi_call.h:384
int blpapi_SessionOptions_setSessionIdentityOptions(blpapi_SessionOptions_t *parameters, const blpapi_AuthOptions_t *authOptions, blpapi_CorrelationId_t *cid)
#define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERHIWATERMARK(a1, a2)
Definition: blpapi_call.h:364
void setSlowConsumerWarningHiWaterMark(float hiWaterMark)
Definition: blpapi_sessionoptions.h:1120
SessionOptions()
Definition: blpapi_sessionoptions.h:985
#define BLPAPI_CLIENTMODE_AUTO
Definition: blpapi_defs.h:109
std::string applicationIdentityKey()
Definition: blpapi_sessionoptions.h:1374
int blpapi_SessionOptions_maxPendingRequests(blpapi_SessionOptions_t *parameters)
Common definitions used by the library.
void setFlushPublishedEventsTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1185
Definition: blpapi_tlsoptions.h:188
int blpapi_SessionOptions_sessionName(const char **sessionName, size_t *size, blpapi_SessionOptions_t *parameters)
void blpapi_SessionOptions_setNumStartAttempts(blpapi_SessionOptions_t *parameters, int numStartAttempts)
int blpapi_SessionOptions_setServerAddress(blpapi_SessionOptions_t *parameters, const char *serverHost, unsigned short serverPort, size_t index)
const char * blpapi_SessionOptions_defaultServices(blpapi_SessionOptions_t *parameters)
blpapi_TlsOptions_t * handle() const
Definition: blpapi_tlsoptions.h:344
void setTlsOptions(const TlsOptions &tlsOptions)
Definition: blpapi_sessionoptions.h:1179
Definition: blpapi_abstractsession.h:220
Always connect to the server API.
Definition: blpapi_sessionoptions.h:447
const char * serverHost() const
Definition: blpapi_sessionoptions.h:1199
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
void setRecordSubscriptionDataReceiveTimes(bool shouldRecord)
Definition: blpapi_sessionoptions.h:1158
int blpapi_SessionOptions_setKeepAliveEnabled(blpapi_SessionOptions_t *parameters, int isEnabled)
struct blpapi_Socks5Config blpapi_Socks5Config_t
Definition: blpapi_types.h:175
blpapi_SessionOptions_t * handle() const
Definition: blpapi_sessionoptions.h:1400
int blpapi_SessionOptions_setServerPort(blpapi_SessionOptions_t *parameters, unsigned short serverPort)
int blpapi_SessionOptions_setDefaultKeepAliveInactivityTime(blpapi_SessionOptions_t *parameters, int inactivityMsecs)
int flushPublishedEventsTimeout() const
Definition: blpapi_sessionoptions.h:1351
const char * defaultSubscriptionService() const
Definition: blpapi_sessionoptions.h:1256
~SessionOptions()
Definition: blpapi_sessionoptions.h:999
int blpapi_SessionOptions_numStartAttempts(blpapi_SessionOptions_t *parameters)
void setAutoRestartOnDisconnection(bool autoRestart)
Definition: blpapi_sessionoptions.h:1086
Definition: blpapi_socks5config.h:112
Definition: blpapi_authoptions.h:194
blpapi_SessionOptions_t * blpapi_SessionOptions_create(void)
const char * blpapi_SessionOptions_defaultSubscriptionService(blpapi_SessionOptions_t *parameters)
#define BLPAPI_CALL_SESSIONOPTIONS_DEFAULTKEEPALIVEINACTIVITYTIME(a1)
Definition: blpapi_call.h:378
std::string sessionName()
Definition: blpapi_sessionoptions.h:1391
#define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERHIWATERMARK(a1)
Definition: blpapi_call.h:373
int blpapi_SessionOptions_setFlushPublishedEventsTimeout(blpapi_SessionOptions_t *paramaters, int timeoutMsecs)
void setServerPort(unsigned short port)
Definition: blpapi_sessionoptions.h:1015
size_t numServerAddresses() const
Definition: blpapi_sessionoptions.h:1210
#define BLPAPI_CALL_SESSIONOPTIONS_MAXEVENTQUEUESIZE(a1)
Definition: blpapi_call.h:371
void blpapi_SessionOptions_destroy(blpapi_SessionOptions_t *parameters)
void setClientMode(int clientMode)
Definition: blpapi_sessionoptions.h:1071
#define BLPAPI_CLIENTMODE_DAPI
Definition: blpapi_defs.h:110
void setServiceCheckTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1165
bool keepAliveEnabled() const
Definition: blpapi_sessionoptions.h:1325
int serviceCheckTimeout() const
Definition: blpapi_sessionoptions.h:1340
int removeServerAddress(size_t index)
Definition: blpapi_sessionoptions.h:1036
int(* blpapi_StreamWriter_t)(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:53
int blpapi_SessionOptions_serviceCheckTimeout(blpapi_SessionOptions_t *parameters)
void blpapi_SessionOptions_copy(blpapi_SessionOptions_t *lhs, const blpapi_SessionOptions_t *rhs)
#define BLPAPI_CALL_SESSIONOPTION_RECORDSUBSCRIPTIONDATARECEIVETIMES(a1)
Definition: blpapi_call.h:458
blpapi_AuthOptions_t * handle() const
Definition: blpapi_authoptions.h:491
void setMaxPendingRequests(int maxPendingRequests)
Definition: blpapi_sessionoptions.h:1080
#define BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(a1)
Definition: blpapi_call.h:382
#define BLPAPI_CALL_SESSIONOPTIONS_SLOWCONSUMERLOWATERMARK(a1)
Definition: blpapi_call.h:375
void setServerHost(const char *host)
Definition: blpapi_sessionoptions.h:1010
int blpapi_SessionOptions_autoRestart(blpapi_SessionOptions_t *parameters)
#define BLPAPI_CALL_SESSIONOPTION_SETRECORDSUBSCRIPTIONDATARECEIVETIMES( a1, a2)
Definition: blpapi_call.h:455
void setAllowMultipleCorrelatorsPerMsg(bool allowMultipleCorrelatorsPerMsg)
Definition: blpapi_sessionoptions.h:1064
int blpapi_SessionOptions_clientMode(blpapi_SessionOptions_t *parameters)
Provide a key to identify individual subscriptions or requests.
bool autoRestartOnDisconnection() const
Definition: blpapi_sessionoptions.h:1283
Provides configuration settings for authorization.
bool bandwidthSaveModeDisabled() const
Definition: blpapi_sessionoptions.h:1357
void blpapi_SessionOptions_setTlsOptions(blpapi_SessionOptions_t *paramaters, const blpapi_TlsOptions_t *tlsOptions)
#define BLPAPI_CALL_SESSIONOPTIONS_SETSLOWCONSUMERLOWATERMARK(a1, a2)
Definition: blpapi_call.h:366
int blpapi_SessionOptions_defaultKeepAliveInactivityTime(blpapi_SessionOptions_t *parameters)
void setNumStartAttempts(int numStartAttempts)
Definition: blpapi_sessionoptions.h:1109
static void throwOnError(int errorCode)
Definition: blpapi_exception.h:526
unsigned int blpapi_SessionOptions_connectTimeout(blpapi_SessionOptions_t *parameters)
int defaultKeepAliveResponseTimeout() const
Definition: blpapi_sessionoptions.h:1319
void setDefaultKeepAliveResponseTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1144
int blpapi_SessionOptions_defaultKeepAliveResponseTimeout(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_numServerAddresses(blpapi_SessionOptions_t *parameters)
ClientMode
Definition: blpapi_sessionoptions.h:440
int blpapi_SessionOptions_removeServerAddress(blpapi_SessionOptions_t *parameters, size_t index)
struct blpapi_AuthOptions blpapi_AuthOptions_t
Definition: blpapi_types.h:203
void setServiceDownloadTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1172
size_t blpapi_SessionOptions_maxEventQueueSize(blpapi_SessionOptions_t *parameters)
void setDefaultTopicPrefix(const char *prefix)
Definition: blpapi_sessionoptions.h:1059
int blpapi_SessionOptions_setApplicationIdentityKey(blpapi_SessionOptions_t *parameters, const char *applicationIdentityKey, size_t size)
void setDefaultKeepAliveInactivityTime(int inactivityMsecs)
Definition: blpapi_sessionoptions.h:1136
#define BLPAPI_CALL_SESSIONOPTIONS_SETDEFAULTKEEPALIVERESPONSETIMEOUT(a1, a2)
Definition: blpapi_call.h:386
std::ostream & operator<<(std::ostream &os, const CorrelationId &correlator)
Definition: blpapi_correlationid.h:592
int blpapi_SessionOptions_setServerAddressWithProxy(blpapi_SessionOptions_t *parameters, const char *serverHost, unsigned short serverPort, const blpapi_Socks5Config_t *socks5Config, size_t index)
bool recordSubscriptionDataReceiveTimes() const
Definition: blpapi_sessionoptions.h:1332
Definition: blpapi_correlationid.h:201
Provide description of Socks5 proxy.
void setKeepAliveEnabled(bool isEnabled)
Definition: blpapi_sessionoptions.h:1152
int serviceDownloadTimeout() const
Definition: blpapi_sessionoptions.h:1345
unsigned short serverPort() const
Definition: blpapi_sessionoptions.h:1204
void blpapi_SessionOptions_setMaxEventQueueSize(blpapi_SessionOptions_t *parameters, size_t maxEventQueueSize)
void blpapi_SessionOptions_setAutoRestart(blpapi_SessionOptions_t *parameters, int autoRestart)
float slowConsumerWarningHiWaterMark() const
Definition: blpapi_sessionoptions.h:1303
SessionOptions & operator=(const SessionOptions &rhs)
Definition: blpapi_sessionoptions.h:1004
struct blpapi_TlsOptions blpapi_TlsOptions_t
Definition: blpapi_types.h:178
CorrelationId setSessionIdentityOptions(const AuthOptions &authOptions, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_sessionoptions.h:1092
int defaultKeepAliveInactivityTime() const
Definition: blpapi_sessionoptions.h:1313
A signature for callback on print and default C++ implementation.
int blpapi_SessionOptions_setDefaultServices(blpapi_SessionOptions_t *parameters, const char *defaultServices)
void blpapi_SessionOptions_setMaxPendingRequests(blpapi_SessionOptions_t *parameters, int maxPendingRequests)
Always connect to the desktop API.
Definition: blpapi_sessionoptions.h:444
const char * blpapi_SessionOptions_defaultTopicPrefix(blpapi_SessionOptions_t *parameters)
int maxPendingRequests() const
Definition: blpapi_sessionoptions.h:1278
blpapi_SessionOptions_t * blpapi_SessionOptions_duplicate(const blpapi_SessionOptions_t *parameters)
size_t maxEventQueueSize() const
Definition: blpapi_sessionoptions.h:1298
int blpapi_SessionOptions_getServerAddress(blpapi_SessionOptions_t *parameters, const char **serverHost, unsigned short *serverPort, size_t index)
int blpapi_SessionOptions_recordSubscriptionDataReceiveTimes(blpapi_SessionOptions_t *parameters)
Maintain client credentials and trust material.
#define BLPAPI_CALL_SESSIONOPTIONS_BANDWIDTHSAVEMODEDISABLED(a1)
Definition: blpapi_call.h:392
int blpapi_SessionOptions_serviceDownloadTimeout(blpapi_SessionOptions_t *parameters)
void blpapi_SessionOptions_setAllowMultipleCorrelatorsPerMsg(blpapi_SessionOptions_t *parameters, int allowMultipleCorrelatorsPerMsg)
const char * authenticationOptions() const
Definition: blpapi_sessionoptions.h:1288
int blpapi_SessionOptions_setSlowConsumerWarningLoWaterMark(blpapi_SessionOptions_t *parameters, float loWaterMark)
Defines Exceptions that can be thrown by the blpapi library.
void setDefaultSubscriptionService(const char *serviceIdentifier)
Definition: blpapi_sessionoptions.h:1052
int blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout(blpapi_SessionOptions_t *parameters, int timeoutMsecs)
const char * defaultServices() const
Definition: blpapi_sessionoptions.h:1251
void blpapi_SessionOptions_setAuthenticationOptions(blpapi_SessionOptions_t *parameters, const char *authOptions)
float blpapi_SessionOptions_slowConsumerWarningHiWaterMark(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_allowMultipleCorrelatorsPerMsg(blpapi_SessionOptions_t *parameters)
int blpapi_SessionOptions_setConnectTimeout(blpapi_SessionOptions_t *parameters, unsigned int timeoutInMilliseconds)
void setSessionName(const std::string &sessionName)
Definition: blpapi_sessionoptions.h:1384
void setSlowConsumerWarningLoWaterMark(float loWaterMark)
Definition: blpapi_sessionoptions.h:1128
static int writeToStream(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:93
int getServerAddress(const char **serverHost, unsigned short *serverPort, size_t index) const
Definition: blpapi_sessionoptions.h:1216
void blpapi_SessionOptions_setClientMode(blpapi_SessionOptions_t *parameters, int clientMode)
int blpapi_SessionOptions_getServerAddressWithProxy(blpapi_SessionOptions_t *parameters, const char **serverHost, unsigned short *serverPort, const char **socks5Host, unsigned short *sock5Port, size_t index)
bool allowMultipleCorrelatorsPerMsg() const
Definition: blpapi_sessionoptions.h:1266
#define BLPAPI_CALL_SESSIONOPTIONS_SETKEEPALIVEENABLED(a1, a2)
Definition: blpapi_call.h:388
int blpapi_SessionOptions_applicationIdentityKey(const char **applicationIdentityKey, size_t *size, blpapi_SessionOptions_t *parameters)
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
Automatic (desktop if available otherwise server)
Definition: blpapi_sessionoptions.h:441
#define BLPAPI_CALL_AVAILABLE(FUNCNAME)
Definition: blpapi_call.h:352
struct blpapi_SessionOptions blpapi_SessionOptions_t
Definition: blpapi_types.h:172
Provide functions for dispatchtbl.
void setDefaultServices(const char *defaultServices)
Definition: blpapi_sessionoptions.h:1047
void blpapi_SessionOptions_setDefaultTopicPrefix(blpapi_SessionOptions_t *parameters, const char *prefix)
int blpapi_SessionOptions_setSessionName(blpapi_SessionOptions_t *parameters, const char *sessionName, size_t size)
int blpapi_SessionOptions_bandwidthSaveModeDisabled(blpapi_SessionOptions_t *parameters)
Provide BLPAPI types.
#define BLPAPI_CLIENTMODE_SAPI
Definition: blpapi_defs.h:111
Provide a collection of errors that library can return.
int blpapi_SessionOptions_setBandwidthSaveModeDisabled(blpapi_SessionOptions_t *parameters, int disableBandwidthSaveMode)
float blpapi_SessionOptions_slowConsumerWarningLoWaterMark(blpapi_SessionOptions_t *parameters)
unsigned int connectTimeout() const
Definition: blpapi_sessionoptions.h:1246
Definition: blpapi_sessionoptions.h:431
int blpapi_SessionOptions_setDefaultSubscriptionService(blpapi_SessionOptions_t *parameters, const char *serviceIdentifier)
void blpapi_SessionOptions_setRecordSubscriptionDataReceiveTimes(blpapi_SessionOptions_t *parameters, int shouldRecord)
int blpapi_SessionOptions_setServerHost(blpapi_SessionOptions_t *parameters, const char *serverHost)
void setMaxEventQueueSize(size_t eventQueueSize)
Definition: blpapi_sessionoptions.h:1114
void setApplicationIdentityKey(const std::string &applicationIdentityKey)
Definition: blpapi_sessionoptions.h:1365
int blpapi_SessionOptions_setServiceCheckTimeout(blpapi_SessionOptions_t *paramaters, int timeoutMsecs)
int blpapi_SessionOptions_keepAliveEnabled(blpapi_SessionOptions_t *parameters)
#define BLPAPI_CALL_SESSIONOPTIONS_SETMAXEVENTQUEUESIZE(a1, a2)
Definition: blpapi_call.h:362