#include <mw/mifareclassicaccessbits.h>
Link against: nfctagextension.lib
class CMifareClassicAccessBits : public CBase |
This class provides easy way to handle Mifare Classic access bits. Access bits are used to control accessibility of blocks on a Mifare Classic tag.
Detailed description of access conditions and bit combinations can be found from Mifare Standard Card Data sheets.
For Mifare Classic 1k, take reference from MF1ICS50 FS Sector 6.7 Memory access for access conditions. Table 3. describes access conditions for the sector trailer and Table 4. describes access conditions for data blocks.
For Mifare Classic 4k, take reference from MF1ICS70 FS Sector 6.7 Memory access for access conditions. Table 3. describes access conditions for the sector trailer and Table 4. describes access conditions for data blocks.
IMPORT_C MifareClassicCommon::TSectorTrailerAccessCondition | AccessConditionForSectorTrailer | ( | ) | const |
Gets access condition of sector trailer.
IMPORT_C void | Copy | ( | const CMifareClassicAccessBits & | aAccessBits | ) |
Copies data from specified CMifareClassicAccessBits to this CMifareClassicAccessBits by replacing any existing data.
Parameters | |
---|---|
aAccessBits | Which content is copied to this CMifareClassicAccessBits. |
IMPORT_C TInt | GetAccessConditionForDataBlock | ( | TUint8 | aBlockNumber, |
MifareClassicCommon::TDataBlockAccessCondition & | aAccessCondition | |||
) | const |
Gets access condition for specified data block.
Parameters | |
---|---|
aBlockNumber | Block number. |
aAccessCondition | Access condition. |
KErrArgument | if block number is greater than 2. |
KErrNone | if successful. |
IMPORT_C CMifareClassicAccessBits * | NewL | ( | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
IMPORT_C CMifareClassicAccessBits * | NewL | ( | const CMifareClassicAccessBits & | aAccessBits | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameters | |
---|---|
aAccessBits | Mifare classic access bits which are copied to this object. |
IMPORT_C CMifareClassicAccessBits * | NewL | ( | const TDesC8 & | aBuffer | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameters | |
---|---|
aBuffer | Descriptor which content will be copied to this object. |
IMPORT_C CMifareClassicAccessBits * | NewLC | ( | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
IMPORT_C CMifareClassicAccessBits * | NewLC | ( | const CMifareClassicAccessBits & | aAccessBits | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameters | |
---|---|
aAccessBits | Mifare classic access bits which are copied to this object. |
IMPORT_C CMifareClassicAccessBits * | NewLC | ( | const TDesC8 & | aBuffer | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameters | |
---|---|
aBuffer | Descriptor which content will be copied to this object. |
IMPORT_C TInt | SetAccessConditionForDataBlock | ( | TUint8 | aBlockNumber, |
MifareClassicCommon::TDataBlockAccessCondition | aAccessCondition | |||
) |
Sets access condition for specified data block.
Parameters | |
---|---|
aBlockNumber | Block number. |
aAccessCondition | Access condition. |
KErrArgument | if block number is greater than 2. |
KErrNone | if successful. |
IMPORT_C void | SetAccessConditionForSectorTrailer | ( | MifareClassicCommon::TSectorTrailerAccessCondition | aAccessCondition | ) |
Sets access condition for sector trailer.
Parameters | |
---|---|
aAccessCondition | Access condition. |
IMPORT_C TBool | operator!= | ( | const CMifareClassicAccessBits & | aAccessBits | ) | const |
Determines whether this CMifareClassicAccessBits is not equal with specified CMifareClassicAccessBits.
Parameters | |
---|---|
aAccessBits | CMifareClassicAccessBits which is compared to this CMifareClassicAccessBits. |
IMPORT_C TBool | operator== | ( | const CMifareClassicAccessBits & | aAccessBits | ) | const |
Determines whether this CMifareClassicAccessBits is equal with specified CMifareClassicAccessBits.
Parameters | |
---|---|
aAccessBits | CMifareClassicAccessBits which is compared to this CMifareClassicAccessBits. |