MongoDB C++ Driver mongocxx-4.0.0
Loading...
Searching...
No Matches
client.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
17#include <string>
18
20
22
27
29
30namespace mongocxx {
31namespace v_noabi {
32namespace options {
33
34// NOTE: client options interface still evolving
35
39class client {
40 public:
55
67
76 ssl_opts() const;
77
83 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<tls>&) tls_opts() const;
84
96
103 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<auto_encryption>&)
105
117
123 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<apm>&) apm_opts() const;
124
136
144 MONGOCXX_ABI_EXPORT_CDECL(const bsoncxx::v_noabi::stdx::optional<server_api>&)
146
147 private:
148 bsoncxx::v_noabi::stdx::optional<tls> _tls_opts;
149 bsoncxx::v_noabi::stdx::optional<apm> _apm_opts;
150 bsoncxx::v_noabi::stdx::optional<auto_encryption> _auto_encrypt_opts;
151 bsoncxx::v_noabi::stdx::optional<server_api> _server_api_opts;
152};
153
154} // namespace options
155} // namespace v_noabi
156} // namespace mongocxx
157
158#include <mongocxx/config/postlude.hpp>
159
Provides mongocxx::v_noabi::options::apm.
Provides mongocxx::v_noabi::options::auto_encryption.
A polyfill for std::optional<T>.
Definition optional.hpp:826
Class representing MongoDB application performance monitoring.
Definition apm.hpp:43
Class representing options for automatic client-side encryption.
Definition auto_encryption.hpp:35
Class representing the optional arguments to a MongoDB driver client object.
Definition client.hpp:39
const bsoncxx::v_noabi::stdx::optional< tls > & tls_opts() const
The current TLS-related options.
MONGOCXX_DEPRECATED const bsoncxx::v_noabi::stdx::optional< tls > & ssl_opts() const
The current SSL-related options.
const bsoncxx::v_noabi::stdx::optional< apm > & apm_opts() const
The current APM-related options.
const bsoncxx::v_noabi::stdx::optional< auto_encryption > & auto_encryption_opts() const
Gets the current automatic encryption options.
const bsoncxx::v_noabi::stdx::optional< server_api > & server_api_opts() const
Gets the current server API options or returns a disengaged optional if there are no server API optio...
client & tls_opts(tls tls_opts)
Sets the TLS-related options.
MONGOCXX_DEPRECATED client & ssl_opts(tls ssl_opts)
Sets the SSL-related options.
Class representing options for server API.
Definition server_api.hpp:38
Class representing the optional arguments to a MongoDB driver client (TLS)
Definition tls.hpp:33
#define MONGOCXX_DEPRECATED
Declares the associated entity as deprecated.
Definition fwd.hpp:212
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition fwd.hpp:204
The mongocxx macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
Provides std::optional-related polyfills for library API usage.
Declares mongocxx::v_noabi::options::client.
Provides mongocxx::v_noabi::options::server_api.
Provides mongocxx::v_noabi::options::tls.