.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "MONGOC_URI_GET_MECHANISM_PROPERTIES" "3" "May 07, 2024" "1.27.1" "libmongoc" .SH SYNOPSIS .INDENT 0.0 .INDENT 3.5 .sp .EX bool mongoc_uri_get_mechanism_properties (const mongoc_uri_t *uri, bson_t *properties /* OUT */); .EE .UNINDENT .UNINDENT .SH PARAMETERS .INDENT 0.0 .IP \(bu 2 \fBuri\fP: A \fI\%mongoc_uri_t\fP\&. .IP \(bu 2 \fBproperties\fP: An uninitialized \fI\%bson_t\fP\&. .UNINDENT .SH DESCRIPTION .sp Fetches the \(dqauthMechanismProperties\(dq options set on this \fI\%mongoc_uri_t\fP\&. The out\-parameter \fBproperties\fP should be an uninitialized, stack\-allocated \fI\%bson_t\fP\&. It is statically initialized with \fI\%bson_init_static()\fP to point to the internal data of \fBuri\fP, so its contents must not be modified and it becomes invalid after \fBuri\fP is destroyed. .SH RETURNS .sp If no \(dqauthMechanismProperties\(dq have been set on \fBuri\fP, this functions returns false and \fBproperties\fP remains uninitialized. .SH EXAMPLE .INDENT 0.0 .INDENT 3.5 .sp .EX mongoc_uri_t *uri; bson_t props; uri = mongoc_uri_new ( \(dqmongodb://user%40DOMAIN.COM:password@localhost/?authMechanism=GSSAPI\(dq \(dq&authMechanismProperties=SERVICE_NAME:other,CANONICALIZE_HOST_NAME:true\(dq); if (mongoc_uri_get_mechanism_properties (uri, &props)) { char *json = bson_as_canonical_extended_json (&props, NULL); printf (\(dq%s\en\(dq, json); bson_free (json); } else { printf (\(dqNo authMechanismProperties.\en\(dq); } .EE .UNINDENT .UNINDENT .sp This code produces the output: .INDENT 0.0 .INDENT 3.5 .sp .EX { \(dqSERVICE_NAME\(dq : \(dqother\(dq, \(dqCANONICALIZE_HOST_NAME\(dq : \(dqtrue\(dq } .EE .UNINDENT .UNINDENT .SH AUTHOR MongoDB, Inc .SH COPYRIGHT 2017-present, MongoDB, Inc .\" Generated by docutils manpage writer. .