Botan 3.9.0
Crypto and TLS for C&
Botan::TPM2::SessionBundle Class Reference

#include <tpm2_session.h>

Public Member Functions

detail::SessionHandle operator[] (size_t i) const noexcept
 SessionBundle (std::shared_ptr< Session > s1=nullptr, std::shared_ptr< Session > s2=nullptr, std::shared_ptr< Session > s3=nullptr)

Detailed Description

This bundles up to three sessions into a single object to be used in a single TSS2 library function call to simplify passing the sessions around internally.

Definition at line 166 of file tpm2_session.h.

Constructor & Destructor Documentation

◆ SessionBundle()

Botan::TPM2::SessionBundle::SessionBundle ( std::shared_ptr< Session > s1 = nullptr,
std::shared_ptr< Session > s2 = nullptr,
std::shared_ptr< Session > s3 = nullptr )
inline

Definition at line 169 of file tpm2_session.h.

171 :
172 m_sessions({std::move(s1), std::move(s2), std::move(s3)}) {}

Member Function Documentation

◆ operator[]()

detail::SessionHandle Botan::TPM2::SessionBundle::operator[] ( size_t i) const
inlinenodiscardnoexcept

Definition at line 174 of file tpm2_session.h.

174 {
175 if(m_sessions[i] == nullptr) {
176 return {};
177 } else {
178 return m_sessions[i]->handle();
179 }
180 }

The documentation for this class was generated from the following file: