Public Types | Public Member Functions

blpapi::ServiceRegistrationOptions Class Reference

#include <blpapi_providersession.h>

List of all members.

Public Types

enum  ServiceRegistrationPriority { PRIORITY_LOW = BLPAPI_SERVICEREGISTRATIONOPTIONS_PRIORITY_LOW, PRIORITY_MEDIUM = BLPAPI_SERVICEREGISTRATIONOPTIONS_PRIORITY_MEDIUM, PRIORITY_HIGH = BLPAPI_SERVICEREGISTRATIONOPTIONS_PRIORITY_HIGH }
enum  RegistrationParts {
  PART_PUBLISHING = BLPAPI_REGISTRATIONPARTS_PUBLISHING, PART_OPERATIONS = BLPAPI_REGISTRATIONPARTS_OPERATIONS, PART_SUBSCRIBER_RESOLUTION = BLPAPI_REGISTRATIONPARTS_SUBSCRIBER_RESOLUTION, PART_PUBLISHER_RESOLUTION = BLPAPI_REGISTRATIONPARTS_PUBLISHER_RESOLUTION,
  PART_DEFAULT = BLPAPI_REGISTRATIONPARTS_DEFAULT
}

Public Member Functions

 ServiceRegistrationOptions ()
 ServiceRegistrationOptions (const ServiceRegistrationOptions &original)
 ~ServiceRegistrationOptions ()
ServiceRegistrationOptionsoperator= (const ServiceRegistrationOptions &rhs)
void setGroupId (const char *groupId, unsigned int groupIdLength)
int setServicePriority (int priority)
void setPartsToRegister (int parts)
void addActiveSubServiceCodeRange (int begin, int end, int priority)
void removeAllActiveSubServiceCodeRanges ()
blpapi_ServiceRegistrationOptions_thandle () const
int getGroupId (char *groupId, int *groupIdLength) const
int getServicePriority () const
int getPartsToRegister () const

Detailed Description

Contains the options which the user can specify when registering a service

To use non-default options to registerService, create a ServiceRegistrationOptions instance and set the required options and then supply it when using the registerService interface.


Member Enumeration Documentation

Enumerator:
PRIORITY_LOW 
PRIORITY_MEDIUM 
PRIORITY_HIGH 

constants for specifying which part(s) of a service should be registered

Enumerator:
PART_PUBLISHING 

register to receive subscribe and unsubscribe messages

PART_OPERATIONS 

register to receive the request types corresponding to each "operation" defined in the service metadata

PART_SUBSCRIBER_RESOLUTION 

register to receive resolution requests (with message type PermissionRequest) from subscribers

PART_PUBLISHER_RESOLUTION 

register to receive resolution requests (with message type PermissionRequest) from publishers (via ProviderSession::createTopics)

PART_DEFAULT 

register the parts of the service implied by options specified in the service metadata


Constructor & Destructor Documentation

blpapi::ServiceRegistrationOptions::ServiceRegistrationOptions (  ) 

Create ServiceRegistrationOptions with default options.

blpapi::ServiceRegistrationOptions::ServiceRegistrationOptions ( const ServiceRegistrationOptions original  ) 

Copy Constructor

blpapi::ServiceRegistrationOptions::~ServiceRegistrationOptions (  ) 

Member Function Documentation

ServiceRegistrationOptions& blpapi::ServiceRegistrationOptions::operator= ( const ServiceRegistrationOptions rhs  ) 

Assign to this object the value of the specified rhs object.

void blpapi::ServiceRegistrationOptions::setGroupId ( const char *  groupId,
unsigned int  groupIdLength 
)

Set the Group ID for the service to be registered to the specified char array beginning at groupId with size groupIdLength. If groupIdLength > MAX_GROUP_ID_SIZE (=64) only the first MAX_GROUP_ID_SIZE chars are considered as Group Id.

int blpapi::ServiceRegistrationOptions::setServicePriority ( int  priority  ) 

Set the priority with which a service will be registered to the non-negative value specified in priority. This call returns with a non-zero value indicating error when a negative priority is specified. Any non-negative priority value, other than the one pre-defined in ServiceRegistrationPriority can be used. Default value is PRIORITY_HIGH

void blpapi::ServiceRegistrationOptions::setPartsToRegister ( int  parts  ) 

Set the parts of the service to be registered to the specified parts, which must be a bitwise-or of the options provided in RegistrationParts, above. This option defaults to RegistrationParts::PARTS_DEFAULT.

void blpapi::ServiceRegistrationOptions::addActiveSubServiceCodeRange ( int  begin,
int  end,
int  priority 
)

Advertise the service to be registered to receive, with the specified priority, subscriptions that the resolver has mapped to a service code between the specified begin and the specified end values, inclusive. The behavior of this function is undefined unless 0 <= begin <= end < (1 << 24), and priority is non-negative.

void blpapi::ServiceRegistrationOptions::removeAllActiveSubServiceCodeRanges (  ) 

Remove all previously added sub-service code ranges.

blpapi_ServiceRegistrationOptions_t* blpapi::ServiceRegistrationOptions::handle (  )  const
int blpapi::ServiceRegistrationOptions::getGroupId ( char *  groupId,
int *  groupIdLength 
) const

Copy the previously specified groupId at the memory location specified by groupId and the set the size of the groupId returned at groupIdLength. A Non-zero value indicates an error. The behavior is undefined if there is not enough space to copy the group Id to the specified buffer. Note that the groupId is not null terminated and buffer for groupId needs to be at most MAX_GROUP_ID_SIZE.

int blpapi::ServiceRegistrationOptions::getServicePriority (  )  const

Return the value of the service priority in this ServiceRegistrationOptions instance.

int blpapi::ServiceRegistrationOptions::getPartsToRegister (  )  const

Return the parts of the service to be registered. See RegistrationParts, above for additional details.


The documentation for this class was generated from the following file: