QNdefNfcTextRecord

Since: 1.2

#include <QtNfcSubset/QNdefNfcTextRecord>

The QNdefNfcTextRecord class provides an NFC RTD-Text.

RTD-Text encapsulates a user displayable text record.


Overview

Inheritance

QtMobilitySubset::QNdefRecord
QtMobilitySubset::QNdefNfcTextRecord

Public Types Index

enum Encoding

Utf8, Utf16

enum TypeNameFormat

Empty 0x00, NfcRtd 0x01, Mime 0x02, Uri 0x03, ExternalRtd 0x04, Unknown 0x05

Public Functions Index

Encodingencoding () const
Q_DECLARE_NDEF_RECORD (QNdefNfcTextRecord, QNdefRecord::NfcRtd,"T", QByteArray(0, char(0))) QString locale() const
voidsetEncoding (Encoding encoding)
voidsetLocale (const QString &locale)
voidsetText (const QString text)
QStringtext () const
QByteArrayid () const Inherited
boolisEmpty () const Inherited
boolisRecordType () const Inherited
booloperator!= (const QNdefRecord &other) const Inherited
QNdefRecord &operator= (const QNdefRecord &other)Inherited
booloperator== (const QNdefRecord &other) const Inherited
QByteArraypayload () const Inherited
QNdefRecord ()Inherited
QNdefRecord (const QNdefRecord &other)Inherited
voidsetId (const QByteArray &id)Inherited
voidsetPayload (const QByteArray &payload)Inherited
voidsetType (const QByteArray &type)Inherited
voidsetTypeNameFormat (TypeNameFormat typeNameFormat)Inherited
QByteArraytype () const Inherited
TypeNameFormattypeNameFormat () const Inherited

Protected Functions Index

Only has inherited protected functions

QNdefRecord (const QNdefRecord &other, TypeNameFormat typeNameFormat, const QByteArray &type, bool ignoreType=false)Inherited
QNdefRecord (TypeNameFormat typeNameFormat, const QByteArray &type)Inherited

Public Types

Encoding

This enum describes the text encoding standard used.

Utf8

The text is encoded with UTF-8.

Utf16

The text is encoding with UTF-16.

TypeNameFormat Inherited

This enum describes the type name format of an NDEF record.

Empty 0x00

An empty NDEF record, the record does not contain a payload.

NfcRtd 0x01

The NDEF record type is defined by an NFC RTD Specification.

Mime 0x02

The NDEF record type follows the construct described in RFC 2046.

Uri 0x03

The NDEF record type follows the construct described in RFC 3986.

ExternalRtd 0x04

The NDEF record type follows the construct for external type names described the NFC RTD Specification.

Unknown 0x05

The type of the record is unknown and should be treated similar to content with MIME type 'application/octet-stream' without further context.

Public Functions

Encoding encoding ()

Returns the encoding of the contents.

Q_DECLARE_NDEF_RECORD (

void setEncoding (

Sets the enconding of the contents to encoding.

void setLocale (

Sets the locale of the text record to locale.

void setText (

Sets the contents of the text record to text.

QString text ()

Returns the contents of the text record as a string.

QByteArray id ()Inherited

Returns the id of the NDEF record.

bool isEmpty ()Inherited

Return:

Returns true if the NDEF record contains an empty payload; otherwise return false.

This is equivalent to calling {payload().isEmpty()}.

bool isRecordType (
  • typename T)
Inherited

Returns true if the NDEF record is of the specified record type; otherwise returns false.

bool operator!= (Inherited

Returns true if this NDEF record does not equal other; otherwise return false.

QNdefRecord & operator= (Inherited

Assigns this NDEF record to other.

bool operator== (Inherited

Returns true if other and this NDEF record are the same.

QByteArray payload ()Inherited

Returns the payload of the NDEF record.

QNdefRecord ()Inherited

Constructs a new empty NDEF record.

QNdefRecord (Inherited

Constructs a new NDEF record that is a copy of other.

void setId (Inherited

Sets the id of the NDEF record to id.

void setPayload (Inherited

Sets the payload of the NDEF record to payload.

void setType (Inherited

Sets the type of the NDEF record to type.

void setTypeNameFormat (Inherited

Sets the type name format of the NDEF record to typeNameFormat.

QByteArray type ()Inherited

Returns the type of the NDEF record.

TypeNameFormat typeNameFormat ()Inherited

Returns the type name format of the NDEF record.

Protected Functions

(Only has inherited protected functions)

QNdefRecord (Inherited

QNdefRecord (Inherited

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus