28 #ifndef INCLUDED_BLPAPI_ABSTRACTSESSION 29 #define INCLUDED_BLPAPI_ABSTRACTSESSION 76 #ifndef INCLUDED_BLPAPI_CORRELATIONID 80 #ifndef INCLUDED_BLPAPI_CALL 84 #ifndef INCLUDED_BLPAPI_DEFS 88 #ifndef INCLUDED_BLPAPI_EVENT 92 #ifndef INCLUDED_BLPAPI_EVENTDISPATCHER 96 #ifndef INCLUDED_BLPAPI_EXCEPTION 97 #include <blpapi_exceptionutil.h> 100 #ifndef INCLUDED_BLPAPI_IDENTITY 104 #ifndef INCLUDED_BLPAPI_REQUEST 108 #ifndef INCLUDED_BLPAPI_SERVICE 112 #ifndef INCLUDED_BLPAPI_TYPES 133 const int *entitlementIds,
134 size_t numEntitlements,
135 int *failedEntitlements,
136 int *failedEntitlementsCount);
140 const blpapi_CorrelationId_t *correlationIds,
141 size_t numCorrelationIds,
142 const char *requestLabel,
143 int requestLabelLen);
150 blpapi_CorrelationId_t *correlationId,
152 const char *requestLabel,
153 int requestLabelLen);
161 const char *serviceIdentifier,
162 blpapi_CorrelationId_t *correlationId);
166 blpapi_CorrelationId_t *correlationId,
172 blpapi_CorrelationId_t *correlationId,
174 const char *manualIp,
180 const char *serviceIdentifier);
190 blpapi_CorrelationId_t *cid);
195 const blpapi_CorrelationId_t *cid,
200 const char **sessionName,
208 #ifndef INCLUDED_VECTOR 210 #define INCLUDED_VECTOR 315 virtual bool start() = 0;
339 virtual void stop() = 0;
387 virtual bool openService(
const char *serviceIdentifier);
424 const Request& authorizationRequest,
474 virtual void cancel(
const std::vector<CorrelationId>& correlationIds);
496 const CorrelationId *correlationIds,
size_t numCorrelationIds);
530 const char *ipAddress,
628 inline AbstractSession::AbstractSession()
635 inline void AbstractSession::initAbstractSessionHandle(
645 d_handle_p, &service, serviceIdentifier));
650 const Request& authorizationRequest,
661 authorizationRequest.
handle(),
663 const_cast<blpapi_CorrelationId_t *>(
664 &retCorrelationId.impl()),
665 eventQueue ? eventQueue->
handle() : 0,
669 return retCorrelationId;
678 const std::vector<CorrelationId>& correlationIds)
680 if (!correlationIds.size()) {
683 cancel(&correlationIds[0], correlationIds.size());
687 const CorrelationId *correlationIds,
size_t numCorrelationIds)
690 reinterpret_cast<const blpapi_CorrelationId_t *>(correlationIds),
703 &retCorrelationId.impl(),
704 eventQueue ? eventQueue->
handle() : 0));
706 return retCorrelationId;
710 const char *ipAddress,
718 &retCorrelationId.impl(),
721 eventQueue ? eventQueue->
handle() : 0));
723 return retCorrelationId;
734 const char *serviceIdentifier,
const CorrelationId& correlationId)
736 blpapi_CorrelationId_t retv = correlationId.impl();
738 d_handle_p, serviceIdentifier, &retv));
756 blpapi_CorrelationId_t cidHandle = cid.impl();
760 d_handle_p, authOptions.
handle(), &cidHandle));
772 d_handle_p, &correlationId.impl(), &identity));
796 #endif // #ifdef __cplusplus 797 #endif // #ifndef INCLUDED_BLPAPI_ABSTRACTSESSION struct blpapi_Identity blpapi_UserHandle_t
Definition: blpapi_types.h:185
virtual void cancel(const CorrelationId &correlationId)
Definition: blpapi_abstractsession.h:672
BLPAPI_EXPORT int blpapi_AbstractSession_generateAuthorizedIdentityAsync(blpapi_AbstractSession_t *session, const blpapi_AuthOptions_t *authOptions, blpapi_CorrelationId_t *cid)
BLPAPI_EXPORT int blpapi_AbstractSession_sendAuthorizationRequest(blpapi_AbstractSession_t *session, const blpapi_Request_t *request, blpapi_Identity_t *identity, blpapi_CorrelationId_t *correlationId, blpapi_EventQueue_t *eventQueue, const char *requestLabel, int requestLabelLen)
virtual Service getService(const char *serviceIdentifier) const
Definition: blpapi_abstractsession.h:641
virtual CorrelationId openServiceAsync(const char *serviceIdentifier, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:733
struct blpapi_Element blpapi_Element_t
Definition: blpapi_types.h:136
UserHandle createUserHandle()
Definition: blpapi_abstractsession.h:743
blpapi_Request_t * handle() const
Definition: blpapi_request.h:733
struct blpapi_Request blpapi_Request_t
Definition: blpapi_request.h:68
Common definitions used by the library.
blpapi_EventQueue_t * handle() const
Definition: blpapi_event.h:586
virtual Event nextEvent(int timeout=0)=0
Definition: blpapi_abstractsession.h:220
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
Definition: blpapi_service.h:304
BLPAPI_EXPORT int blpapi_AbstractSession_openServiceAsync(blpapi_AbstractSession_t *session, const char *serviceIdentifier, blpapi_CorrelationId_t *correlationId)
Definition: blpapi_authoptions.h:194
BLPAPI_EXPORT int blpapi_UserHandle_addRef(blpapi_UserHandle_t *handle)
Definition: blpapi_abstractsession.h:286
Definition: blpapi_event.h:386
Identity getAuthorizedIdentity(const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:765
Provide access to the entitlements for a user.
Identity UserHandle
Definition: blpapi_abstractsession.h:223
A service which provides access to API data (provide or consume).
blpapi_AuthOptions_t * handle() const
Definition: blpapi_authoptions.h:491
BLPAPI_EXPORT int blpapi_AbstractSession_sessionName(blpapi_AbstractSession_t *session, const char **sessionName, size_t *size)
A component which defines events related operations.
Provide a key to identify individual subscriptions or requests.
Provides configuration settings for authorization.
struct blpapi_EventQueue blpapi_EventQueue_t
Definition: blpapi_types.h:148
virtual ~AbstractSession()
Definition: blpapi_abstractsession.h:633
Definition: blpapi_request.h:146
static void throwOnError(int errorCode)
Definition: blpapi_exception.h:526
BLPAPI_EXPORT int blpapi_AbstractSession_openService(blpapi_AbstractSession_t *session, const char *serviceIdentifier)
BLPAPI_EXPORT void blpapi_UserHandle_release(blpapi_UserHandle_t *handle)
Defines a request which can be sent for a service.
struct blpapi_AuthOptions blpapi_AuthOptions_t
Definition: blpapi_types.h:203
virtual bool startAsync()=0
struct blpapi_Identity blpapi_Identity_t
Definition: blpapi_types.h:188
BLPAPI_EXPORT blpapi_Identity_t * blpapi_AbstractSession_createIdentity(blpapi_AbstractSession_t *session)
Definition: blpapi_correlationid.h:201
Provide a dispatcher to dispatch events.
Definition: blpapi_identity.h:131
BLPAPI_EXPORT int blpapi_AbstractSession_generateToken(blpapi_AbstractSession_t *session, blpapi_CorrelationId_t *correlationId, blpapi_EventQueue_t *eventQueue)
virtual CorrelationId sendAuthorizationRequest(const Request &authorizationRequest, Identity *identity, const CorrelationId &correlationId=CorrelationId(), EventQueue *eventQueue=0)
Definition: blpapi_abstractsession.h:649
BLPAPI_EXPORT int blpapi_UserHandle_hasEntitlements(const blpapi_UserHandle_t *handle, const blpapi_Service_t *service, const blpapi_Element_t *eidElement, const int *entitlementIds, size_t numEntitlements, int *failedEntitlements, int *failedEntitlementsCount)
CorrelationId generateAuthorizedIdentity(const AuthOptions &authOptions, const CorrelationId &cid=CorrelationId())
Definition: blpapi_abstractsession.h:753
virtual CorrelationId generateToken(const CorrelationId &correlationId=CorrelationId(), EventQueue *eventQueue=0)
Definition: blpapi_abstractsession.h:696
Definition: blpapi_event.h:196
std::string sessionName()
Definition: blpapi_abstractsession.h:777
virtual int tryNextEvent(Event *event)=0
virtual Identity createIdentity()
Definition: blpapi_abstractsession.h:748
struct blpapi_AbstractSession blpapi_AbstractSession_t
Definition: blpapi_types.h:127
BLPAPI_EXPORT int blpapi_AbstractSession_generateManualToken(blpapi_AbstractSession_t *session, blpapi_CorrelationId_t *correlationId, const char *user, const char *manualIp, blpapi_EventQueue_t *eventQueue)
BLPAPI_EXPORT int blpapi_AbstractSession_cancel(blpapi_AbstractSession_t *session, const blpapi_CorrelationId_t *correlationIds, size_t numCorrelationIds, const char *requestLabel, int requestLabelLen)
virtual void stopAsync()=0
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
struct blpapi_Service blpapi_Service_t
Definition: blpapi_types.h:166
BLPAPI_EXPORT int blpapi_AbstractSession_getAuthorizedIdentity(blpapi_AbstractSession_t *session, const blpapi_CorrelationId_t *cid, blpapi_Identity_t **identity)
Provide functions for dispatchtbl.
BLPAPI_EXPORT int blpapi_AbstractSession_getService(blpapi_AbstractSession_t *session, blpapi_Service_t **service, const char *serviceIdentifier)
virtual bool openService(const char *serviceIdentifier)
Definition: blpapi_abstractsession.h:726
blpapi_Identity_t * handle() const
Definition: blpapi_identity.h:381