Virgil Security C++ SDK
Public Member Functions | List of all members
virgil::sdk::cards::Card Class Reference

Class representing Virgil Card. More...

#include <Card.h>

Public Member Functions

 Card (std::string identifier, std::string identity, crypto::keys::PublicKey publicKey, std::string version, std::time_t createdAt, VirgilByteArray contentSnapshot, bool isOutdated=false, std::vector< cards::CardSignature > signatures=std::vector< cards::CardSignature >(), std::string previousCardId=std::string(), std::shared_ptr< Card > previousCard=nullptr)
 Contructor. More...
 
const std::string & identifier () const
 Getter. More...
 
const std::string & identity () const
 Getter. More...
 
const crypto::keys::PublicKeypublicKey () const
 Getter. More...
 
const std::string & version () const
 Getter. More...
 
std::time_t createdAt () const
 Getter. More...
 
const VirgilByteArray & contentSnapshot () const
 Getter. More...
 
bool isOutdated () const
 Getter. More...
 
const std::string & previousCardId () const
 Getter. More...
 
const std::shared_ptr< Card > & previousCard () const
 Getter. More...
 
const std::vector< cards::CardSignature > & signatures () const
 Getter. More...
 
void isOutdated (bool newIsOutdated)
 Setter. More...
 
void previousCardId (const std::string &newPreviousCardId)
 Setter. More...
 
void previousCard (const std::shared_ptr< Card > &newPreviousCard)
 Setter. More...
 
client::models::RawSignedModel getRawCard () const
 Builds RawSignedModel representing Card. More...
 

Detailed Description

Class representing Virgil Card.

Constructor & Destructor Documentation

virgil::sdk::cards::Card::Card ( std::string  identifier,
std::string  identity,
crypto::keys::PublicKey  publicKey,
std::string  version,
std::time_t  createdAt,
VirgilByteArray  contentSnapshot,
bool  isOutdated = false,
std::vector< cards::CardSignature signatures = std::vector< cards::CardSignature >(),
std::string  previousCardId = std::string(),
std::shared_ptr< Card previousCard = nullptr 
)

Contructor.

Parameters
identifieridentifier of Virgil Card. Must be unique
identityidentity of Virgil Card
publicKeyPublic Key of Virgil Card
versionversion of Virgil Card
createdAtstd::time with creation date of Virgil Card
contentSnapshotVirgilByteArray with snapshot of corresponding RawCardContent
isOutdatedtrue if Virgil Card is outdated, false otherwise
signaturesstd::vector with CardSignatures of Virgil Card
previousCardIdidentifier of outdated previous Virgil Card with same identity
previousCardstd::shared_ptr to previous Virgil Card instance

Member Function Documentation

const VirgilByteArray& virgil::sdk::cards::Card::contentSnapshot ( ) const

Getter.

Returns
VirgilByteArray with snapshot of corresponding RawCardContent
std::time_t virgil::sdk::cards::Card::createdAt ( ) const

Getter.

Returns
std::time with creation date of Virgil Card
client::models::RawSignedModel virgil::sdk::cards::Card::getRawCard ( ) const

Builds RawSignedModel representing Card.

Returns
RawSignedModel representing Card
const std::string& virgil::sdk::cards::Card::identifier ( ) const

Getter.

Returns
identifier of Virgil Card
const std::string& virgil::sdk::cards::Card::identity ( ) const

Getter.

Returns
identity of Virgil Card
bool virgil::sdk::cards::Card::isOutdated ( ) const

Getter.

Returns
true if Virgil Card is outdated, false otherwise
void virgil::sdk::cards::Card::isOutdated ( bool  newIsOutdated)

Setter.

Parameters
newIsOutdatedbool isOutdated to be set
const std::shared_ptr<Card>& virgil::sdk::cards::Card::previousCard ( ) const

Getter.

Returns
std::shared_ptr to previous Virgil Card instance
void virgil::sdk::cards::Card::previousCard ( const std::shared_ptr< Card > &  newPreviousCard)

Setter.

Parameters
newPreviousCardpreviousCard to be set
const std::string& virgil::sdk::cards::Card::previousCardId ( ) const

Getter.

Returns
identifier of outdated previous Virgil Card with same identity
void virgil::sdk::cards::Card::previousCardId ( const std::string &  newPreviousCardId)

Setter.

Parameters
newPreviousCardIdstd::string previousCardId to be set
const crypto::keys::PublicKey& virgil::sdk::cards::Card::publicKey ( ) const

Getter.

Returns
Public Key of Virgil Card
const std::vector<cards::CardSignature>& virgil::sdk::cards::Card::signatures ( ) const

Getter.

Returns
std::vector with CardSignatures of Virgil Card
const std::string& virgil::sdk::cards::Card::version ( ) const

Getter.

Returns
version of Virgil Card

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