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,
203 #ifndef INCLUDED_VECTOR 205 #define INCLUDED_VECTOR 310 virtual bool start() = 0;
334 virtual void stop() = 0;
382 virtual bool openService(
const char *serviceIdentifier);
419 const Request& authorizationRequest,
469 virtual void cancel(
const std::vector<CorrelationId>& correlationIds);
491 const CorrelationId *correlationIds,
size_t numCorrelationIds);
525 const char *ipAddress,
618 inline AbstractSession::AbstractSession()
625 inline void AbstractSession::initAbstractSessionHandle(
635 d_handle_p, &service, serviceIdentifier));
640 const Request& authorizationRequest,
651 authorizationRequest.
handle(),
653 const_cast<blpapi_CorrelationId_t *>(
654 &retCorrelationId.impl()),
655 eventQueue ? eventQueue->
handle() : 0,
659 return retCorrelationId;
668 const std::vector<CorrelationId>& correlationIds)
670 if (!correlationIds.size()) {
673 cancel(&correlationIds[0], correlationIds.size());
677 const CorrelationId *correlationIds,
size_t numCorrelationIds)
680 reinterpret_cast<const blpapi_CorrelationId_t *>(correlationIds),
693 &retCorrelationId.impl(),
694 eventQueue ? eventQueue->
handle() : 0));
696 return retCorrelationId;
700 const char *ipAddress,
708 &retCorrelationId.impl(),
711 eventQueue ? eventQueue->
handle() : 0));
713 return retCorrelationId;
724 const char *serviceIdentifier,
const CorrelationId& correlationId)
726 blpapi_CorrelationId_t retv = correlationId.impl();
728 d_handle_p, serviceIdentifier, &retv));
746 blpapi_CorrelationId_t cidHandle = cid.impl();
750 d_handle_p, authOptions.
handle(), &cidHandle));
762 d_handle_p, &correlationId.impl(), &identity));
775 #endif // #ifdef __cplusplus 776 #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:662
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:631
virtual CorrelationId openServiceAsync(const char *serviceIdentifier, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:723
struct blpapi_Element blpapi_Element_t
Definition: blpapi_types.h:136
UserHandle createUserHandle()
Definition: blpapi_abstractsession.h:733
blpapi_Request_t * handle() const
Definition: blpapi_request.h:712
struct blpapi_Request blpapi_Request_t
Definition: blpapi_request.h:67
Common definitions used by the library.
blpapi_EventQueue_t * handle() const
Definition: blpapi_event.h:468
virtual Event nextEvent(int timeout=0)=0
Definition: blpapi_abstractsession.h:215
#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:281
Definition: blpapi_event.h:278
Identity getAuthorizedIdentity(const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:755
Provide access to the entitlements for a user.
Identity UserHandle
Definition: blpapi_abstractsession.h:218
A service which provides access to API data (provide or consume).
blpapi_AuthOptions_t * handle() const
Definition: blpapi_authoptions.h:491
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:623
Definition: blpapi_request.h:145
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:639
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:743
virtual CorrelationId generateToken(const CorrelationId &correlationId=CorrelationId(), EventQueue *eventQueue=0)
Definition: blpapi_abstractsession.h:686
Definition: blpapi_event.h:182
virtual int tryNextEvent(Event *event)=0
virtual Identity createIdentity()
Definition: blpapi_abstractsession.h:738
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:716
blpapi_Identity_t * handle() const
Definition: blpapi_identity.h:381