CNdefMessage Class Reference

#include <mw/ndefmessage.h>

Link against: ndef.lib

class CNdefMessage : public CBase, public MNfcRawData

Inherits from

Detailed Description

NFC Forum defined NDEF message.

Since
S60 ?S60_version

Constructor & Destructor Documentation

~CNdefMessage ( )

~CNdefMessage()[virtual]

Destructor.

Since
S60 ?S60_version

Member Function Documentation

AppendNdefRecordL ( CNdefRecord * )

IMPORT_C voidAppendNdefRecordL(CNdefRecord *aRecord)

Appends a NDEF record to the end of this message. May leave with one of the system wide error codes.

Since
S60 ?S60_version
Parameters
aRecordNDEF record, ownership changes with the pointer.

Count ( )

IMPORT_C TUintCount()const

Returns the amount of NDEF records in this message.

Since
S60 ?S60_version
Return Value
Amount of NDEF records.

ExportRawDataL ( TDes8 &, TUint )

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

Reimplemented from MNfcRawData::ExportRawDataL(TDes8 &,TUint)const

From MNfcRawData.

Since
S60 ?S60_version

See also: MNfcRawData

Exceptions
KErrNdefIndex

aPos is out of range.

KErrNdefEmpty

There is nothing to export.

GetNdefRecordL ( TUint )

IMPORT_C CNdefRecord &GetNdefRecordL(TUintaIndex)const

Gets a reference to a NDEF record in the message by index. May leave with one of the system wide error codes.

Since
S60 ?S60_version
Exceptions
KErrNdefIndex

aIndex is out of range.

Parameters
aIndexIndex

GetNdefRecordL ( const TDesC8 & )

IMPORT_C CNdefRecord &GetNdefRecordL(const TDesC8 &aId)const

Gets a reference to the first NDEF record in the message by NDEF identifier. May leave with one of the system wide error codes.

Since
S60 ?S60_version
Exceptions
KErrNotFound

No record with given ID found.

Parameters
aIdNDEF identifier string.

ImportRawDataL ( const TDesC8 &, TUint )

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

From MNfcRawData.

Since
S60 ?S60_version

See also: MNfcRawData

Exceptions
KErrNdefIndex

aPos is out of range.

KErrNdefMessageBegin

MessageBegin flag not found or found multiple times.

KErrNdefMessageEnd

MessageEnd flag not found.

InsertNdefRecordL ( CNdefRecord *, TUint )

IMPORT_C voidInsertNdefRecordL(CNdefRecord *aRecord,
TUintaIndex
)

Insert a NDEF record to the message. May leave with one of the system wide error codes.

Since
S60 ?S60_version
Exceptions
KErrNdefIndex

aIndex is out of range.

Parameters
aRecordNDEF record, ownership changes with the pointer.
aIndexInserting position.

NewL ( )

IMPORT_C CNdefMessage *NewL()[static]

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

Since
S60 ?S60_version
Return Value
Pointer to the newly created instance.

NewLC ( )

IMPORT_C CNdefMessage *NewLC()[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
Return Value
Pointer to the newly created instance.

PopNdefRecordL ( TUint )

IMPORT_C CNdefRecord *PopNdefRecordL(TUintaIndex)

Pops a NDEF record from the NDEF message. Popped record is removed from the message but it is not deleted.

Since
S60 ?S60_version
Exceptions
KErrNdefIndex

aIndex is out of range.

Parameters
aIndexIndex

RemoveNdefRecordL ( TUint )

IMPORT_C voidRemoveNdefRecordL(TUintaIndex)

Deletes and removes a NDEF record from the message. May leave with one of the system wide error codes.

Since
S60 ?S60_version
Exceptions
KErrNdefIndex

aIndex is out of range.

Parameters
aIndexIndex

SetNdefRecordL ( CNdefRecord *, TUint )

IMPORT_C voidSetNdefRecordL(CNdefRecord *aRecord,
TUintaIndex
)

Sets a NDEF record in the message, old record in the same position is deleted. May leave with one of the system wide errcodes.

Since
S60 ?S60_version
Exceptions
KErrNdefIndex

aIndex is out of range.

Parameters
aRecordNDEF record, ownership changes with the pointer.
aIndexPosition.

SizeL ( )

IMPORT_C TUintSizeL()const [virtual]

Reimplemented from MNfcRawData::SizeL()const

From MNfcRawData.

See also: MNfcRawData