#include <mw/ndefmessage.h>
Link against: ndef.lib
| class CNdefMessage : public CBase, public MNfcRawData | 
| Public Member Functions | |
|---|---|
| virtual | ~CNdefMessage() | 
| IMPORT_C void | AppendNdefRecordL(CNdefRecord *) | 
| IMPORT_C TUint | Count() | 
| virtual IMPORT_C TUint | ExportRawDataL(TDes8 &, TUint) | 
| IMPORT_C CNdefRecord & | GetNdefRecordL(TUint) | 
| IMPORT_C CNdefRecord & | GetNdefRecordL(const TDesC8 &) | 
| virtual IMPORT_C TUint | ImportRawDataL(const TDesC8 &, TUint) | 
| IMPORT_C void | InsertNdefRecordL(CNdefRecord *, TUint) | 
| IMPORT_C CNdefMessage * | NewL() | 
| IMPORT_C CNdefMessage * | NewLC() | 
| IMPORT_C CNdefRecord * | PopNdefRecordL(TUint) | 
| IMPORT_C void | RemoveNdefRecordL(TUint) | 
| IMPORT_C void | SetNdefRecordL(CNdefRecord *, TUint) | 
| virtual IMPORT_C TUint | SizeL() | 
NFC Forum defined NDEF message.
| IMPORT_C void | AppendNdefRecordL | ( | CNdefRecord * | aRecord | ) | 
Appends a NDEF record to the end of this message. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aRecord | NDEF record, ownership changes with the pointer. | 
| IMPORT_C TUint | Count | ( | ) | const | 
Returns the amount of NDEF records in this message.
Reimplemented from MNfcRawData::ExportRawDataL(TDes8 &,TUint)const
From MNfcRawData.
See also: MNfcRawData
| KErrNdefIndex | aPos is out of range. | 
| KErrNdefEmpty | There is nothing to export. | 
| IMPORT_C CNdefRecord & | GetNdefRecordL | ( | TUint | aIndex | ) | const | 
Gets a reference to a NDEF record in the message by index. May leave with one of the system wide error codes.
| KErrNdefIndex | aIndex is out of range. | 
| Parameters | |
|---|---|
| aIndex | Index | 
| 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.
| KErrNotFound | No record with given ID found. | 
| Parameters | |
|---|---|
| aId | NDEF identifier string. | 
Reimplemented from MNfcRawData::ImportRawDataL(const TDesC8 &,TUint)
From MNfcRawData.
See also: MNfcRawData
| KErrNdefIndex | aPos is out of range. | 
| KErrNdefMessageBegin | MessageBegin flag not found or found multiple times. | 
| KErrNdefMessageEnd | MessageEnd flag not found. | 
| IMPORT_C void | InsertNdefRecordL | ( | CNdefRecord * | aRecord, | 
| TUint | aIndex | |||
| ) | ||||
Insert a NDEF record to the message. May leave with one of the system wide error codes.
| KErrNdefIndex | aIndex is out of range. | 
| Parameters | |
|---|---|
| aRecord | NDEF record, ownership changes with the pointer. | 
| aIndex | Inserting position. | 
| IMPORT_C CNdefMessage * | NewL | ( | ) | [static] | 
Creates a new instance of this class. May leave with one of the system wide error codes.
| 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.
| IMPORT_C CNdefRecord * | PopNdefRecordL | ( | TUint | aIndex | ) | 
Pops a NDEF record from the NDEF message. Popped record is removed from the message but it is not deleted.
| KErrNdefIndex | aIndex is out of range. | 
| Parameters | |
|---|---|
| aIndex | Index | 
| IMPORT_C void | RemoveNdefRecordL | ( | TUint | aIndex | ) | 
Deletes and removes a NDEF record from the message. May leave with one of the system wide error codes.
| KErrNdefIndex | aIndex is out of range. | 
| Parameters | |
|---|---|
| aIndex | Index | 
| IMPORT_C void | SetNdefRecordL | ( | CNdefRecord * | aRecord, | 
| TUint | aIndex | |||
| ) | ||||
Sets a NDEF record in the message, old record in the same position is deleted. May leave with one of the system wide errcodes.
| KErrNdefIndex | aIndex is out of range. | 
| Parameters | |
|---|---|
| aRecord | NDEF record, ownership changes with the pointer. | 
| aIndex | Position. |