Botan 3.6.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 173 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 175 of file tpm2_session.h.

177 :
178 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 180 of file tpm2_session.h.

180 {
181 if(m_sessions[i] == nullptr) {
182 return {};
183 } else {
184 return m_sessions[i]->handle();
185 }
186 }

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