CNdefRecord Class Reference

#include <mw/ndefrecord.h>

Link against: ndef.lib

class CNdefRecord : public CBase

Inherits from

  • CNdefRecord
    Public Member Enumerations
    enumTNdefMessagePart { ENdefMessageBegin, ENdefMessageMiddle, ENdefMessageEnd, ENdefMessageSingle }
    enumTNdefRecordChunk { ENotChunked, EChunkBegin, EChunkMiddle, EChunkEnd }
    enumTNdefRecordFlag { EMessageBegin, EMessageEnd, EChunk, EShortRecord, EIdLength }
    enumTNdefRecordTnf { EEmpty, ENfcWellKnown, EMime, EUri, ..., EReserved }
    Public Member Functions
    virtual ~CNdefRecord()
    IMPORT_C voidAppendPayloadL(const TDesC8 &)
    IMPORT_C voidAppendPayloadL(const CNdefMessage &)
    IMPORT_C CNdefMessage *ConstructNestedNdefMessageL(TUint)
    virtual IMPORT_C TUintExportRawDataL(TDes8 &, TUint)
    IMPORT_C CNdefRecord::TNdefRecordChunkGetChunk()
    IMPORT_C const TDesC8 &GetId()
    IMPORT_C CNdefRecord::TNdefMessagePartGetMessagePart()
    IMPORT_C const TDesC8 &GetPayload()
    IMPORT_C TUintGetPayloadSize()
    IMPORT_C CNdefRecord::TNdefRecordTnfGetTnf()
    IMPORT_C const TDesC8 &GetType()
    virtual IMPORT_C TUintImportRawDataL(const TDesC8 &, TUint)
    IMPORT_C CNdefRecord *NewL(TNdefRecordTnf, TNdefRecordChunk)
    IMPORT_C CNdefRecord *NewL(TNdefRecordTnf, const TDesC8 &, TNdefRecordChunk)
    IMPORT_C CNdefRecord *NewLC(TNdefRecordTnf, TNdefRecordChunk)
    IMPORT_C CNdefRecord *NewLC(TNdefRecordTnf, const TDesC8 &, TNdefRecordChunk)
    IMPORT_C voidRemoveId()
    IMPORT_C voidRemovePayload()
    IMPORT_C voidRemoveType()
    IMPORT_C voidSetIdL(const TDesC8 &)
    IMPORT_C voidSetMessagePart(TNdefMessagePart)
    IMPORT_C voidSetTypeL(const TDesC8 &)
    virtual IMPORT_C TUintSizeL()
    Inherited Functions
    CBase::CBase()
    CBase::Delete(CBase *)
    CBase::Extension_(TUint,TAny *&,TAny *)
    CBase::operator new(TUint)
    CBase::operator new(TUint,TAny *)
    CBase::operator new(TUint,TLeave)
    CBase::operator new(TUint,TLeave,TUint)
    CBase::operator new(TUint,TUint)
    CBase::~CBase()

    Detailed Description

    NFC Forum defined NDEF record.

    ?more_complete_description

    Since
    S60 ?S60_version

    Member Enumeration Documentation

    Enum TNdefMessagePart

    Defines which part of a message a single record is.

    Enum TNdefRecordChunk

    Defines which part of chunked data a single record is.

    EnumeratorValueDescription
    ENotChunked0
    EChunkBegin1
    EChunkMiddle2
    EChunkEnd3

    Enum TNdefRecordFlag

    NDEF record flags.

    EnumeratorValueDescription
    EMessageBegin0x80
    EMessageEnd0x40
    EChunk0x20
    EShortRecord0x10
    EIdLength0x08

    Enum TNdefRecordTnf

    NDEF record TNF values.

    EnumeratorValueDescription
    EEmpty0x00
    ENfcWellKnown0x01
    EMime0x02
    EUri0x03
    ENfcExternal0x04
    EUnknown0x05
    EUnchanged0x06
    EReserved0x07

    Constructor & Destructor Documentation

    ~CNdefRecord ( )

    ~CNdefRecord()[virtual]

    Destructor.

    Since
    S60 ?S60_version

    Member Function Documentation

    AppendPayloadL ( const TDesC8 & )

    IMPORT_C voidAppendPayloadL(const TDesC8 &aBuf)

    Appends payload to the NDEF record. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aBuf8-bit descriptor containing the payload.

    AppendPayloadL ( const CNdefMessage & )

    IMPORT_C voidAppendPayloadL(const CNdefMessage &aMessage)

    Appends binary presentation of a NDEF Message to the payload of this NDEF record. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aMessageNDEF Message

    ConstructNestedNdefMessageL ( TUint )

    IMPORT_C CNdefMessage *ConstructNestedNdefMessageL(TUintaPos)const

    Constructs a new NDEF Message from the payload of this NDEF record. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aPosByte position to start reading from.

    Returns: Pointer to the newly created NDEF Message.

    ExportRawDataL ( TDes8 &, TUint )

    IMPORT_C TUintExportRawDataL(TDes8 &aBuf,
    TUintaPos
    )const [virtual]

    From MNfcRawData.

    Since
    S60 ?S60_version

    See also: MNfcRawData

    GetChunk ( )

    IMPORT_C CNdefRecord::TNdefRecordChunkGetChunk()const

    Tells whether payload is a chunk or not.

    Since
    S60 ?S60_version

    Returns: Chunking information for this record.

    GetId ( )

    IMPORT_C const TDesC8 &GetId()const

    Gets the identification string.

    Since
    S60 ?S60_version

    Returns: 8-bit descriptor containing the identifier string.

    GetMessagePart ( )

    IMPORT_C CNdefRecord::TNdefMessagePartGetMessagePart()const

    Returns the position of the record in a message.

    Since
    S60 ?S60_version

    Returns: Position in a message

    GetPayload ( )

    IMPORT_C const TDesC8 &GetPayload()const

    Returns a 8-bit descriptor which points to the payload of this NDEF record.

    Since
    S60 ?S60_version

    Returns: 8-bit descriptor containing the payload.

    GetPayloadSize ( )

    IMPORT_C TUintGetPayloadSize()const

    Returns the size of the payload in bytes.

    Since
    S60 ?S60_version

    Returns: Size of payload in bytes.

    GetTnf ( )

    IMPORT_C CNdefRecord::TNdefRecordTnfGetTnf()const

    Returns the Type Name Format of the NDEF record.

    Since
    S60 ?S60_version

    Returns: Type Name Format

    GetType ( )

    IMPORT_C const TDesC8 &GetType()const

    Gets the type string.

    Since
    S60 ?S60_version

    Returns: 8-bit descriptor containing the type string.

    ImportRawDataL ( const TDesC8 &, TUint )

    IMPORT_C TUintImportRawDataL(const TDesC8 &aBuf,
    TUintaPos
    )[virtual]

    From MNfcRawData.

    Since
    S60 ?S60_version

    See also: MNfcRawData

    NewL ( TNdefRecordTnf, TNdefRecordChunk )

    IMPORT_C CNdefRecord *NewL(TNdefRecordTnfaTnf = EEmpty,
    TNdefRecordChunkaChunk = ENotChunked
    )[static]

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

    Since
    S60 ?S60_version
    ParameterDescription
    aTnfType Name Format.
    aChunkWhich part of a chunk series this record is.

    Returns: Pointer to the newly created instance.

    NewL ( TNdefRecordTnf, const TDesC8 &, TNdefRecordChunk )

    IMPORT_C CNdefRecord *NewL(TNdefRecordTnfaTnf,
    const TDesC8 &aType,
    TNdefRecordChunkaChunk = ENotChunked
    )[static]

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

    Since
    S60 ?S60_version
    ParameterDescription
    aTnfType Name Format.
    aTypeType string.
    aChunkWhich part of a chunk series this record is.

    Returns: Pointer to the newly created instance.

    NewLC ( TNdefRecordTnf, TNdefRecordChunk )

    IMPORT_C CNdefRecord *NewLC(TNdefRecordTnfaTnf = EEmpty,
    TNdefRecordChunkaChunk = ENotChunked
    )[static]

    Creates a new instance of this class and leaves a pointer to it into the CleanupStack. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aTnfType Name Format.
    aChunkWhich part of a chunk series this record is.

    Returns: Pointer to the newly created instance.

    NewLC ( TNdefRecordTnf, const TDesC8 &, TNdefRecordChunk )

    IMPORT_C CNdefRecord *NewLC(TNdefRecordTnfaTnf,
    const TDesC8 &aType,
    TNdefRecordChunkaChunk = ENotChunked
    )[static]

    Creates a new instance of this class and leaves a pointer to it into the CleanupStack. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aTnfType Name Format.
    aTypeType string.
    aChunkWhich part of a chunk series this record is.

    Returns: Pointer to the newly created instance.

    RemoveId ( )

    IMPORT_C voidRemoveId()

    Removes the identification string.

    Since
    S60 ?S60_version

    RemovePayload ( )

    IMPORT_C voidRemovePayload()

    Removes the payload.

    Since
    S60 ?S60_version

    RemoveType ( )

    IMPORT_C voidRemoveType()

    Removes the type string.

    Since
    S60 ?S60_version

    SetIdL ( const TDesC8 & )

    IMPORT_C voidSetIdL(const TDesC8 &aId)

    Sets the identification string. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aId8-bit descriptor containing the identifier string.

    SetMessagePart ( TNdefMessagePart )

    IMPORT_C voidSetMessagePart(TNdefMessagePartaPart)

    Sets the position of the record in a message. Note that this does not check whether message begin/end and chunking flags are legally combined.

    Since
    S60 ?S60_version
    ParameterDescription
    aPartMessage part

    SetTypeL ( const TDesC8 & )

    IMPORT_C voidSetTypeL(const TDesC8 &aType)

    Sets the type string. May leave with one of the system wide error codes.

    Since
    S60 ?S60_version
    ParameterDescription
    aType8-bit descriptor containing the type string.

    SizeL ( )

    IMPORT_C TUintSizeL()const [virtual]

    From MNfcRawData.

    Since
    S60 ?S60_version

    See also: MNfcRawData