GEANTLink/lib/TTLS/include/UIContext.h
2020-02-07 13:08:28 +01:00

97 lines
2.6 KiB
C++

/*
Copyright 2015-2020 Amebis
Copyright 2016-2017 GÉANT
This file is part of GÉANTLink.
GÉANTLink is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
GÉANTLink is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GÉANTLink. If not, see <http://www.gnu.org/licenses/>.
*/
namespace eap
{
class ui_context_tls_tunnel;
}
#pragma once
#include "TTLS.h"
#include "../../EAPBase/include/UIContext.h"
namespace eap
{
/// \addtogroup EAPBaseUICtx
/// @{
///
/// TLS tunnel UI context
///
class ui_context_tls_tunnel : public ui_context
{
public:
///
/// Constructs context
///
/// \param[in] cfg Connection configuration
/// \param[in] cred Connection credentials
///
ui_context_tls_tunnel(_In_ config_connection &cfg, _In_ credentials_connection &cred);
///
/// Copies context
///
/// \param[in] other Credentials to copy from
///
ui_context_tls_tunnel(_In_ const ui_context_tls_tunnel &other);
///
/// Moves context
///
/// \param[in] other Credentials to move from
///
ui_context_tls_tunnel(_Inout_ ui_context_tls_tunnel &&other) noexcept;
///
/// Copies context
///
/// \param[in] other Credentials to copy from
///
/// \returns Reference to this object
///
ui_context_tls_tunnel& operator=(_In_ const ui_context_tls_tunnel &other);
///
/// Moves context
///
/// \param[in] other Configuration to move from
///
/// \returns Reference to this object
///
ui_context_tls_tunnel& operator=(_Inout_ ui_context_tls_tunnel &&other) noexcept;
/// \name BLOB management
/// @{
virtual void operator<<(_Inout_ cursor_out &cursor) const;
virtual size_t get_pk_size() const;
virtual void operator>>(_Inout_ cursor_in &cursor);
/// @}
public:
sanitizing_blob m_data; ///< Context data
};
/// @}
}