36#ifndef INCLUDED_BLPAPI_IDENTITY
37#define INCLUDED_BLPAPI_IDENTITY
82void blpapi_Identity_release(blpapi_Identity_t *handle);
85int blpapi_Identity_addRef(blpapi_Identity_t *handle);
88int blpapi_Identity_hasEntitlements(
const blpapi_Identity_t *handle,
89 const blpapi_Service_t *service,
90 const blpapi_Element_t *eidElement,
91 const int *entitlementIds,
92 size_t numEntitlements,
93 int *failedEntitlements,
94 int *failedEntitlementsCount);
97int blpapi_Identity_isAuthorized(
98 const blpapi_Identity_t *handle,
const blpapi_Service_t *service);
101int blpapi_Identity_getSeatType(
102 const blpapi_Identity_t *handle,
int *seatType);
149 blpapi_Identity_t *d_handle_p;
160 BPS = BLPAPI_SEATTYPE_BPS,
199 const int *entitlementIds,
200 size_t numEntitlements)
const;
211 const int *entitlementIds,
212 size_t numEntitlements,
213 int *failedEntitlements,
214 int *failedEntitlementsCount)
const;
236 int *failedEntitlements,
237 int *failedEntitlementsCount)
const;
276 blpapi_Identity_t *
handle()
const;
296 : d_handle_p(newHandle)
301 : d_handle_p(original.d_handle_p)
313 swap(tmp.d_handle_p, d_handle_p);
318inline void Identity::addRef()
321 blpapi_Identity_addRef(d_handle_p);
325inline void Identity::release()
328 blpapi_Identity_release(d_handle_p);
333 const int *entitlementIds,
334 size_t numEntitlements)
const
336 return blpapi_Identity_hasEntitlements(d_handle_p,
348 const int *entitlementIds,
349 size_t numEntitlements,
350 int *failedEntitlements,
351 int *failedEntitlementsCount)
const
353 return blpapi_Identity_hasEntitlements(d_handle_p,
359 failedEntitlementsCount)
366 int *failedEntitlements,
367 int *failedEntitlementsCount)
const
369 return blpapi_Identity_hasEntitlements(d_handle_p,
375 failedEntitlementsCount)
384 return blpapi_Identity_isAuthorized(d_handle_p, service.
handle()) ? true
390 int seatType = BLPAPI_SEATTYPE_INVALID_SEAT;
392 blpapi_Identity_getSeatType(d_handle_p, &seatType));
393 return static_cast<SeatType>(seatType);
Common definitions used by the library.
Defines Exceptions that can be thrown by the blpapi library.
A service which provides access to API data (provide or consume).
Definition blpapi_element.h:1167
blpapi_Element_t * handle()
Definition blpapi_element.h:2635
static void throwOnError(int errorCode)
Definition blpapi_exception.h:541
Definition blpapi_identity.h:147
Identity()
Definition blpapi_identity.h:290
~Identity()
Definition blpapi_identity.h:306
SeatType
Definition blpapi_identity.h:155
@ NONBPS
Not permissioned for Bloomberg Professional Service.
Definition blpapi_identity.h:163
@ BPS
Bloomberg Professional Service.
Definition blpapi_identity.h:160
@ INVALID_SEAT
Definition blpapi_identity.h:156
bool isValid() const
Definition blpapi_identity.h:380
bool hasEntitlements(const Service &service, const int *entitlementIds, size_t numEntitlements) const
Definition blpapi_identity.h:332
blpapi_Identity_t * handle() const
Definition blpapi_identity.h:396
Identity & operator=(const Identity &)
Definition blpapi_identity.h:308
Identity(blpapi_Identity_t *handle)
Definition blpapi_identity.h:295
SeatType getSeatType() const
Definition blpapi_identity.h:388
bool isAuthorized(const Service &service) const
Definition blpapi_identity.h:382
Definition blpapi_service.h:320
blpapi_Service_t * handle() const
Definition blpapi_service.h:722
void swap(Event::iterator &lhs, Event::iterator &rhs)
Swap the contents of the lhs and rhs iterators.
Definition blpapi_event.h:739
Definition blpapi_abstractsession.h:212
Definition blpapi_abstractsession.h:211