CNfcType2Connection Class Reference

#include <mw/nfctype2connection.h>

Link against: nfctagextension.lib

class CNfcType2Connection : public CActive

Inherits from

  • CNfcType2Connection

    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)

    See also: MNfcConnection

    CancelRawModeAccess ( )

    IMPORT_C voidCancelRawModeAccess()

    See also: MNfcConnection

    ConnectionMode ( )

    See also: MNfcConnection

    Deactivate ( )

    IMPORT_C voidDeactivate()

    See also: MNfcConnection

    IsActivated ( )

    IMPORT_C TBoolIsActivated()

    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.

    ParameterDescription
    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.

    ParameterDescription
    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.

    Returns: 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.

    Returns: Pointer to the newly created instance.

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

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

    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.

    ParameterDescription
    aStatusThe client's request status.
    aBufferDescriptor for data.
    aAmountLength of data to be read.
    aAddressAddress where the read operation will start.

    Returns: 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.

    ParameterDescription
    aStatusThe client's request status.
    aBufferDescriptor which contains data to be written. The length of the descriptor must be multiple of four bytes.

    Returns: 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.