.\" This manpage is Copyright (C) 2016 MongoDB, Inc. .\" .\" Permission is granted to copy, distribute and/or modify this document .\" under the terms of the GNU Free Documentation License, Version 1.3 .\" or any later version published by the Free Software Foundation; .\" with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. .\" A copy of the license is included in the section entitled "GNU .\" Free Documentation License". .\" .TH "BSON_ITER_BINARY" "3" "2016\(hy10\(hy12" "libbson" .SH NAME bson_iter_binary() \- This function shall return the binary data of a BSON_TYPE_BINARY element. It is a programming error to call this function on a field that is not of type BSON_TYPE_BINARY. You can check this with the BSON_ITER_HOLDS_BINARY() macro or bson_iter_type(). .SH "SYNOPSIS" .nf .nf #define BSON_ITER_HOLDS_BINARY(iter) \e (bson_iter_type ((iter)) == BSON_TYPE_BINARY) void bson_iter_binary (const bson_iter_t *iter, bson_subtype_t *subtype, uint32_t *binary_len, const uint8_t **binary); .fi .fi .SH "PARAMETERS" .TP .B iter A .B bson_iter_t . .LP .TP .B subtype A location for a .B bson_subtype_t or NULL. .LP .TP .B binary_len A location for the length of .B binary . .LP .TP .B binary A location for a pointer to the immutable buffer. .LP .SH "DESCRIPTION" This function shall return the binary data of a BSON_TYPE_BINARY element. It is a programming error to call this function on a field that is not of type BSON_TYPE_BINARY. You can check this with the BSON_ITER_HOLDS_BINARY() macro or .B bson_iter_type(3) . The buffer that .B binary points to is only valid until the iterator's .B bson_t is modified or freed. .B .SH COLOPHON This page is part of libbson. Please report any bugs at https://jira.mongodb.org/browse/CDRIVER.