#include <mw/ndefrecord.h>
Link against: ndef.lib
| class CNdefRecord : public CBase, public MNfcRawData |
| Public Member Enumerations | |
|---|---|
| enum | TNdefMessagePart { ENdefMessageBegin, ENdefMessageMiddle, ENdefMessageEnd, ENdefMessageSingle } |
| enum | TNdefRecordChunk { ENotChunked, EChunkBegin, EChunkMiddle, EChunkEnd } |
| enum | TNdefRecordFlag { EMessageBegin, EMessageEnd, EChunk, EShortRecord, EIdLength } |
| enum | TNdefRecordTnf { EEmpty, ENfcWellKnown, EMime, EUri, ..., EReserved } |
NFC Forum defined NDEF record.
?more_complete_description
Defines which part of a message a single record is.
| Enumerator | Value | Description |
|---|---|---|
| ENdefMessageBegin | 0 | |
| ENdefMessageMiddle | 1 | |
| ENdefMessageEnd | 2 | |
| ENdefMessageSingle | 3 |
Defines which part of chunked data a single record is.
| Enumerator | Value | Description |
|---|---|---|
| ENotChunked | 0 | |
| EChunkBegin | 1 | |
| EChunkMiddle | 2 | |
| EChunkEnd | 3 |
NDEF record flags.
| Enumerator | Value | Description |
|---|---|---|
| EMessageBegin | 0x80 | |
| EMessageEnd | 0x40 | |
| EChunk | 0x20 | |
| EShortRecord | 0x10 | |
| EIdLength | 0x08 |
NDEF record TNF values.
| Enumerator | Value | Description |
|---|---|---|
| EEmpty | 0x00 | |
| ENfcWellKnown | 0x01 | |
| EMime | 0x02 | |
| EUri | 0x03 | |
| ENfcExternal | 0x04 | |
| EUnknown | 0x05 | |
| EUnchanged | 0x06 | |
| EReserved | 0x07 |
| IMPORT_C void | AppendPayloadL | ( | const TDesC8 & | aBuf | ) |
Appends payload to the NDEF record. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aBuf | 8-bit descriptor containing the payload. |
| IMPORT_C void | AppendPayloadL | ( | 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.
| Parameters | |
|---|---|
| aMessage | NDEF Message |
| IMPORT_C CNdefMessage * | ConstructNestedNdefMessageL | ( | TUint | aPos | ) | const |
Constructs a new NDEF Message from the payload of this NDEF record. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aPos | Byte position to start reading from. |
Reimplemented from MNfcRawData::ExportRawDataL(TDes8 &,TUint)const
| IMPORT_C CNdefRecord::TNdefRecordChunk | GetChunk | ( | ) | const |
Tells whether payload is a chunk or not.
| IMPORT_C const TDesC8 & | GetId | ( | ) | const |
Gets the identification string.
| IMPORT_C CNdefRecord::TNdefMessagePart | GetMessagePart | ( | ) | const |
Returns the position of the record in a message.
| IMPORT_C const TDesC8 & | GetPayload | ( | ) | const |
Returns a 8-bit descriptor which points to the payload of this NDEF record.
| IMPORT_C TUint | GetPayloadSize | ( | ) | const |
Returns the size of the payload in bytes.
| IMPORT_C CNdefRecord::TNdefRecordTnf | GetTnf | ( | ) | const |
Returns the Type Name Format of the NDEF record.
| IMPORT_C const TDesC8 & | GetType | ( | ) | const |
Gets the type string.
Reimplemented from MNfcRawData::ImportRawDataL(const TDesC8 &,TUint)
| IMPORT_C CNdefRecord * | NewL | ( | TNdefRecordTnf | aTnf = EEmpty, |
| TNdefRecordChunk | aChunk = ENotChunked | |||
| ) | [static] | |||
Creates a new instance of this class. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aTnf | Type Name Format. |
| aChunk | Which part of a chunk series this record is. |
| IMPORT_C CNdefRecord * | NewL | ( | TNdefRecordTnf | aTnf, |
| const TDesC8 & | aType, | |||
| TNdefRecordChunk | aChunk = ENotChunked | |||
| ) | [static] | |||
Creates a new instance of this class. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aTnf | Type Name Format. |
| aType | Type string. |
| aChunk | Which part of a chunk series this record is. |
| IMPORT_C CNdefRecord * | NewLC | ( | TNdefRecordTnf | aTnf = EEmpty, |
| TNdefRecordChunk | aChunk = 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.
| Parameters | |
|---|---|
| aTnf | Type Name Format. |
| aChunk | Which part of a chunk series this record is. |
| IMPORT_C CNdefRecord * | NewLC | ( | TNdefRecordTnf | aTnf, |
| const TDesC8 & | aType, | |||
| TNdefRecordChunk | aChunk = 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.
| Parameters | |
|---|---|
| aTnf | Type Name Format. |
| aType | Type string. |
| aChunk | Which part of a chunk series this record is. |
| IMPORT_C void | SetIdL | ( | const TDesC8 & | aId | ) |
Sets the identification string. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aId | 8-bit descriptor containing the identifier string. |
| IMPORT_C void | SetMessagePart | ( | TNdefMessagePart | aPart | ) |
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.
| Parameters | |
|---|---|
| aPart | Message part |
| IMPORT_C void | SetTypeL | ( | const TDesC8 & | aType | ) |
Sets the type string. May leave with one of the system wide error codes.
| Parameters | |
|---|---|
| aType | 8-bit descriptor containing the type string. |