CNfcType1Connection Class Reference

#include <mw/nfctype1connection.h>

Link against: nfctagextension.lib

class CNfcType1Connection : public CActive

Inherits from

  • CNfcType1Connection

    Detailed Description

    This class provides access to a NFC Forum Type 1 tag.

    {nfctagextension.lib}

    Since
    S60 ?S60_version

    Constructor & Destructor Documentation

    ~CNfcType1Connection ( )

    IMPORT_C~CNfcType1Connection()

    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

    GetHeader ( TDes8 & )

    IMPORT_C TIntGetHeader(TDes8 &aHeader)

    Gets the 2 header ROM bytes.

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

    Return Values

    KErrArgument aHeader size was too small.
    KErrDisconnected No tag in field.
    KErrNone The operation is successfully completed.
    KErrServerTerminated Server connection is terminated.

    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 ( const TInt )

    IMPORT_C TIntLockBlock(const TIntaBlockNumber)

    Locks a block. Currently no support for dynamic memory area.

    ParameterDescription
    aBlockNumberNumber of a block which will be locked.

    Return Values

    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.

    NewL ( RNfcServer & )

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

    Creates a new instance of this class. May leave with one of the system wide error codes.

    ParameterDescription
    aNfcServerReference to NFC Server.

    Returns: Pointer to the newly created instance.

    NewLC ( RNfcServer & )

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

    Creates a new instance of this class. May leave with one of the system wide error codes.

    ParameterDescription
    aNfcServerReference to NFC Server.

    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 TNfcType1Address & )

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

    Reads data from the target NFC Forum Type 1 tag.

    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.

    ReadOTP ( TRequestStatus &, TDes8 & )

    IMPORT_C voidReadOTP(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.

    ParameterDescription
    aStatusThe client's request status.
    aBufferDescriptor where read data is written to.

    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.
    KErrServerTerminated The server connection is terminated.

    Write ( TRequestStatus &, const TDesC8 &, const TNfcType1Address & )

    IMPORT_C voidWrite(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.

    ParameterDescription
    aStatusThe client's request status.
    aBufferDescriptor which contains data to be written.
    aAddressThe address where the write operation will start. See NFC Forum Type 1 specification for restrictions.

    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.

    WriteOTP ( TRequestStatus &, const TDesC8 & )

    IMPORT_C voidWriteOTP(TRequestStatus &aStatus,
    const TDesC8 &aOtpArray
    )

    Writes the OTP bytes.

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

    ParameterDescription
    aStatusThe client's request status.
    aOtpArrayThe byte array containing OTP bits in 6 bytes in the following order: OTP0, OTP1, ... , OTP5

    Returns: Return values for aStatus:

    Return Values

    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.