EmlaLockSafe
views::UpdateCertificatesView Class Reference

View displayed while updating the certificates. More...

#include <UpdateCertificatesView.h>

Inheritance diagram for views::UpdateCertificatesView:

Public Member Functions

 UpdateCertificatesView (LiquidCrystal_PCF8574 *display, WiFiClientSecure &sslClient, BearSSL::CertStore &certStore)
 Construct a vie object. More...
 
 UpdateCertificatesView (const UpdateCertificatesView &other)=delete
 Copy constructor - not available. More...
 
 UpdateCertificatesView (UpdateCertificatesView &&other) noexcept=delete
 Move constructor - not available. More...
 
int begin ()
 
virtual void tick (const bool &forceRedraw)
 called during the loop function More...
 

Protected Member Functions

virtual void activate ()
 called as soon as the view becomes active More...
 
void waitAnimation (std::function< bool()> stillActive)
 Shows the animation while waiting until the callback returns false. More...
 
bool initializeConnection (const String &host, const String &url)
 
bool downloadCertificatesAsCsv ()
 
bool goToStartOfNextCertificate (File &certsCsv)
 
bool convertCertificate (File &certsCsv, File &certsAr)
 

Protected Attributes

WiFiClientSecure & sslClient
 Reference of the ssl client used for the communication. More...
 
BearSSL::CertStore certStore
 Reference of the certificate store. More...
 
String lastErrorMessage
 
int numberOfLoadedCertificates
 
uint16_t certificateCounter = 0
 

Detailed Description

View displayed while updating the certificates.

Constructor & Destructor Documentation

◆ UpdateCertificatesView() [1/3]

views::UpdateCertificatesView::UpdateCertificatesView ( LiquidCrystal_PCF8574 *  display,
WiFiClientSecure &  sslClient,
BearSSL::CertStore &  certStore 
)
inline

Construct a vie object.

Parameters
displaypointer to the LCD instance
sslClientreference of the ssl client used for the communication
certStorereference of the certificate store

◆ UpdateCertificatesView() [2/3]

views::UpdateCertificatesView::UpdateCertificatesView ( const UpdateCertificatesView other)
delete

Copy constructor - not available.

◆ UpdateCertificatesView() [3/3]

views::UpdateCertificatesView::UpdateCertificatesView ( UpdateCertificatesView &&  other)
deletenoexcept

Move constructor - not available.

Member Function Documentation

◆ activate()

virtual void views::UpdateCertificatesView::activate ( )
inlineprotectedvirtual

called as soon as the view becomes active

◆ begin()

int views::UpdateCertificatesView::begin ( )
inline

◆ convertCertificate()

bool views::UpdateCertificatesView::convertCertificate ( File &  certsCsv,
File &  certsAr 
)
inlineprotected

◆ downloadCertificatesAsCsv()

bool views::UpdateCertificatesView::downloadCertificatesAsCsv ( )
inlineprotected

◆ goToStartOfNextCertificate()

bool views::UpdateCertificatesView::goToStartOfNextCertificate ( File &  certsCsv)
inlineprotected

◆ initializeConnection()

bool views::UpdateCertificatesView::initializeConnection ( const String &  host,
const String &  url 
)
inlineprotected

◆ tick()

virtual void views::UpdateCertificatesView::tick ( const bool &  forceRedraw)
inlinevirtual

called during the loop function

Parameters
forceRedrawif true everything should be redrawn

◆ waitAnimation()

void views::UpdateCertificatesView::waitAnimation ( std::function< bool()>  stillActive)
inlineprotected

Shows the animation while waiting until the callback returns false.

Parameters
stillActivecallback function checking if the animation should be shown

Member Data Documentation

◆ certificateCounter

uint16_t views::UpdateCertificatesView::certificateCounter = 0
protected

◆ certStore

BearSSL::CertStore views::UpdateCertificatesView::certStore
protected

Reference of the certificate store.

◆ lastErrorMessage

String views::UpdateCertificatesView::lastErrorMessage
protected

◆ numberOfLoadedCertificates

int views::UpdateCertificatesView::numberOfLoadedCertificates
protected

◆ sslClient

WiFiClientSecure& views::UpdateCertificatesView::sslClient
protected

Reference of the ssl client used for the communication.


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