28 #ifndef INCLUDED_BLPAPI_ABSTRACTSESSION 29 #define INCLUDED_BLPAPI_ABSTRACTSESSION 78 #include <blpapi_deprecate.h> 104 const int *entitlementIds,
105 size_t numEntitlements,
106 int *failedEntitlements,
107 int *failedEntitlementsCount);
111 const blpapi_CorrelationId_t *correlationIds,
112 size_t numCorrelationIds,
113 const char *requestLabel,
114 int requestLabelLen);
121 blpapi_CorrelationId_t *correlationId,
123 const char *requestLabel,
124 int requestLabelLen);
132 const char *serviceIdentifier,
133 blpapi_CorrelationId_t *correlationId);
137 blpapi_CorrelationId_t *correlationId,
143 blpapi_CorrelationId_t *correlationId,
145 const char *manualIp,
151 const char *serviceIdentifier);
161 blpapi_CorrelationId_t *cid);
166 const blpapi_CorrelationId_t *cid,
171 const char **sessionName,
282 virtual bool start() = 0;
306 virtual void stop() = 0;
354 virtual bool openService(
const char *serviceIdentifier);
391 const Request& authorizationRequest,
441 virtual void cancel(
const std::vector<CorrelationId>& correlationIds);
463 const CorrelationId *correlationIds,
size_t numCorrelationIds);
497 const char *ipAddress,
575 BLPAPI_DEPRECATE_ABSTRACT_SESSION_CREATE_USER_HANDLE
UserHandle 596 inline AbstractSession::AbstractSession()
603 inline void AbstractSession::initAbstractSessionHandle(
613 d_handle_p, &service, serviceIdentifier));
618 const Request& authorizationRequest,
629 authorizationRequest.
handle(),
631 const_cast<blpapi_CorrelationId_t *>(
632 &retCorrelationId.impl()),
633 eventQueue ? eventQueue->
handle() : 0,
637 return retCorrelationId;
646 const std::vector<CorrelationId>& correlationIds)
648 if (!correlationIds.size()) {
651 cancel(&correlationIds[0], correlationIds.size());
655 const CorrelationId *correlationIds,
size_t numCorrelationIds)
658 reinterpret_cast<const blpapi_CorrelationId_t *>(correlationIds),
671 &retCorrelationId.impl(),
672 eventQueue ? eventQueue->
handle() : 0));
674 return retCorrelationId;
678 const char *ipAddress,
686 &retCorrelationId.impl(),
689 eventQueue ? eventQueue->
handle() : 0));
691 return retCorrelationId;
702 const char *serviceIdentifier,
const CorrelationId& correlationId)
704 blpapi_CorrelationId_t retv = correlationId.impl();
706 d_handle_p, serviceIdentifier, &retv));
724 blpapi_CorrelationId_t cidHandle = cid.impl();
728 d_handle_p, authOptions.
handle(), &cidHandle));
740 d_handle_p, &correlationId.impl(), &identity));
764 #endif // #ifdef __cplusplus 765 #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:640
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:609
virtual CorrelationId openServiceAsync(const char *serviceIdentifier, const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:701
struct blpapi_Element blpapi_Element_t
Definition: blpapi_types.h:136
BLPAPI_DEPRECATE_ABSTRACT_SESSION_CREATE_USER_HANDLE UserHandle createUserHandle()
Definition: blpapi_abstractsession.h:711
blpapi_Request_t * handle() const
Definition: blpapi_request.h:718
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:187
#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:253
Definition: blpapi_event.h:386
Identity getAuthorizedIdentity(const CorrelationId &correlationId=CorrelationId())
Definition: blpapi_abstractsession.h:733
Provide access to the entitlements for a user.
Identity UserHandle
Definition: blpapi_abstractsession.h:190
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:601
Definition: blpapi_request.h:147
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:617
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:721
virtual CorrelationId generateToken(const CorrelationId &correlationId=CorrelationId(), EventQueue *eventQueue=0)
Definition: blpapi_abstractsession.h:664
Definition: blpapi_event.h:196
std::string sessionName()
Definition: blpapi_abstractsession.h:745
Defines Exceptions that can be thrown by the blpapi library.
virtual int tryNextEvent(Event *event)=0
struct blpapi_Request blpapi_Request_t
Definition: blpapi_dispatchtbl.h:81
virtual Identity createIdentity()
Definition: blpapi_abstractsession.h:716
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:694
blpapi_Identity_t * handle() const
Definition: blpapi_identity.h:381