summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@theqtcompany.com>2014-12-11 13:46:53 +0100
committerAlex Blasche <alexander.blasche@theqtcompany.com>2014-12-11 14:35:15 +0100
commit1421e4c482430f9cf76ed7ec7bd5e6857ef9407f (patch)
tree8436f72caa2ba26cabc42ce6b6ac2648954c7402 /src
parentb94aad106215faebb68d3a58828054ffec3fc62c (diff)
Improve some parts of the SmartPoster API docs
Change-Id: I09f087d84641447fcb5e9e906f3d665ed86102e3 Reviewed-by: Martin Leutelt <martin.leutelt@basyskom.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Diffstat (limited to 'src')
-rw-r--r--src/nfc/qndefnfcsmartposterrecord.cpp30
-rw-r--r--src/nfc/qndefnfcsmartposterrecord.h1
2 files changed, 26 insertions, 5 deletions
diff --git a/src/nfc/qndefnfcsmartposterrecord.cpp b/src/nfc/qndefnfcsmartposterrecord.cpp
index d1a6e4d5..9c6d756b 100644
--- a/src/nfc/qndefnfcsmartposterrecord.cpp
+++ b/src/nfc/qndefnfcsmartposterrecord.cpp
@@ -602,7 +602,10 @@ bool QNdefNfcSmartPosterRecord::removeIcon(const QByteArray &type)
}
/*!
- Adds the icon record list \a icons to the smart poster. Any existing records are overwritten.
+ Adds the icon record list \a icons to the smart poster.
+ Any existing records are overwritten.
+
+ \sa hasIcon(), icon()
*/
void QNdefNfcSmartPosterRecord::setIcons(const QList<QNdefNfcIconRecord> &icons)
{
@@ -617,7 +620,13 @@ void QNdefNfcSmartPosterRecord::setIcons(const QList<QNdefNfcIconRecord> &icons)
}
/*!
- Returns the size from the size record if available. Otherwise returns 0.
+ Returns the size from the size record if available; otherwise returns 0.
+
+ The value is optional and contains the size in bytes of the object
+ that the URI refers to. It may be used by the device to determine
+ whether it can accommodate the object.
+
+ \sa setSize()
*/
quint32 QNdefNfcSmartPosterRecord::size() const
{
@@ -628,7 +637,10 @@ quint32 QNdefNfcSmartPosterRecord::size() const
}
/*!
- Sets the size record to \a size
+ Sets the record \a size. The value contains the size in bytes of
+ the object that the URI refers to.
+
+ \sa size(), hasSize()
*/
void QNdefNfcSmartPosterRecord::setSize(quint32 size)
{
@@ -642,7 +654,12 @@ void QNdefNfcSmartPosterRecord::setSize(quint32 size)
}
/*!
- Returns the type from the type record if available. Otherwise returns an empty byte array.
+ Returns the UTF-8 encoded MIME type that describes the type of the objects
+ that can be reached via uri().
+
+ If the type is not known the return QByteArray is empty.
+
+ \sa setTypeInfo(), hasTypeInfo()
*/
QByteArray QNdefNfcSmartPosterRecord::typeInfo() const
{
@@ -653,7 +670,10 @@ QByteArray QNdefNfcSmartPosterRecord::typeInfo() const
}
/*!
- Sets the type record to \a type
+ Sets the type record to \a type. \a type must be UTF-8 encoded
+ and describes the type of the object referenced by uri()
+
+ \sa typeInfo()
*/
void QNdefNfcSmartPosterRecord::setTypeInfo(const QByteArray &type)
{
diff --git a/src/nfc/qndefnfcsmartposterrecord.h b/src/nfc/qndefnfcsmartposterrecord.h
index ffd45dad..0b2d3b7e 100644
--- a/src/nfc/qndefnfcsmartposterrecord.h
+++ b/src/nfc/qndefnfcsmartposterrecord.h
@@ -124,6 +124,7 @@ public:
quint32 size() const;
void setSize(quint32 size);
+ //TODO Qt 6 the mimetype should be QString as it is UTF-8
QByteArray typeInfo() const;
void setTypeInfo(const QByteArray &type);