This is an automated email from the ASF dual-hosted git repository. tross pushed a commit to branch dev-protocol-adaptors in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
commit 7cb6c07035216060ac48063a66a9e7c87bf6362a Author: Ted Ross <tr...@apache.org> AuthorDate: Tue Jun 9 13:18:45 2020 -0400 Dataplane: Added API for streaming data out of messages. This commit adds the requirement for Proton raw-connection support. --- include/qpid/dispatch/message.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/include/qpid/dispatch/message.h b/include/qpid/dispatch/message.h index 1a7bce2..e16d780 100644 --- a/include/qpid/dispatch/message.h +++ b/include/qpid/dispatch/message.h @@ -26,6 +26,7 @@ #include <qpid/dispatch/parse.h> #include <qpid/dispatch/container.h> #include <qpid/dispatch/log.h> +#include <proton/raw_connection.h> /**@file * Message representation. @@ -305,6 +306,34 @@ void qd_message_compose_5(qd_message_t *msg, int qd_message_extend(qd_message_t *msg, qd_buffer_list_t *buffers); +/** + * qd_message_read_body + * + * Populate Proton raw buffers from the body section in a streaming fashion (i.e. repeated + * invocations yield new seqments of the content stream). The buffers will be left in place + * in the message until they are explicitly released. + * + * @param msg Pointer to a message + * @param buffers An array of raw-buffer descriptors to be written + * @param buffer_count The number of descriptors supplied in buffers + * @return The number of raw buffers written. + */ +int qd_message_read_body(qd_message_t *msg, pn_raw_buffer_t *buffers, int buffer_count); + + +/** + * qd_message_release_body + * + * Release buffers that were aliased by Proton raw buffers. The buffers in the message that + * have been fully read will have their reference counts decreased so they may be freed + * + * @param msg Pointer to a message + * @param buffers An array of raw-buffer descriptors previously returned by qd_message_read_body + * @param buffer_count The number of descriptors in the array that contained data + */ +void qd_message_release_body(qd_message_t *msg, pn_raw_buffer_t *buffers, int buffer_count); + + /** Put string representation of a message suitable for logging in buffer. * @return buffer */ --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org