void amqp::Sender::_serializeMessageMeta(pn_data_t *pndata, std::shared_ptr<amqp::IAMQPData> const &data) { switch (data->getDataType()) { case IAMQPData::AMQP_STRING: pn_data_put_string(pndata, (std::dynamic_pointer_cast<AMQPString const>(data))->getString()); break; case IAMQPData::AMQP_SYMBOL: pn_data_put_symbol(pndata, (std::dynamic_pointer_cast<AMQPSymbol const>(data))->getSymbol()); break; case IAMQPData::AMQP_UUID: pn_data_put_uuid(pndata, (std::dynamic_pointer_cast<AMQPuuid const>(data))->getUUID()); break; default: throw std::exception("ERROR: wrong data type"); } }
void qdr_terminus_add_capability(qdr_terminus_t *term, const char *capability) { pn_data_put_symbol(term->capabilities, pn_bytes(strlen(capability), capability)); }