BLPAPI C++  3.24.8
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);
761  // ACCESSORS
762  const char *serverHost() const;
769  unsigned short serverPort() const;
776  size_t numServerAddresses() const;
781  int getServerAddress(const char **serverHost,
782  unsigned short *serverPort,
783  size_t index) const;
790  int getServerAddress(const char **serverHost,
791  unsigned short *serverPort,
792  Socks5Config *socksConfig,
793  size_t index) const;
801  unsigned int connectTimeout() const;
807  const char *defaultServices() const;
812  const char *defaultSubscriptionService() const;
820  const char *defaultTopicPrefix() const;
827  bool allowMultipleCorrelatorsPerMsg() const;
833  int clientMode() const;
839  int maxPendingRequests() const;
850  bool autoRestartOnDisconnection() const;
855  const char *authenticationOptions() const;
860  int numStartAttempts() const;
866  size_t maxEventQueueSize() const;
872  float slowConsumerWarningHiWaterMark() const;
878  float slowConsumerWarningLoWaterMark() const;
884  int defaultKeepAliveInactivityTime() const;
896  bool keepAliveEnabled() const;
909  int serviceCheckTimeout() const;
915  int serviceDownloadTimeout() const;
921  int flushPublishedEventsTimeout() const;
927  bool bandwidthSaveModeDisabled() const;
933  std::string applicationIdentityKey();
939  std::string sessionName();
944  std::ostream& print(std::ostream& stream,
945  int indentLevel = 0,
946  int spacesPerLevel = 4) const;
959 };
960 
964 // FREE OPERATORS
965 std::ostream& operator<<(
966  std::ostream& stream, const SessionOptions& sessionOptions);
979 // ============================================================================
980 // INLINE FUNCTION DEFINITIONS
981 // ============================================================================
982 
983 // --------------------
984 // class SessionOptions
985 // --------------------
987 {
988  d_handle_p = blpapi_SessionOptions_create();
989 #if BLPAPI_COMPAT_33X
992 #endif
993 }
994 
996 {
997  d_handle_p = blpapi_SessionOptions_duplicate(options.handle());
998 }
999 
1001 {
1002  blpapi_SessionOptions_destroy(d_handle_p);
1003 }
1004 
1006 {
1007  blpapi_SessionOptions_copy(this->handle(), rhs.handle());
1008  return *this;
1009 }
1010 
1011 inline void SessionOptions::setServerHost(const char *newServerHost)
1012 {
1013  blpapi_SessionOptions_setServerHost(d_handle_p, newServerHost);
1014 }
1015 
1016 inline void SessionOptions::setServerPort(unsigned short newServerPort)
1017 {
1018  blpapi_SessionOptions_setServerPort(d_handle_p, newServerPort);
1019 }
1020 
1022  const char *serverHost, unsigned short serverPort, size_t index)
1023 {
1025  d_handle_p, serverHost, serverPort, index);
1026 }
1027 
1028 inline int SessionOptions::setServerAddress(const char *serverHost,
1029  unsigned short serverPort,
1030  const Socks5Config& socks5Config,
1031  size_t index)
1032 {
1034  d_handle_p, serverHost, serverPort, socks5Config.impl(), index);
1035 }
1036 
1037 inline int SessionOptions::removeServerAddress(size_t index)
1038 {
1039  return blpapi_SessionOptions_removeServerAddress(d_handle_p, index);
1040 }
1041 
1042 inline void SessionOptions::setConnectTimeout(unsigned int timeoutMilliSeconds)
1043 {
1045  d_handle_p, timeoutMilliSeconds));
1046 }
1047 
1048 inline void SessionOptions::setDefaultServices(const char *newDefaultServices)
1049 {
1050  blpapi_SessionOptions_setDefaultServices(d_handle_p, newDefaultServices);
1051 }
1052 
1054  const char *serviceIdentifier)
1055 {
1057  d_handle_p, serviceIdentifier);
1058 }
1059 
1060 inline void SessionOptions::setDefaultTopicPrefix(const char *prefix)
1061 {
1062  blpapi_SessionOptions_setDefaultTopicPrefix(d_handle_p, prefix);
1063 }
1064 
1066  bool newAllowMultipleCorrelatorsPerMsg)
1067 {
1069  d_handle_p, newAllowMultipleCorrelatorsPerMsg);
1070 }
1071 
1072 inline void SessionOptions::setClientMode(int newClientMode)
1073 {
1074 #if BLPAPI_COMPAT_33X
1075  newClientMode |= BLPAPI_CLIENTMODE_COMPAT_33X;
1076 #endif
1077 
1078  blpapi_SessionOptions_setClientMode(d_handle_p, newClientMode);
1079 }
1080 
1081 inline void SessionOptions::setMaxPendingRequests(int newMaxPendingRequests)
1082 {
1084  d_handle_p, newMaxPendingRequests);
1085 }
1086 
1088 {
1090  d_handle_p, autoRestart ? 1 : 0);
1091 }
1092 
1094  const AuthOptions& authOptions, const CorrelationId& cid)
1095 {
1096  blpapi_CorrelationId_t cidHandle = cid.impl();
1097 
1100  d_handle_p, authOptions.handle(), &cidHandle));
1101 
1102  return CorrelationId(cidHandle);
1103 }
1104 
1105 inline void SessionOptions::setAuthenticationOptions(const char *authOptions)
1106 {
1107  blpapi_SessionOptions_setAuthenticationOptions(d_handle_p, authOptions);
1108 }
1109 
1110 inline void SessionOptions::setNumStartAttempts(int newNumStartAttempts)
1111 {
1112  blpapi_SessionOptions_setNumStartAttempts(d_handle_p, newNumStartAttempts);
1113 }
1114 
1115 inline void SessionOptions::setMaxEventQueueSize(size_t eventQueueSize)
1116 {
1118  d_handle_p, eventQueueSize);
1119 }
1120 
1122  float hiWaterMark)
1123 {
1126  d_handle_p, hiWaterMark));
1127 }
1128 
1130  float loWaterMark)
1131 {
1134  d_handle_p, loWaterMark));
1135 }
1136 
1138  int inactivityTime)
1139 {
1142  d_handle_p, inactivityTime));
1143 }
1144 
1146  int responseTimeout)
1147 {
1150  d_handle_p, responseTimeout));
1151 }
1152 
1153 inline void SessionOptions::setKeepAliveEnabled(bool isEnabled)
1154 {
1156  d_handle_p, isEnabled));
1157 }
1158 
1160  bool shouldRecrod)
1161 {
1163  d_handle_p, shouldRecrod);
1164 }
1165 
1166 inline void SessionOptions::setServiceCheckTimeout(int timeoutMsecs)
1167 {
1170  d_handle_p, timeoutMsecs));
1171 }
1172 
1173 inline void SessionOptions::setServiceDownloadTimeout(int timeoutMsecs)
1174 {
1177  d_handle_p, timeoutMsecs));
1178 }
1179 
1180 inline void SessionOptions::setTlsOptions(const TlsOptions& tlsOptions)
1181 {
1183  (d_handle_p, tlsOptions.handle());
1184 }
1185 
1187 {
1190  d_handle_p, timeoutMsecs));
1191 }
1192 
1194 {
1197  d_handle_p, isDisabled));
1198 }
1199 
1200 inline const char *SessionOptions::serverHost() const
1201 {
1202  return blpapi_SessionOptions_serverHost(d_handle_p);
1203 }
1204 
1205 inline unsigned short SessionOptions::serverPort() const
1206 {
1207  return static_cast<unsigned short>(
1208  blpapi_SessionOptions_serverPort(d_handle_p));
1209 }
1210 
1212 {
1213  return static_cast<size_t>(
1215 }
1216 
1217 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1218  unsigned short *serverPortOut,
1219  size_t index) const
1220 {
1222  d_handle_p, serverHostOut, serverPortOut, index);
1223 }
1224 
1225 inline int SessionOptions::getServerAddress(const char **serverHostOut,
1226  unsigned short *serverPortOut,
1227  Socks5Config *socksConfig,
1228  size_t index) const
1229 {
1230  const char *socks5ConfigHost = 0;
1231  unsigned short socks5ConfigPort = 0;
1234  serverHostOut,
1235  serverPortOut,
1236  &socks5ConfigHost,
1237  &socks5ConfigPort,
1238  index));
1239 
1240  if (socks5ConfigHost) {
1241  *socksConfig = Socks5Config(socks5ConfigHost, socks5ConfigPort);
1242  }
1243 
1244  return 0;
1245 }
1246 
1247 inline unsigned int SessionOptions::connectTimeout() const
1248 {
1249  return blpapi_SessionOptions_connectTimeout(d_handle_p);
1250 }
1251 
1252 inline const char *SessionOptions::defaultServices() const
1253 {
1254  return blpapi_SessionOptions_defaultServices(d_handle_p);
1255 }
1256 
1258 {
1260 }
1261 
1262 inline const char *SessionOptions::defaultTopicPrefix() const
1263 {
1264  return blpapi_SessionOptions_defaultTopicPrefix(d_handle_p);
1265 }
1266 
1268 {
1270  ? true
1271  : false;
1272 }
1273 
1274 inline int SessionOptions::clientMode() const
1275 {
1276  return blpapi_SessionOptions_clientMode(d_handle_p);
1277 }
1278 
1280 {
1281  return blpapi_SessionOptions_maxPendingRequests(d_handle_p);
1282 }
1283 
1285 {
1286  return blpapi_SessionOptions_autoRestartOnDisconnection(d_handle_p) != 0;
1287 }
1288 
1289 inline const char *SessionOptions::authenticationOptions() const
1290 {
1292 }
1293 
1295 {
1296  return blpapi_SessionOptions_numStartAttempts(d_handle_p);
1297 }
1298 
1300 {
1302 }
1303 
1305 {
1307 }
1308 
1310 {
1312 }
1313 
1315 {
1317  d_handle_p);
1318 }
1319 
1321 {
1323  d_handle_p);
1324 }
1325 
1327 {
1328  return BLPAPI_CALL_SESSIONOPTIONS_KEEPALIVEENABLED(d_handle_p) != 0
1329  ? true
1330  : false;
1331 }
1332 
1334 {
1336  d_handle_p)
1337  ? true
1338  : false;
1339 }
1340 
1342 {
1344 }
1345 
1347 {
1349  d_handle_p);
1350 }
1351 
1353 {
1355  d_handle_p);
1356 }
1357 
1359 {
1361  != 0
1362  ? true
1363  : false;
1364 }
1365 
1367  const std::string& applicationIdentityKey)
1368 {
1371  applicationIdentityKey.data(),
1372  static_cast<int>(applicationIdentityKey.size())));
1373 }
1374 
1376 {
1377  const char *apik;
1378  size_t size;
1381  &apik, &size, d_handle_p));
1382  return std::string(apik, size);
1383 }
1384 
1385 inline void SessionOptions::setSessionName(const std::string& sessionName)
1386 {
1389  d_handle_p, sessionName.data(), sessionName.size()));
1390 }
1391 
1392 inline std::string SessionOptions::sessionName()
1393 {
1394  const char *sessionName = nullptr;
1395  size_t size = 0;
1397  &sessionName, &size, d_handle_p));
1398  return std::string(sessionName, size);
1399 }
1400 
1402 {
1403  return d_handle_p;
1404 }
1405 
1406 inline std::ostream& SessionOptions::print(
1407  std::ostream& stream, int indentLevel, int spacesPerLevel) const
1408 {
1411  (d_handle_p,
1413  &stream,
1414  indentLevel,
1415  spacesPerLevel);
1416  }
1417  return stream;
1418 }
1419 
1420 inline std::ostream& operator<<(
1421  std::ostream& stream, const SessionOptions& sessionOptions)
1422 {
1423  return sessionOptions.print(stream, 0, -1);
1424 }
1425 
1426 } // close namespace blpapi
1427 } // close namespace BloombergLP
1428 
1429 #endif // #ifdef __cplusplus
1430 #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:1262
int numStartAttempts() const
Definition: blpapi_sessionoptions.h:1294
void setBandwidthSaveModeDisabled(bool isDisabled)
Definition: blpapi_sessionoptions.h:1193
std::ostream & print(std::ostream &stream, int indentLevel=0, int spacesPerLevel=4) const
Definition: blpapi_sessionoptions.h:1406
#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:1021
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:1042
void setAuthenticationOptions(const char *authOptions)
Definition: blpapi_sessionoptions.h:1105
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:1274
void blpapi_SessionOptions_setAutoRestartOnDisconnection(blpapi_SessionOptions_t *parameters, int autoRestart)
float slowConsumerWarningLoWaterMark() const
Definition: blpapi_sessionoptions.h:1309
#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:1121
SessionOptions()
Definition: blpapi_sessionoptions.h:986
#define BLPAPI_CLIENTMODE_AUTO
Definition: blpapi_defs.h:109
std::string applicationIdentityKey()
Definition: blpapi_sessionoptions.h:1375
int blpapi_SessionOptions_maxPendingRequests(blpapi_SessionOptions_t *parameters)
Common definitions used by the library.
void setFlushPublishedEventsTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1186
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:1180
Definition: blpapi_abstractsession.h:187
Always connect to the server API.
Definition: blpapi_sessionoptions.h:447
const char * serverHost() const
Definition: blpapi_sessionoptions.h:1200
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
void setRecordSubscriptionDataReceiveTimes(bool shouldRecord)
Definition: blpapi_sessionoptions.h:1159
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:1401
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:1352
const char * defaultSubscriptionService() const
Definition: blpapi_sessionoptions.h:1257
~SessionOptions()
Definition: blpapi_sessionoptions.h:1000
int blpapi_SessionOptions_numStartAttempts(blpapi_SessionOptions_t *parameters)
void setAutoRestartOnDisconnection(bool autoRestart)
Definition: blpapi_sessionoptions.h:1087
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:1392
#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:1016
size_t numServerAddresses() const
Definition: blpapi_sessionoptions.h:1211
#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:1072
#define BLPAPI_CLIENTMODE_DAPI
Definition: blpapi_defs.h:110
void setServiceCheckTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1166
bool keepAliveEnabled() const
Definition: blpapi_sessionoptions.h:1326
int serviceCheckTimeout() const
Definition: blpapi_sessionoptions.h:1341
int removeServerAddress(size_t index)
Definition: blpapi_sessionoptions.h:1037
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:1081
#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:1011
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:1065
int blpapi_SessionOptions_clientMode(blpapi_SessionOptions_t *parameters)
Provide a key to identify individual subscriptions or requests.
bool autoRestartOnDisconnection() const
Definition: blpapi_sessionoptions.h:1284
Provides configuration settings for authorization.
bool bandwidthSaveModeDisabled() const
Definition: blpapi_sessionoptions.h:1358
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:1110
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:1320
void setDefaultKeepAliveResponseTimeout(int timeoutMsecs)
Definition: blpapi_sessionoptions.h:1145
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:1173
size_t blpapi_SessionOptions_maxEventQueueSize(blpapi_SessionOptions_t *parameters)
void setDefaultTopicPrefix(const char *prefix)
Definition: blpapi_sessionoptions.h:1060
int blpapi_SessionOptions_setApplicationIdentityKey(blpapi_SessionOptions_t *parameters, const char *applicationIdentityKey, size_t size)
void setDefaultKeepAliveInactivityTime(int inactivityMsecs)
Definition: blpapi_sessionoptions.h:1137
#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:1333
Definition: blpapi_correlationid.h:201
Provide description of Socks5 proxy.
void setKeepAliveEnabled(bool isEnabled)
Definition: blpapi_sessionoptions.h:1153
int serviceDownloadTimeout() const
Definition: blpapi_sessionoptions.h:1346
unsigned short serverPort() const
Definition: blpapi_sessionoptions.h:1205
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:1304
SessionOptions & operator=(const SessionOptions &rhs)
Definition: blpapi_sessionoptions.h:1005
struct blpapi_TlsOptions blpapi_TlsOptions_t
Definition: blpapi_types.h:178
CorrelationId setSessionIdentityOptions(const AuthOptions &authOptions, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_sessionoptions.h:1093
int defaultKeepAliveInactivityTime() const
Definition: blpapi_sessionoptions.h:1314
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:1279
blpapi_SessionOptions_t * blpapi_SessionOptions_duplicate(const blpapi_SessionOptions_t *parameters)
size_t maxEventQueueSize() const
Definition: blpapi_sessionoptions.h:1299
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:1289
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:1053
int blpapi_SessionOptions_setDefaultKeepAliveResponseTimeout(blpapi_SessionOptions_t *parameters, int timeoutMsecs)
const char * defaultServices() const
Definition: blpapi_sessionoptions.h:1252
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:1385
void setSlowConsumerWarningLoWaterMark(float loWaterMark)
Definition: blpapi_sessionoptions.h:1129
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:1217
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:1267
#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:1048
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:1247
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:1115
void setApplicationIdentityKey(const std::string &applicationIdentityKey)
Definition: blpapi_sessionoptions.h:1366
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