#include <mw/nfctype1connection.h>
class CNfcType1Connection : public CActive |
Public Member Functions | |
---|---|
~CNfcType1Connection() | |
IMPORT_C TInt | Activate(TInt) |
IMPORT_C void | CancelRawModeAccess() |
IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode() |
IMPORT_C void | Deactivate() |
IMPORT_C TInt | GetHeader(TDes8 &) |
IMPORT_C TBool | IsActivated() |
IMPORT_C TInt | IsWritable(const TInt, TBool &) |
IMPORT_C TInt | LockBlock(const TInt) |
IMPORT_C CNfcType1Connection * | NewL(RNfcServer &) |
IMPORT_C CNfcType1Connection * | NewLC(RNfcServer &) |
IMPORT_C void | RawModeAccess(TRequestStatus &, const TDesC8 &, TDes8 &, TTimeIntervalMicroSeconds32 &) |
IMPORT_C void | Read(TRequestStatus &, TDes8 &, TUint, const TNfcType1Address &) |
IMPORT_C void | ReadCancel() |
IMPORT_C void | ReadOTP(TRequestStatus &, TDes8 &) |
IMPORT_C void | Write(TRequestStatus &, const TDesC8 &, const TNfcType1Address &) |
IMPORT_C void | WriteCancel() |
IMPORT_C void | WriteOTP(TRequestStatus &, const TDesC8 &) |
Inherited Attributes | |
---|---|
CActive::iStatus |
Inherited Enumerations | |
---|---|
CActive:TPriority |
This class provides access to a NFC Forum Type 1 tag.
{nfctagextension.lib}
IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode | ( | ) |
See also: MNfcConnection
Gets the 2 header ROM bytes.
Parameter | Description |
---|---|
aHeader | Descriptor, which contains bytes of HR0 and HR1. The first byte of argument will be reserved for HR0 and the last byte will be reserved for HR1. |
KErrArgument | aHeader size was too small. |
KErrDisconnected | No tag in field. |
KErrNone | The operation is successfully completed. |
KErrServerTerminated | Server connection is terminated. |
Checks whether a given block is writable. Currently no support for dynamic memory area.
Parameter | Description |
---|---|
aBlockNumber | Blocknumber to block which writable status will be checked. |
aWritable | Return value. ETrue when the block is writable. EFalse The block is not writable. |
KErrDisconnected | No tag in field. |
KErrNone | The operation is successfully completed. |
KErrNotSupported | aBlock parameter is invalid |
KErrServerTerminated | Server connection is terminated. |
Locks a block. Currently no support for dynamic memory area.
Parameter | Description |
---|---|
aBlockNumber | Number of a block which will be locked. |
KErrArgument | aBlockNumber parameter is invalid. |
KErrDisconnected | No tag in field. |
KErrNone | The operation is successfully completed. |
KErrNotSupported | aBlockNumber parameter is invalid. |
KErrServerTerminated | Server connection is terminated. |
IMPORT_C CNfcType1Connection * | NewL | ( | RNfcServer & | aNfcServer | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameter | Description |
---|---|
aNfcServer | Reference to NFC Server. |
Returns: Pointer to the newly created instance.
IMPORT_C CNfcType1Connection * | NewLC | ( | RNfcServer & | aNfcServer | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameter | Description |
---|---|
aNfcServer | Reference to NFC Server. |
Returns: Pointer to the newly created instance.
IMPORT_C void | RawModeAccess | ( | TRequestStatus & | aStatus, |
const TDesC8 & | aCommand, | |||
TDes8 & | aResponse, | |||
TTimeIntervalMicroSeconds32 & | aTimeout | |||
) |
See also: MNfcConnection
IMPORT_C void | Read | ( | TRequestStatus & | aStatus, |
TDes8 & | aBuffer, | |||
TUint | aAmount, | |||
const TNfcType1Address & | aAddress | |||
) |
Reads data from the target NFC Forum Type 1 tag.
Only one write/read command can be requested at a time.
Parameter | Description |
---|---|
aStatus | The client's request status. |
aBuffer | Descriptor for data. |
aAmount | Length of data to be read. |
aAddress | Address where the read operation will start. |
Returns: Return values for aStatus:
KErrArgument | aBuffer size was too small. |
KErrDisconnected | No tag in field. |
KErrInUse | The request is issued before the previous one is completed. |
KErrNone | The operation is successfully completed. |
KErrServerTerminated | Server connection is terminated. |
IMPORT_C void | ReadOTP | ( | TRequestStatus & | aStatus, |
TDes8 & | aBuffer | |||
) |
Reads the Type1's OTP bits and return them in a byte array containing the 6 OTP bytes in the following order: OTP0, OTP1, OTP2, OTP3, OTP4, OTP5.
Only one write/read command can be requested at a time.
Parameter | Description |
---|---|
aStatus | The client's request status. |
aBuffer | Descriptor where read data is written to. |
Returns: Return values for aStatus:
KErrArgument | aBuffer size was too small. |
KErrDisconnected | No tag in field. |
KErrInUse | The request is issued before the previous one is completed. |
KErrNone | The operation is successfully completed. |
KErrServerTerminated | Server connection is terminated. |
KErrServerTerminated | The server connection is terminated. |
IMPORT_C void | Write | ( | TRequestStatus & | aStatus, |
const TDesC8 & | aBuffer, | |||
const TNfcType1Address & | aAddress | |||
) |
Writes data to the target NFC Forum Type 1 tag. Only one write/read command can be requested at a time.
Parameter | Description |
---|---|
aStatus | The client's request status. |
aBuffer | Descriptor which contains data to be written. |
aAddress | The address where the write operation will start. See NFC Forum Type 1 specification for restrictions. |
Returns: Return values for aStatus:
KErrArgument | Writing failed due to tag type specific restrictions |
KErrDisconnected | No tag in field. Or block is locked and cannot be written. |
KErrInUse | The request is issued before the previous one is completed. |
KErrNone | The operation is successfully completed. |
KErrServerTerminated | Server connection is terminated. |
IMPORT_C void | WriteOTP | ( | TRequestStatus & | aStatus, |
const TDesC8 & | aOtpArray | |||
) |
Writes the OTP bytes.
Only one write/read command can be requested at a time.
Parameter | Description |
---|---|
aStatus | The client's request status. |
aOtpArray | The byte array containing OTP bits in 6 bytes in the following order: OTP0, OTP1, ... , OTP5 |
Returns: Return values for aStatus:
KErrArgument | Writing failed due to tag type specific restrictions |
KErrDisconnected | No tag in field. |
KErrInUse | The request is issued before the previous one is completed. |
KErrNone | The operation is successfully completed. |
KErrServerTerminated | Server connection is terminated. |