|
tdslite latest
C++ API reference
|
login_context login helper class More...
#include <tdslite/detail/tdsl_login_context.hpp>
Classes | |
| struct | login_parameters_type |
| The arguments for the login operation. More... | |
Public Types | |
| enum class | e_tds_login_parameter_idx : tdsl::uint8_t { begin = 0 , client_name = begin , user_name = 1 , password = 2 , app_name = 3 , server_name = 4 , unused = 5 , library_name = 6 , locale = 7 , database_name = 8 , client_id = 9 , sspi = 10 , atchdbfile = 11 , end } |
| enum class | e_login_status : tdsl::int8_t { success = 0 , failure = -1 } |
| using | tds_context_type = tds_context< NetImpl > |
| using | self_type = login_context< NetImpl > |
| using | login_parameters = login_parameters_type< string_view > |
| Login parameters (ASCII) | |
| using | pmem_login_parameters = login_parameters_type< progmem_string_view > |
| Login parameters (ASCII, PROGMEM) | |
| using | wlogin_parameters = login_parameters_type< wstring_view > |
| Login parameters (wide-character) | |
Public Member Functions | |
| login_context (tds_context_type &tc) noexcept | |
| Construct a new login context object. | |
| ~login_context () noexcept | |
| Unregister the LOGINACK callback, so that tds_context does not keep a dangling pointer to this object. | |
| login_context (const login_context &)=delete | |
| login_context & | operator= (const login_context &)=delete |
| template<typename LoginParamsType > | |
| auto | do_login (const LoginParamsType ¶ms) noexcept -> e_login_status |
| Attempt to login into the database engine with the specified login parameters. | |
Static Public Member Functions | |
| static constexpr auto | calc_sizeof_offset_size_section () noexcept -> tdsl::uint16_t |
| static auto | encode_password (tdsl::uint8_t *buf, tdsl::uint32_t sz) noexcept -> void |
| Encode a password for TDS protocol. | |
| template<typename LoginParamsType > | |
| static bool | has_valid_string_lengths (const LoginParamsType ¶ms) noexcept |
| Check the LOGIN7 limits of the login strings (128 characters each) | |
login_context login helper class
This class prepares a login packet and performs login operation over a network connection established to the database engine.
| NetImpl | Network backend implementation to use |
(e.g. net_arduino_uipethernet, net_arduino_ethernet, net_boost_asio)
| using tdsl::detail::login_context< NetImpl >::tds_context_type = tds_context<NetImpl> |
| using tdsl::detail::login_context< NetImpl >::self_type = login_context<NetImpl> |
| using tdsl::detail::login_context< NetImpl >::login_parameters = login_parameters_type<string_view> |
Login parameters (ASCII)
| using tdsl::detail::login_context< NetImpl >::pmem_login_parameters = login_parameters_type<progmem_string_view> |
Login parameters (ASCII, PROGMEM)
| using tdsl::detail::login_context< NetImpl >::wlogin_parameters = login_parameters_type<wstring_view> |
Login parameters (wide-character)
|
strong |
|
strong |
|
inlinenoexcept |
Construct a new login context object.
| [in] | tc | The TDS context |
|
inlinenoexcept |
Unregister the LOGINACK callback, so that tds_context does not keep a dangling pointer to this object.
|
delete |
|
delete |
|
inlinestaticconstexprnoexcept |
|
inlinestaticnoexcept |
Encode a password for TDS protocol.
| [in] | buf | Buffer to encode |
|
inlinestaticnoexcept |
Check the LOGIN7 limits of the login strings (128 characters each)
|
inlinenoexcept |
Attempt to login into the database engine with the specified login parameters.
| [in] | params | Login parameters |