#include <blpapi_identity.h>
Public Types | |
| enum | SeatType { INVALID_SEAT = BLPAPI_SEATTYPE_INVALID_SEAT, BPS = BLPAPI_SEATTYPE_BPS, NONBPS = BLPAPI_SEATTYPE_NONBPS } |
Public Member Functions | |
| Identity (blpapi_Identity_t *handle) | |
| Identity () | |
| Identity (const Identity &original) | |
| ~Identity () | |
| Identity & | operator= (const Identity &) |
| bool | hasEntitlements (const Service &service, const int *entitlementIds, size_t numEntitlements) const |
| bool | hasEntitlements (const Service &service, const int *entitlementIds, size_t numEntitlements, int *failedEntitlements, int *failedEntitlementsCount) const |
| bool | hasEntitlements (const Service &service, const Element &entitlementIds, int *failedEntitlements, int *failedEntitlementsCount) const |
| bool | isValid () const |
| bool | isAuthorized (const Service &service) const |
| SeatType | getSeatType () const |
| blpapi_Identity_t * | handle () const |
Provides access to the entitlements for a specific user.
An unauthorized Identity is created using Session::createIdentity(). Once a Identity has been created it can be authorized using Session::sendAuthorizationRequest(). The authorized Identity can then be queried or used in Session::subscribe() or Session::sendRequest() calls.
Once authorized a Identity has access to the entitlements of the user which it was validated for.
The Identity is a reference counted handle, copying it or assigning it does not duplicate the underlying entitlement data. Once the last Identity referring to the underlying entitlement data is destroyed that entitlement data is discarded and can only be re-established using Session::sendAuthorizationRequest() again.
| INVALID_SEAT | |
| BPS |
Bloomberg Professional Service. |
| NONBPS |
| blpapi::Identity::Identity | ( | blpapi_Identity_t * | handle | ) |
Assume ownership of the raw handle
| blpapi::Identity::Identity | ( | ) |
| blpapi::Identity::Identity | ( | const Identity & | original | ) |
Copy constructor
| blpapi::Identity::~Identity | ( | ) |
Destructor. Destroying the last Identity for a specific user cancels any authorizations associated with it.
| bool blpapi::Identity::hasEntitlements | ( | const Service & | service, | |
| const int * | entitlementIds, | |||
| size_t | numEntitlements | |||
| ) | const |
Return true if this Identity is authorized for the specified service and the first numEntitlements elements of the specified entitlementIds array; otherwise return false. The behavior is undefined unless entitlementIds is an array containing at least numEntitlements elements.
| bool blpapi::Identity::hasEntitlements | ( | const Service & | service, | |
| const int * | entitlementIds, | |||
| size_t | numEntitlements, | |||
| int * | failedEntitlements, | |||
| int * | failedEntitlementsCount | |||
| ) | const |
Return true if this Identity is authorized for the specified service and the first numEntitlements elements of the specified entitlementIds array; otherwise fill the specified failedEntitlements array with the subset of entitlementIds this Identity is not authorized for, load the number of such entitlements into the specified failedEntitlementsCount, and return false. The behavior is undefined unless entitlementIds and failedEntitlements are arrays containing at least numEntitlements elements, and failedEntitlementsCount is non-null.
| bool blpapi::Identity::hasEntitlements | ( | const Service & | service, | |
| const Element & | entitlementIds, | |||
| int * | failedEntitlements, | |||
| int * | failedEntitlementsCount | |||
| ) | const |
Return true if this Identity is authorized for the specified service and for each of the entitlement IDs contained in the specified entitlementIds, which must be an Element which is an array of integers; otherwise, fill the specified failedEntitlements array with the subset of entitlement IDs this Identity is not authorized for, load the number of such entitlements into the specified failedEntitlementsCount, and return false. The behavior is undefined unless failedEntitlements is an array containing at least entitlementIds.numValues() elements and failedEntitlementsCount is non-null.
| bool blpapi::Identity::isValid | ( | ) | const |
| bool blpapi::Identity::isAuthorized | ( | const Service & | service | ) | const |
Return true if this Identity is authorized for the specified service; otherwise return false.
| blpapi_Identity_t* blpapi::Identity::handle | ( | ) | const |
1.7.1