#include <mw/nfctype1connection.h>
Link against: nfctagextension.lib
class CNfcType1Connection : public CActive, public MNfcConnection |
Public Member Functions | |
---|---|
~CNfcType1Connection() | |
virtual IMPORT_C TInt | Activate(TInt) |
virtual IMPORT_C void | CancelRawModeAccess() |
virtual IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode() |
virtual IMPORT_C void | Deactivate() |
IMPORT_C TInt | GetHeader(TDes8 &) |
virtual 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 &) |
virtual 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 void | CancelRawModeAccess | ( | ) | [virtual] |
Reimplemented from MNfcConnection::CancelRawModeAccess()
See also: MNfcConnection
IMPORT_C TNfcConnectionInfo::TNfcConnectionMode | ConnectionMode | ( | ) | [virtual] |
Reimplemented from MNfcConnection::ConnectionMode()
See also: MNfcConnection
IMPORT_C void | Deactivate | ( | ) | [virtual] |
Reimplemented from MNfcConnection::Deactivate()
See also: MNfcConnection
Gets the 2 header ROM bytes.
Parameters | |
---|---|
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. |
IMPORT_C TBool | IsActivated | ( | ) | [virtual] |
Reimplemented from MNfcConnection::IsActivated()
See also: MNfcConnection
Checks whether a given block is writable. Currently no support for dynamic memory area.
Parameters | |
---|---|
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.
Parameters | |
---|---|
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.
Parameters | |
---|---|
aNfcServer | Reference to NFC Server. |
IMPORT_C CNfcType1Connection * | NewLC | ( | RNfcServer & | aNfcServer | ) | [static] |
Creates a new instance of this class. May leave with one of the system wide error codes.
Parameters | |
---|---|
aNfcServer | Reference to NFC Server. |
IMPORT_C void | RawModeAccess | ( | TRequestStatus & | aStatus, |
const TDesC8 & | aCommand, | |||
TDes8 & | aResponse, | |||
TTimeIntervalMicroSeconds32 & | aTimeout | |||
) | [virtual] |
Reimplemented from MNfcConnection::RawModeAccess(TRequestStatus &,const TDesC8 &,TDes8 &,TTimeIntervalMicroSeconds32 &)
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.
Parameters | |
---|---|
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. |
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.
Parameters | |
---|---|
aStatus | The client's request status. |
aBuffer | Descriptor where read data is written to. |
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.
Parameters | |
---|---|
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. |
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.
Parameters | |
---|---|
aStatus | The client's request status. |
aOtpArray | The byte array containing OTP bits in 6 bytes in the following order: OTP0, OTP1, ... , OTP5 |
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. |