ui_context: Merge with ui_context_tls_tunnel

Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
2020-02-04 11:18:06 +01:00
parent bef455e5a6
commit c40f71462f
10 changed files with 13 additions and 201 deletions

View File

@@ -38,6 +38,7 @@ eap::ui_context::ui_context(_In_ config_connection &cfg, _In_ credentials_connec
eap::ui_context::ui_context(_In_ const ui_context &other) :
m_cfg (other.m_cfg ),
m_cred (other.m_cred),
m_data (other.m_data),
packable(other )
{
}
@@ -46,6 +47,7 @@ eap::ui_context::ui_context(_In_ const ui_context &other) :
eap::ui_context::ui_context(_Inout_ ui_context &&other) noexcept :
m_cfg ( other.m_cfg ),
m_cred ( other.m_cred ),
m_data (std::move(other.m_data)),
packable(std::move(other ))
{
}
@@ -57,6 +59,7 @@ eap::ui_context& eap::ui_context::operator=(_In_ const ui_context &other)
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Copy context within same configuration only!
assert(std::addressof(m_cred) == std::addressof(other.m_cred)); // Copy context within same credentials only!
(packable&)*this = other;
m_data = other.m_data;
}
return *this;
@@ -69,6 +72,7 @@ eap::ui_context& eap::ui_context::operator=(_Inout_ ui_context &&other) noexcept
assert(std::addressof(m_cfg ) == std::addressof(other.m_cfg )); // Move context within same configuration only!
assert(std::addressof(m_cred) == std::addressof(other.m_cred)); // Move context within same credentials only!
(packable&)*this = std::move(other);
m_data = std::move(other.m_data);
}
return *this;
@@ -80,6 +84,7 @@ void eap::ui_context::operator<<(_Inout_ cursor_out &cursor) const
packable::operator<<(cursor);
cursor << m_cfg ;
cursor << m_cred;
cursor << m_data;
}
@@ -88,7 +93,8 @@ size_t eap::ui_context::get_pk_size() const
return
packable::get_pk_size() +
pksizeof(m_cfg ) +
pksizeof(m_cred);
pksizeof(m_cred) +
pksizeof(m_data);
}
@@ -97,4 +103,5 @@ void eap::ui_context::operator>>(_Inout_ cursor_in &cursor)
packable::operator>>(cursor);
cursor >> m_cfg ;
cursor >> m_cred;
cursor >> m_data;
}