BLPAPI C++  3.23.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);
758  // ACCESSORS
759  const char *serverHost() const;
766  unsigned short serverPort() const;
773  size_t numServerAddresses() const;
778  int getServerAddress(const char **serverHost,
779  unsigned short *serverPort,
780  size_t index) const;
787  int getServerAddress(const char **serverHost,
788  unsigned short *serverPort,
789  Socks5Config *socksConfig,
790  size_t index) const;
798  unsigned int connectTimeout() const;
804  const char *defaultServices() const;
809  const char *defaultSubscriptionService() const;
817  const char *defaultTopicPrefix() const;
824  bool allowMultipleCorrelatorsPerMsg() const;
830  int clientMode() const;
836  int maxPendingRequests() const;
847  bool autoRestartOnDisconnection() const;
852  const char *authenticationOptions() const;
857  int numStartAttempts() const;
863  size_t maxEventQueueSize() const;
869  float slowConsumerWarningHiWaterMark() const;
875  float slowConsumerWarningLoWaterMark() const;
881  int defaultKeepAliveInactivityTime() const;
893  bool keepAliveEnabled() const;
906  int serviceCheckTimeout() const;
912  int serviceDownloadTimeout() const;
918  int flushPublishedEventsTimeout() const;
924  bool bandwidthSaveModeDisabled() const;
930  std::string applicationIdentityKey();
936  std::string sessionName();
941  std::ostream& print(std::ostream& stream,
942  int indentLevel = 0,
943  int spacesPerLevel = 4) const;
956 };
957 
961 // FREE OPERATORS
962 std::ostream& operator<<(
963  std::ostream& stream, const SessionOptions& sessionOptions);
976 // ============================================================================
977 // INLINE FUNCTION DEFINITIONS
978 // ============================================================================
979 
980 // --------------------
981 // class SessionOptions
982 // --------------------
984 {
985  d_handle_p = blpapi_SessionOptions_create();
986 #if BLPAPI_COMPAT_33X
989 #endif
990 }
991 
993 {
994  d_handle_p = blpapi_SessionOptions_duplicate(options.handle());
995 }
996 
998 {
999  blpapi_SessionOptions_destroy(d_handle_p);
1000 }
1001 
1003 {
1004  blpapi_SessionOptions_copy(this->handle(), rhs.handle());
1005  return *this;
1006 }
1007 
1008 inline void SessionOptions::setServerHost(const char *newServerHost)
1009 {
1010  blpapi_SessionOptions_setServerHost(d_handle_p, newServerHost);
1011 }
1012 
1013 inline void SessionOptions::setServerPort(unsigned short newServerPort)
1014 {
1015  blpapi_SessionOptions_setServerPort(d_handle_p, newServerPort);
1016 }
1017 
1019  const char *serverHost, unsigned short serverPort, size_t index)
1020 {
1022  d_handle_p, serverHost, serverPort, index);
1023 }
1024 
1025 inline int SessionOptions::setServerAddress(const char *serverHost,
1026  unsigned short serverPort,
1027  const Socks5Config& socks5Config,
1028  size_t index)
1029 {
1031  d_handle_p, serverHost, serverPort, socks5Config.impl(), index);
1032 }
1033 
1034 inline int SessionOptions::removeServerAddress(size_t index)
1035 {
1036  return blpapi_SessionOptions_removeServerAddress(d_handle_p, index);
1037 }
1038 
1039 inline void SessionOptions::setConnectTimeout(unsigned int timeoutMilliSeconds)
1040 {
1042  d_handle_p, timeoutMilliSeconds));
1043 }
1044 
1045 inline void SessionOptions::setDefaultServices(const char *newDefaultServices)
1046 {
1047  blpapi_SessionOptions_setDefaultServices(d_handle_p, newDefaultServices);
1048 }
1049 
1051  const char *serviceIdentifier)
1052 {
1054  d_handle_p, serviceIdentifier);
1055 }
1056 
1057 inline void SessionOptions::setDefaultTopicPrefix(const char *prefix)
1058 {
1059  blpapi_SessionOptions_setDefaultTopicPrefix(d_handle_p, prefix);
1060 }
1061 
1063  bool newAllowMultipleCorrelatorsPerMsg)
1064 {
1066  d_handle_p, newAllowMultipleCorrelatorsPerMsg);
1067 }
1068 
1069 inline void SessionOptions::setClientMode(int newClientMode)
1070 {
1071 #if BLPAPI_COMPAT_33X
1072  newClientMode |= BLPAPI_CLIENTMODE_COMPAT_33X;
1073 #endif
1074 
1075  blpapi_SessionOptions_setClientMode(d_handle_p, newClientMode);
1076 }
1077 
1078 inline void SessionOptions::setMaxPendingRequests(int newMaxPendingRequests)
1079 {
1081  d_handle_p, newMaxPendingRequests);
1082 }
1083 
1085 {
1087  d_handle_p, autoRestart ? 1 : 0);
1088 }
1089 
1091  const AuthOptions& authOptions, const CorrelationId& cid)
1092 {
1093  blpapi_CorrelationId_t cidHandle = cid.impl();
1094 
1097  d_handle_p, authOptions.handle(), &cidHandle));
1098 
1099  return cidHandle;
1100 }
1101 
1102 inline void SessionOptions::setAuthenticationOptions(const char *authOptions)
1103 {
1104  blpapi_SessionOptions_setAuthenticationOptions(d_handle_p, authOptions);
1105 }
1106 
1107 inline void SessionOptions::setNumStartAttempts(int newNumStartAttempts)
1108 {
1109  blpapi_SessionOptions_setNumStartAttempts(d_handle_p, newNumStartAttempts);
1110 }
1111 
1112 inline void SessionOptions::setMaxEventQueueSize(size_t eventQueueSize)
1113 {
1115  d_handle_p, eventQueueSize);
1116 }
1117 
1119  float hiWaterMark)
1120 {
1123  d_handle_p, hiWaterMark));
1124 }
1125 
1127  float loWaterMark)
1128 {
1131  d_handle_p, loWaterMark));
1132 }
1133 
1135  int inactivityTime)
1136 {
1139  d_handle_p, inactivityTime));
1140 }
1141 
1143  int responseTimeout)
1144 {
1147  d_handle_p, responseTimeout));
1148 }
1149 
1150 inline void SessionOptions::setKeepAliveEnabled(bool isEnabled)
1151 {
1153  d_handle_p, isEnabled));
1154 }
1155 
1157  bool shouldRecrod)
1158 {
1160  d_handle_p, shouldRecrod);
1161 }
1162 
1163 inline void SessionOptions::setServiceCheckTimeout(int timeoutMsecs)
1164 {
1167  d_handle_p, timeoutMsecs));
1168 }
1169 
1170 inline void SessionOptions::setServiceDownloadTimeout(int timeoutMsecs)
1171 {
1174  d_handle_p, timeoutMsecs));
1175 }
1176 
1177 inline void SessionOptions::setTlsOptions(const TlsOptions& tlsOptions)
1178 {
1180  (d_handle_p, tlsOptions.handle());
1181 }
1182 
1184 {
1187  d_handle_p, timeoutMsecs));
1188 }
1189 
1191 {
1194  d_handle_p, isDisabled));
1195 }
1196 
1197 inline const char *SessionOptions::serverHost() const
1198 {
1199  return blpapi_SessionOptions_serverHost(d_handle_p);
1200 }
1201 
1202 inline unsigned short SessionOptions::serverPort() const
1203 {
1204  return static_cast<unsigned short>(
1205  blpapi_SessionOptions_serverPort(d_handle_p));
1206 }
1207 
1209 {
1210  return static_cast<size_t>(
1212 }
1213 
1214 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1215  unsigned short *serverPortOut,
1216  size_t index) const
1217 {
1219  d_handle_p, serverHostOut, serverPortOut, index);
1220 }
1221 
1222 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1223  unsigned short *serverPortOut,
1224  Socks5Config *socksConfig,
1225  size_t index) const
1226 {
1227  const char *socks5ConfigHost = 0;
1228  unsigned short socks5ConfigPort = 0;
1231  serverHostOut,
1232  serverPortOut,
1233  &socks5ConfigHost,
1234  &socks5ConfigPort,
1235  index));
1236 
1237  if (socks5ConfigHost) {
1238  *socksConfig = Socks5Config(socks5ConfigHost, socks5ConfigPort);
1239  }
1240 
1241  return 0;
1242 }
1243 
1244 inline unsigned int SessionOptions::connectTimeout() const
1245 {
1246  return blpapi_SessionOptions_connectTimeout(d_handle_p);
1247 }
1248 
1249 inline const char *SessionOptions::defaultServices() const
1250 {
1251  return blpapi_SessionOptions_defaultServices(d_handle_p);
1252 }
1253 
1255 {
1257 }
1258 
1259 inline const char *SessionOptions::defaultTopicPrefix() const
1260 {
1261  return blpapi_SessionOptions_defaultTopicPrefix(d_handle_p);
1262 }
1263 
1265 {
1267  ? true
1268  : false;
1269 }
1270 
1271 inline int SessionOptions::clientMode() const
1272 {
1273  return blpapi_SessionOptions_clientMode(d_handle_p);
1274 }
1275 
1277 {
1278  return blpapi_SessionOptions_maxPendingRequests(d_handle_p);
1279 }
1280 
1282 {
1283  return blpapi_SessionOptions_autoRestartOnDisconnection(d_handle_p) != 0;
1284 }
1285 
1286 inline const char *SessionOptions::authenticationOptions() const
1287 {
1289 }
1290 
1292 {
1293  return blpapi_SessionOptions_numStartAttempts(d_handle_p);
1294 }
1295 
1297 {
1299 }
1300 
1302 {
1304 }
1305 
1307 {
1309 }
1310 
1312 {
1314  d_handle_p);
1315 }
1316 
1318 {
1320  d_handle_p);
1321 }
1322 
1324 {
1325  return BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(d_handle_p) != 0
1326  ? true
1327  : false;
1328 }
1329 
1331 {
1333  d_handle_p)
1334  ? true
1335  : false;
1336 }
1337 
1339 {
1341 }
1342 
1344 {
1346  d_handle_p);
1347 }
1348 
1350 {
1352  d_handle_p);
1353 }
1354 
1356 {
1358  != 0
1359  ? true
1360  : false;
1361 }
1362 
1364  const std::string& applicationIdentityKey)
1365 {
1368  applicationIdentityKey.data(),
1369  static_cast<int>(applicationIdentityKey.size())));
1370 }
1371 
1373 {
1374  const char *apik;
1375  size_t size;
1378  &apik, &size, d_handle_p));
1379  return std::string(apik, size);
1380 }
1381 
1382 inline void SessionOptions::setSessionName(const std::string& sessionName)
1383 {
1386  d_handle_p, sessionName.data(), sessionName.size()));
1387 }
1388 
1389 inline std::string SessionOptions::sessionName()
1390 {
1391  const char *sessionName = nullptr;
1392  size_t size = 0;
1394  &sessionName, &size, d_handle_p));
1395  return std::string(sessionName, size);
1396 }
1397 
1399 {
1400  return d_handle_p;
1401 }
1402 
1403 inline std::ostream& SessionOptions::print(
1404  std::ostream& stream, int indentLevel, int spacesPerLevel) const
1405 {
1408  (d_handle_p,
1410  &stream,
1411  indentLevel,
1412  spacesPerLevel);
1413  }
1414  return stream;
1415 }
1416 
1417 inline std::ostream& operator<<(
1418  std::ostream& stream, const SessionOptions& sessionOptions)
1419 {
1420  return sessionOptions.print(stream, 0, -1);
1421 }
1422 
1423 } // close namespace blpapi
1424 } // close namespace BloombergLP
1425 
1426 #endif // #ifdef __cplusplus
1427 #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:1259
int numStartAttempts() const
Definition: blpapi_sessionoptions.h:1291
void setBandwidthSaveModeDisabled(bool isDisabled)
Definition: blpapi_sessionoptions.h:1190
std::ostream & print(std::ostream &stream, int indentLevel=0, int spacesPerLevel=4) const
Definition: blpapi_sessionoptions.h:1403
#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:1018
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:1039
void setAuthenticationOptions(const char *authOptions)
Definition: blpapi_sessionoptions.h:1102
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:1271
void blpapi_SessionOptions_setAutoRestartOnDisconnection(blpapi_SessionOptions_t *parameters, int autoRestart)
float slowConsumerWarningLoWaterMark() const
Definition: blpapi_sessionoptions.h:1306
#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:1118
SessionOptions()
Definition: blpapi_sessionoptions.h:983
#define BLPAPI_CLIENTMODE_AUTO
Definition: blpapi_defs.h:109
std::string applicationIdentityKey()
Definition: blpapi_sessionoptions.h:1372
int blpapi_SessionOptions_maxPendingRequests(blpapi_SessionOptions_t *parameters)
Common definitions used by the library.
void setFlushPublishedEventsTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1183
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:1177
Definition: blpapi_abstractsession.h:220
Always connect to the server API.
Definition: blpapi_sessionoptions.h:447
const char * serverHost() const
Definition: blpapi_sessionoptions.h:1197
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
void setRecordSubscriptionDataReceiveTimes(bool shouldRecord)
Definition: blpapi_sessionoptions.h:1156
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:1398
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:1349
const char * defaultSubscriptionService() const
Definition: blpapi_sessionoptions.h:1254
~SessionOptions()
Definition: blpapi_sessionoptions.h:997
int blpapi_SessionOptions_numStartAttempts(blpapi_SessionOptions_t *parameters)
void setAutoRestartOnDisconnection(bool autoRestart)
Definition: blpapi_sessionoptions.h:1084
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:1389
#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:1013
size_t numServerAddresses() const
Definition: blpapi_sessionoptions.h:1208
#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:1069
#define BLPAPI_CLIENTMODE_DAPI
Definition: blpapi_defs.h:110
void setServiceCheckTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1163
bool keepAliveEnabled() const
Definition: blpapi_sessionoptions.h:1323
int serviceCheckTimeout() const
Definition: blpapi_sessionoptions.h:1338
int removeServerAddress(size_t index)
Definition: blpapi_sessionoptions.h:1034
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:1078
#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:1008
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:1062
int blpapi_SessionOptions_clientMode(blpapi_SessionOptions_t *parameters)
Provide a key to identify individual subscriptions or requests.
bool autoRestartOnDisconnection() const
Definition: blpapi_sessionoptions.h:1281
Provides configuration settings for authorization.
bool bandwidthSaveModeDisabled() const
Definition: blpapi_sessionoptions.h:1355
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:1107
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:1317
void setDefaultKeepAliveResponseTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1142
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:1170
size_t blpapi_SessionOptions_maxEventQueueSize(blpapi_SessionOptions_t *parameters)
void setDefaultTopicPrefix(const char *prefix)
Definition: blpapi_sessionoptions.h:1057
int blpapi_SessionOptions_setApplicationIdentityKey(blpapi_SessionOptions_t *parameters, const char *applicationIdentityKey, size_t size)
void setDefaultKeepAliveInactivityTime(int inactivityMsecs)
Definition: blpapi_sessionoptions.h:1134
#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:1330
Definition: blpapi_correlationid.h:201
Provide description of Socks5 proxy.
void setKeepAliveEnabled(bool isEnabled)
Definition: blpapi_sessionoptions.h:1150
int serviceDownloadTimeout() const
Definition: blpapi_sessionoptions.h:1343
unsigned short serverPort() const
Definition: blpapi_sessionoptions.h:1202
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:1301
SessionOptions & operator=(const SessionOptions &rhs)
Definition: blpapi_sessionoptions.h:1002
struct blpapi_TlsOptions blpapi_TlsOptions_t
Definition: blpapi_types.h:178
CorrelationId setSessionIdentityOptions(const AuthOptions &authOptions, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_sessionoptions.h:1090
int defaultKeepAliveInactivityTime() const
Definition: blpapi_sessionoptions.h:1311
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:1276
blpapi_SessionOptions_t * blpapi_SessionOptions_duplicate(const blpapi_SessionOptions_t *parameters)
size_t maxEventQueueSize() const
Definition: blpapi_sessionoptions.h:1296
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:1286
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:1050
int blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout(blpapi_SessionOptions_t *parameters, int timeoutMsecs)
const char * defaultServices() const
Definition: blpapi_sessionoptions.h:1249
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:1382
void setSlowConsumerWarningLoWaterMark(float loWaterMark)
Definition: blpapi_sessionoptions.h:1126
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:1214
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:1264
#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:1045
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:1244
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:1112
void setApplicationIdentityKey(const std::string &applicationIdentityKey)
Definition: blpapi_sessionoptions.h:1363
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