Keypop Calypso Card C++ API - 2.1.2
Component of the Keypop C++ API
keypop::calypso::card::card::FileHeader Class Referenceabstract

Calypso EF metadata. More...

#include <keypop/calypso/card/card/FileHeader.hpp>

Public Member Functions

virtual uint16_t getLid () const =0
 Gets the associated LID. More...
 
virtual const std::shared_ptr< uint8_t > & getDfStatus () const =0
 Gets the DF status. More...
 
virtual ElementaryFile::Type getEfType () const =0
 Gets the Elementary File type. More...
 
virtual int getRecordsNumber () const =0
 Gets the number of records : More...
 
virtual int getRecordSize () const =0
 Gets the size of a record : More...
 
virtual const std::vector< std::uint8_t > & getAccessConditions () const =0
 Gets a reference to the access conditions. More...
 
virtual const std::vector< std::uint8_t > & getKeyIndexes () const =0
 Gets a reference to the keys indexes. More...
 
virtual const std::shared_ptr< std::uint16_t > getSharedReference () const =0
 Gets the non-zero unique identifier of the shared data when the file data is shared. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const FileHeader &fh)
 Renders the header fields, so that a log shows the content and not the address of the object. More...
 
std::ostream & operator<< (std::ostream &os, const std::shared_ptr< FileHeader > &fh)
 

Detailed Description

Calypso EF metadata.

Since
1.0.0

Definition at line 32 of file FileHeader.hpp.

Member Function Documentation

◆ getAccessConditions()

virtual const std::vector< std::uint8_t > & keypop::calypso::card::card::FileHeader::getAccessConditions ( ) const
pure virtual

Gets a reference to the access conditions.

Returns
An empty array if the access conditions are not available (e.g. when the
FileHeader
is created following the response to a "Get Data" command with the GetDataTag::EF_LIST tag).
Since
1.0.0

◆ getDfStatus()

virtual const std::shared_ptr< uint8_t > & keypop::calypso::card::card::FileHeader::getDfStatus ( ) const
pure virtual

Gets the DF status.

Returns
Null if the status is not available (e.g. when the
FileHeader
is created following the response to a "Get Data" command with the GetDataTag::EF_LIST tag).
Since
1.0.0

◆ getEfType()

virtual ElementaryFile::Type keypop::calypso::card::card::FileHeader::getEfType ( ) const
pure virtual

Gets the Elementary File type.

Returns
A not null file type.
Since
1.0.0

◆ getKeyIndexes()

virtual const std::vector< std::uint8_t > & keypop::calypso::card::card::FileHeader::getKeyIndexes ( ) const
pure virtual

Gets a reference to the keys indexes.

Returns
An empty array if the key indexes are not available (e.g. when the
FileHeader
is created following the response to a "Get Data" command with the GetDataTag::EF_LIST tag).
Since
1.0.0

◆ getLid()

virtual uint16_t keypop::calypso::card::card::FileHeader::getLid ( ) const
pure virtual

Gets the associated LID.

Returns
The LID.
Since
1.0.0

◆ getRecordSize()

virtual int keypop::calypso::card::card::FileHeader::getRecordSize ( ) const
pure virtual

Gets the size of a record :

  • For a Counter file, the record size is the original size of the record #1.
    Extra bytes (rest of the division of the file size by 3) aren't accessible.
  • For a Binary file, the size of the record is corresponding to the file size.
Returns
The size of a record.
Since
1.0.0

◆ getRecordsNumber()

virtual int keypop::calypso::card::card::FileHeader::getRecordsNumber ( ) const
pure virtual

Gets the number of records :

  • For a Counter file, the number of records is always 1.
    Extra bytes (rest of the division of the file size by 3) aren't accessible.
  • For a Binary file, the number of records is always 1.
Returns
The number of records.
Since
1.0.0

◆ getSharedReference()

virtual const std::shared_ptr< std::uint16_t > keypop::calypso::card::card::FileHeader::getSharedReference ( ) const
pure virtual

Gets the non-zero unique identifier of the shared data when the file data is shared.

Returns
Zero if the file data is not shared or null if the information is not available (e.g. when the
FileHeader
is created following the response to a "Get Data" command with the GetDataTag::EF_LIST tag).
Since
1.0.0

Friends And Related Function Documentation

◆ operator<< [1/2]

std::ostream & operator<< ( std::ostream &  os,
const FileHeader &  fh 
)
friend

Renders the header fields, so that a log shows the content and not the address of the object.

Definition at line 124 of file FileHeader.hpp.

◆ operator<< [2/2]

std::ostream & operator<< ( std::ostream &  os,
const std::shared_ptr< FileHeader > &  fh 
)
friend

Definition at line 176 of file FileHeader.hpp.


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