Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

CTSuperBlock Class Reference

#include <ctfilesystem2.h>

List of all members.

Public Member Functions

Constructors and destructors
 CTSuperBlock ()
 CTSuperBlock (const string &block)
 CTSuperBlock (unsigned int mediumSize)
 ~CTSuperBlock ()
General information about the medium
const string mediumName () const
int mediumSize ()
unsigned char versionMajor () const
unsigned char versionMinor () const
bool isCrypted () const
bool isReadOnly () const
Structural information
int blockSize () const
int blocks () const
Internal information
These methods are not part of the API an may therefore change or even disappear in future versions.

int reservedBlocks () const
int firstDirBlock () const
const string userName () const
bool changed () const
Internal setters
void setMediumName (const string &n)
void setBlockSize (int n)
void setBlocks (int n)
void setReservedBlocks (int i)
void setMediumSize (int n)
void setVersion (int mj, int mn)
void setIsCrypted (bool b)
void setIsReadOnly (bool b)
void setFirstDirBlock (int i)
void setUserName (const string &n)
void setChanged (bool b)
Internal conversion operations
string toString ()
string dump ()


Detailed Description

This class represents a super block and therefore describes the file system on a card. It contains information such as the used block size, the capacity of the card and so on.
Author:
Martin Preuss<martin@libchipcard.de>


Constructor & Destructor Documentation

CTSuperBlock::CTSuperBlock  ) 
 

CTSuperBlock::CTSuperBlock const string &  block  ) 
 

CTSuperBlock::CTSuperBlock unsigned int  mediumSize  ) 
 

CTSuperBlock::~CTSuperBlock  ) 
 


Member Function Documentation

int CTSuperBlock::blocks  )  const [inline]
 

Returns the number of data blocks on this card. You can use this and the value of blockSize() to determine the for data storage usable capacity of the card.

int CTSuperBlock::blockSize  )  const [inline]
 

Returns the size of a data block in bytes. You can use this and the value of blocks() to determine the for data storage usable capacity of the card.

bool CTSuperBlock::changed  )  const [inline]
 

string CTSuperBlock::dump  ) 
 

int CTSuperBlock::firstDirBlock  )  const [inline]
 

bool CTSuperBlock::isCrypted  )  const [inline]
 

Tells whether the data on the card is encrypted.

bool CTSuperBlock::isReadOnly  )  const [inline]
 

Tells whether the data on the card should be protected against writing.

Todo:
I must implement this feature.

const string CTSuperBlock::mediumName  )  const [inline]
 

Returns the name you assigned to the card. To protect yourself against acidental data losses you should keeps the names of your card unique !

int CTSuperBlock::mediumSize  )  [inline]
 

Returns the capacity of the card. This value does not represent the capacity for data storage, since the file system occupies a part of the memory for management purposes.

int CTSuperBlock::reservedBlocks  )  const [inline]
 

void CTSuperBlock::setBlocks int  n  )  [inline]
 

void CTSuperBlock::setBlockSize int  n  )  [inline]
 

void CTSuperBlock::setChanged bool  b  )  [inline]
 

void CTSuperBlock::setFirstDirBlock int  i  )  [inline]
 

void CTSuperBlock::setIsCrypted bool  b  )  [inline]
 

void CTSuperBlock::setIsReadOnly bool  b  )  [inline]
 

void CTSuperBlock::setMediumName const string &  n  )  [inline]
 

void CTSuperBlock::setMediumSize int  n  )  [inline]
 

void CTSuperBlock::setReservedBlocks int  i  )  [inline]
 

void CTSuperBlock::setUserName const string &  n  )  [inline]
 

void CTSuperBlock::setVersion int  mj,
int  mn
[inline]
 

string CTSuperBlock::toString  ) 
 

const string CTSuperBlock::userName  )  const [inline]
 

unsigned char CTSuperBlock::versionMajor  )  const [inline]
 

Returns the major version of the file system on the card. The file system library will refuse to mount a medium whose major version does not math that of the library.

unsigned char CTSuperBlock::versionMinor  )  const [inline]
 

Returns the minor version of the file system on the card. It may differ from that of the library.

Todo:
When the minor version of the ard is higher than that of the library we should mount the medium readonly !


The documentation for this class was generated from the following file:
Generated on Wed Jul 28 14:56:50 2004 for libchipcard by doxygen 1.3.7