CNfcType2Connection Class Reference

#include <mw/nfctype2connection.h>

Link against: nfctagextension.lib

class CNfcType2Connection : public CActive, public MNfcConnection

Inherits from

Detailed Description

This interface provides access to a NFC Forum Type 2 tag.

Constructor & Destructor Documentation

~CNfcType2Connection ( )

IMPORT_C~CNfcType2Connection()

Destructor.

Member Function Documentation

Activate ( TInt )

IMPORT_C TIntActivate(TIntaHandle)[virtual]

Reimplemented from MNfcConnection::Activate(TInt)

See also: MNfcConnection

CancelRawModeAccess ( )

IMPORT_C voidCancelRawModeAccess()[virtual]

See also: MNfcConnection

ConnectionMode ( )

IMPORT_C TNfcConnectionInfo::TNfcConnectionModeConnectionMode()[virtual]

See also: MNfcConnection

Deactivate ( )

IMPORT_C voidDeactivate()[virtual]

Reimplemented from MNfcConnection::Deactivate()

See also: MNfcConnection

IsActivated ( )

IMPORT_C TBoolIsActivated()[virtual]

See also: MNfcConnection

IsWritable ( const TInt, TBool & )

IMPORT_C TIntIsWritable(const TIntaBlockNumber,
TBool &aWritable
)

Checks whether a given block is writable. Currently no support for dynamic memory area.

Parameters
aBlockNumberBlocknumber to block which writable status will be checked.
aWritableReturn value. ETrue when the block is writable. EFalse The block is not writable.

Return Values

KErrDisconnected No tag in field.
KErrNone The operation is successfully completed.
KErrNotSupported aBlock parameter is invalid
KErrServerTerminated Server connection is terminated.

LockBlock ( TInt )

IMPORT_C TIntLockBlock(TIntaBlockNumber)

Locks a single block on a NFC Forum Type 2 tag so that the contents of the block cannot be changed anymore. Currently no support for dynamic memory area.

Parameters
aBlockNumberBlock number to be locked.

Return Values

KErrDisconnected No tag in field.
KErrNone The operation is successfully completed.
KErrNotSupported aBlockNumber parameter is invalid.
KErrServerTerminated Server connection is terminated.

LockTag ( )

IMPORT_C TIntLockTag()

Locks the entire tag. Currently no support for dynamic memory area.

Return Values

KErrDisconnected No tag in field.
KErrNone The operation is successfully completed.
KErrNotSupported aBlockNumber parameter is invalid.
KErrServerTerminated Server connection is terminated.

NewL ( RNfcServer & )

IMPORT_C CNfcType2Connection *NewL(RNfcServer &aNfcServer)[static]

Creates a new instance of this class.

May leave with one of the system wide error codes.

Return Value
Pointer to the newly created instance.

NewLC ( RNfcServer & )

IMPORT_C CNfcType2Connection *NewLC(RNfcServer &aNfcServer)[static]

Creates a new instance of this class.

May leave with one of the system wide error codes.

Return Value
Pointer to the newly created instance.

RawModeAccess ( TRequestStatus &, const TDesC8 &, TDes8 &, TTimeIntervalMicroSeconds32 & )

IMPORT_C voidRawModeAccess(TRequestStatus &aStatus,
const TDesC8 &aCommand,
TDes8 &aResponse,
TTimeIntervalMicroSeconds32 &aTimeout
)[virtual]

See also: MNfcConnection

Read ( TRequestStatus &, TDes8 &, TUint, const TNfcType2Address & )

IMPORT_C voidRead(TRequestStatus &aStatus,
TDes8 &aBuffer,
TUintaAmount,
const TNfcType2Address &aAddress
)

Reads data from the target NFC Forum Type 2 tag. The read address is specified by aBlock parameter.

Only one write/read command can be requested at a time.

Parameters
aStatusThe client's request status.
aBufferDescriptor for data.
aAmountLength of data to be read.
aAddressAddress where the read operation will start.
Return Value
Return values for aStatus:

Return Values

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.

ReadCancel ( )

IMPORT_C voidReadCancel()

Cancels any read request.

Write ( TRequestStatus &, const TDesC8 &, TUint32 )

IMPORT_C voidWrite(TRequestStatus &aStatus,
const TDesC8 &aBuffer,
TUint32aBlock
)

Writes data to the target NFC Forum Type 2 tag. Only one write/read command can be requested at a time.

Parameters
aStatusThe client's request status.
aBufferDescriptor which contains data to be written. The length of the descriptor must be multiple of four bytes.
Return Value
Return values for aStatus:

Return Values

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.

WriteCancel ( )

IMPORT_C voidWriteCancel()

Cancels any write request.