28 #ifndef INCLUDED_BLPAPI_TESTUTIL 29 #define INCLUDED_BLPAPI_TESTUTIL 188 const blpapi_CorrelationId_t *correlationIds,
189 size_t numCorrelationIds);
276 const blpapi_CorrelationId_t *correlationIds,
277 size_t correlationIdCount);
288 const std::vector<CorrelationId>& correlationIds);
406 const Name& messageName);
439 std::getline(stream, schema,
'\0');
443 schema.c_str(), schema.length(), &buffer));
448 std::ostream& stream,
const Service& service)
460 &formatter, event.
impl(), elementDef.
impl(), properties.
handle()));
469 &topic, service.
handle(), isActive));
474 const Name& messageName)
479 &definition, messageName.
impl()));
492 &d_handle_p, original.
handle()));
499 d_handle_p, rhs.
handle()));
518 d_handle_p, &cid.impl(), 1));
523 const std::vector<CorrelationId>& cids)
525 assert(!cids.empty());
529 d_handle_p, &cids[0].impl(), cids.size()));
534 const blpapi_CorrelationId_t *correlationIds,
535 size_t correlationIdCount)
539 d_handle_p, correlationIds, correlationIdCount));
548 static_cast<int>(recapType),
549 static_cast<int>(fragmentType)));
566 d_handle_p, service.
handle()));
571 const char *requestId)
588 #endif // #ifdef __cplusplus 589 #endif // #ifndef INCLUDED_BLPAPI_TESTUTIL int blpapi_MessageProperties_setRecapType(blpapi_MessageProperties_t *messageProperties, int recap, int fragment)
int blpapi_TestUtil_deserializeService(const char *schema, size_t schemaLength, blpapi_Service_t **service)
Definition: blpapi_testutil.h:241
MessageProperties & setCorrelationIds(const blpapi_CorrelationId_t *correlationIds, size_t correlationIdCount)
Definition: blpapi_testutil.h:533
message is not fragmented
Definition: blpapi_message.h:171
MessageProperties()
Definition: blpapi_testutil.h:483
Common definitions used by the library.
struct blpapi_Event blpapi_Event_t
Definition: blpapi_types.h:139
MessageProperties & setTimeReceived(const Datetime &timeReceived)
Definition: blpapi_testutil.h:553
MessageProperties & setRecapType(Message::RecapType::Type recapType, Message::Fragment fragmentType=Message::FRAGMENT_NONE)
Definition: blpapi_testutil.h:543
Represents a date and/or time.
Type
Definition: blpapi_message.h:195
test::TestUtil TestUtil
Definition: blpapi_testutil.h:583
Definition: blpapi_abstractsession.h:220
Definition: blpapi_name.h:150
#define BLPAPI_CALL(FUNCNAME)
Definition: blpapi_call.h:353
Definition: blpapi_service.h:304
int blpapi_TestUtil_getAdminMessageDefinition(blpapi_SchemaElementDefinition_t **definition, blpapi_Name_t *messageName)
int blpapi_MessageProperties_create(blpapi_MessageProperties_t **messageProperties)
Definition: blpapi_service.h:313
blpapi_Name_t * impl() const
Definition: blpapi_name.h:403
int blpapi_TestUtil_createTopic(blpapi_Topic_t **topic, const blpapi_Service_t *service, int isActive)
struct blpapi_Name blpapi_Name_t
Definition: blpapi_types.h:154
static Service deserializeService(std::istream &stream)
Definition: blpapi_testutil.h:432
blpapi_Service_t * handle() const
Definition: blpapi_service.h:706
Definition: blpapi_schema.h:327
int(* blpapi_StreamWriter_t)(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:53
A service which provides access to API data (provide or consume).
struct blpapi_Topic blpapi_Topic_t
Definition: blpapi_topic.h:68
A component which defines events related operations.
Provide a key to identify individual subscriptions or requests.
EventType
The possible types of event.
Definition: blpapi_event.h:202
test::MessageProperties MessageProperties
Definition: blpapi_testutil.h:354
struct blpapi_SchemaElementDefinition blpapi_SchemaElementDefinition_t
Definition: blpapi_types.h:191
static void throwOnError(int errorCode)
Definition: blpapi_exception.h:526
static void serializeService(std::ostream &stream, const Service &service)
Definition: blpapi_testutil.h:447
~MessageProperties()
Definition: blpapi_testutil.h:503
MessageProperties & setService(const Service &service)
Definition: blpapi_testutil.h:562
int blpapi_TestUtil_serializeService(blpapi_StreamWriter_t streamWriter, void *stream, const blpapi_Service_t *service)
int blpapi_MessageProperties_setTimeReceived(blpapi_MessageProperties_t *messageProperties, const blpapi_HighPrecisionDatetime_t *timestamp)
Definition: blpapi_correlationid.h:201
Provide representation of a Topic.
blpapi_MessageProperties_t * handle() const
Definition: blpapi_testutil.h:508
struct blpapi_MessageProperties blpapi_MessageProperties_t
Definition: blpapi_types.h:200
int blpapi_MessageProperties_assign(blpapi_MessageProperties_t *lhs, const blpapi_MessageProperties_t *rhs)
int blpapi_MessageProperties_copy(blpapi_MessageProperties_t **dest, const blpapi_MessageProperties_t *src)
static SchemaElementDefinition getAdminMessageDefinition(const Name &messageName)
Definition: blpapi_testutil.h:473
int blpapi_TestUtil_appendMessage(blpapi_MessageFormatter_t **formatter, blpapi_Event_t *event, const blpapi_SchemaElementDefinition_t *messageType, const blpapi_MessageProperties_t *properties)
blpapi_HighPrecisionDatetime_t & rawHighPrecisionValue()
Definition: blpapi_datetime.h:1954
A signature for callback on print and default C++ implementation.
Definition: blpapi_topic.h:114
Fragment
Definition: blpapi_message.h:169
blpapi_SchemaElementDefinition_t * impl() const
Definition: blpapi_schema.h:744
Definition: blpapi_event.h:196
static Topic createTopic(const Service &service, bool isActive=true)
Definition: blpapi_testutil.h:465
#define BLPAPI_CALL_UNCHECKED(FUNCNAME)
Definition: blpapi_call.h:354
int blpapi_TestUtil_createEvent(blpapi_Event_t **event, int eventType)
static int writeToStream(const char *data, int length, void *stream)
Definition: blpapi_streamproxy.h:93
MessageProperties & operator=(const MessageProperties &rhs)
Definition: blpapi_testutil.h:495
MessageProperties & setCorrelationId(const CorrelationId &correlationId)
Definition: blpapi_testutil.h:513
struct blpapi_MessageFormatter blpapi_MessageFormatter_t
Definition: blpapi_types.h:197
#define BLPAPI_EXPORT
Definition: blpapi_defs.h:171
struct blpapi_Service blpapi_Service_t
Definition: blpapi_types.h:166
static Event createEvent(Event::EventType eventType)
Definition: blpapi_testutil.h:424
void blpapi_MessageProperties_destroy(blpapi_MessageProperties_t *messageProperties)
Definition: blpapi_testutil.h:345
Definition: blpapi_datetime.h:245
int blpapi_MessageProperties_setService(blpapi_MessageProperties_t *messageProperties, const blpapi_Service_t *service)
int blpapi_MessageProperties_setCorrelationIds(blpapi_MessageProperties_t *messageProperties, const blpapi_CorrelationId_t *correlationIds, size_t numCorrelationIds)
blpapi_Event_t * impl() const
Definition: blpapi_event.h:550
MessageProperties & setRequestId(const char *requestId)
Definition: blpapi_testutil.h:570
static MessageFormatter appendMessage(Event &event, const SchemaElementDefinition &elementDef, const MessageProperties &properties=MessageProperties())
Definition: blpapi_testutil.h:454
Definition: blpapi_datetime.h:115
int blpapi_MessageProperties_setRequestId(blpapi_MessageProperties_t *messageProperties, const char *requestId)