diff options
author | Michael Zanetti <michael.zanetti@nokia.com> | 2011-12-09 15:27:12 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-23 15:57:18 +0100 |
commit | ebd7a5d2935b5ab9dd7910dfb104a9e0c0819677 (patch) | |
tree | 2bc160feb75abdf72d29591efe301c55ba9b3132 /src/nfc | |
parent | f54bd71301325f7e5681be49d81823986f5cbfcd (diff) |
added documentation and examples
Change-Id: Ia99e5f8f9579c189379bce1a22de3d58b12ce5fc
Reviewed-by: Alex <alex.blasche@nokia.com>
Sanity-Review: Alex <alex.blasche@nokia.com>
Diffstat (limited to 'src/nfc')
-rw-r--r-- | src/nfc/qdeclarativendefrecord.cpp | 11 | ||||
-rw-r--r-- | src/nfc/qllcpserver.cpp | 6 | ||||
-rw-r--r-- | src/nfc/qllcpsocket.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndeffilter.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndefmessage.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndefnfctextrecord.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndefnfcurirecord.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qndefrecord.cpp | 7 | ||||
-rw-r--r-- | src/nfc/qnearfieldmanager.cpp | 106 | ||||
-rw-r--r-- | src/nfc/qnearfieldmanager_symbian.cpp | 2 | ||||
-rw-r--r-- | src/nfc/qnearfieldtagtype1.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qnearfieldtagtype1_symbian.cpp | 2 | ||||
-rw-r--r-- | src/nfc/qnearfieldtagtype2.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qnearfieldtagtype3.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qnearfieldtagtype4.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qnearfieldtarget.cpp | 3 | ||||
-rw-r--r-- | src/nfc/qnfcglobal.h | 2 | ||||
-rw-r--r-- | src/nfc/symbian/nearfieldmanager_symbian.cpp | 3 | ||||
-rw-r--r-- | src/nfc/symbian/nearfieldtag_symbian.cpp | 3 | ||||
-rw-r--r-- | src/nfc/symbian/nearfieldtargetfactory_symbian.cpp | 3 |
20 files changed, 27 insertions, 148 deletions
diff --git a/src/nfc/qdeclarativendefrecord.cpp b/src/nfc/qdeclarativendefrecord.cpp index 8cf9dc56..901b4fb1 100644 --- a/src/nfc/qdeclarativendefrecord.cpp +++ b/src/nfc/qdeclarativendefrecord.cpp @@ -51,8 +51,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QDeclarativeNdefRecord class implements the NdefRecord element in QML. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc \sa NdefRecord @@ -72,11 +71,11 @@ QTNFC_BEGIN_NAMESPACE For example the declaration of such a class may look like the following. - \snippet snippets/connectivity/foorecord.h Foo declaration + \snippet ../doc/src/snippets/foorecord.h Foo declaration Within the implementation file the Q_DECLARE_NDEFRECORD() macro is expanded: - \snippet snippets/connectivity/foorecord.cpp Declare foo record + \snippet ../doc/src/snippets/foorecord.cpp Declare foo record Finially the application or plugin code calls qmlRegisterType(): @@ -89,8 +88,8 @@ QTNFC_BEGIN_NAMESPACE \qmlclass NdefRecord QDeclarativeNdefRecord \brief The NdefRecord element represents a record in an NDEF message. - \ingroup connectivity-qml - \inmodule QtConnectivity + \ingroup nfc-qml + \inmodule QtNfc \sa NdefFilter \sa NearField diff --git a/src/nfc/qllcpserver.cpp b/src/nfc/qllcpserver.cpp index c7e3697b..d39dc501 100644 --- a/src/nfc/qllcpserver.cpp +++ b/src/nfc/qllcpserver.cpp @@ -58,8 +58,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QLlcpServer class provides an NFC LLCP socket based server. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc This class makes it possible to accept incoming LLCP socket connections. @@ -152,8 +151,7 @@ QString QLlcpServer::serviceUri() const /*! Returns the LLCP port associated with the service URI that the server is listening on. - - \note This call is not supported on all platforms and will return 0 on these platforms. + This call is not supported on all platforms and will return 0 on these platforms. */ quint8 QLlcpServer::serverPort() const { diff --git a/src/nfc/qllcpsocket.cpp b/src/nfc/qllcpsocket.cpp index e79da7fb..08f3c177 100644 --- a/src/nfc/qllcpsocket.cpp +++ b/src/nfc/qllcpsocket.cpp @@ -56,10 +56,9 @@ QTNFC_BEGIN_NAMESPACE /*! \class QLlcpSocket \brief The QLlcpSocket class provides an NFC LLCP socket. - \since 5.0 \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc NFC LLCP protocol is a peer-to-peer communication protocol between two NFC compliant devices. */ diff --git a/src/nfc/qndeffilter.cpp b/src/nfc/qndeffilter.cpp index d89bb85b..86de8aa4 100644 --- a/src/nfc/qndeffilter.cpp +++ b/src/nfc/qndeffilter.cpp @@ -50,8 +50,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNdefFilter class provides a filter for matching NDEF messages. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc The QNdefFilter encapsulates the structure of an NDEF message and is used by QNearFieldManager::registerNdefMessageHandler() to match NDEF message that have a particular diff --git a/src/nfc/qndefmessage.cpp b/src/nfc/qndefmessage.cpp index 9966097a..e311b1ff 100644 --- a/src/nfc/qndefmessage.cpp +++ b/src/nfc/qndefmessage.cpp @@ -49,8 +49,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNdefMessage class provides an NFC NDEF message. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc A QNdefMessage is a collection of 0 or more QNdefRecords. QNdefMessage inherits from QList<QNdefRecord> and therefore the standard QList functions can be used to manipulate the diff --git a/src/nfc/qndefnfctextrecord.cpp b/src/nfc/qndefnfctextrecord.cpp index 133f9ea4..098d78aa 100644 --- a/src/nfc/qndefnfctextrecord.cpp +++ b/src/nfc/qndefnfctextrecord.cpp @@ -51,8 +51,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNdefNfcTextRecord class provides an NFC RTD-Text \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc RTD-Text encapsulates a user displayable text record. */ diff --git a/src/nfc/qndefnfcurirecord.cpp b/src/nfc/qndefnfcurirecord.cpp index 08768b7c..31980488 100644 --- a/src/nfc/qndefnfcurirecord.cpp +++ b/src/nfc/qndefnfcurirecord.cpp @@ -53,8 +53,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNdefNfcUriRecord class provides an NFC RTD-URI \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc RTD-URI encapsulates a URI. */ diff --git a/src/nfc/qndefrecord.cpp b/src/nfc/qndefrecord.cpp index 4d165075..3a2d6734 100644 --- a/src/nfc/qndefrecord.cpp +++ b/src/nfc/qndefrecord.cpp @@ -52,8 +52,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNdefRecord class provides an NFC NDEF record. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc QNdefRecord and derived classes are used to parse the contents of \l {QNdefMessage}{NDEF messages} and create new NDEF messages. @@ -73,7 +72,7 @@ QTNFC_BEGIN_NAMESPACE to test if a conversion is possible. The following example shows how to test if a QNdefRecord is an NFC RTD Text record and extract the text information from it. - \snippet snippets/connectivity/nfc.cpp Record conversion + \snippet ../doc/src/snippets/nfc.cpp Record conversion \section1 Creating specialized NDEF record classes @@ -82,7 +81,7 @@ QTNFC_BEGIN_NAMESPACE declaration of the hypothetical \i {example.com:f} record type that encapsulates a single int property foo. - \snippet snippets/connectivity/nfc.cpp Specialized class definition + \snippet ../doc/src/snippets/nfc.cpp Specialized class definition The developer only needs to provide implementations for the \c {foo()} and \c {setFoo()} functions that parse and set the contents of the NDEF record's payload. diff --git a/src/nfc/qnearfieldmanager.cpp b/src/nfc/qnearfieldmanager.cpp index 671109c3..76514a7f 100644 --- a/src/nfc/qnearfieldmanager.cpp +++ b/src/nfc/qnearfieldmanager.cpp @@ -62,8 +62,7 @@ QTNFC_BEGIN_NAMESPACE \brief The QNearFieldManager class provides access to notifications for NFC events. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc NFC Forum devices support two modes of communications. The first mode, peer-to-peer communications, is used to communicate between two NFC Forum devices. The second mode, @@ -145,113 +144,10 @@ QTNFC_BEGIN_NAMESPACE SLOT(handleNdefMessage(QNdefMessage,QNearFieldTarget))); \endcode - \section3 Symbian^3 - - On Symbian^3 an xml file needs to be created and installed into a particular directory on the - device. The format of the xml is given below. - - \quotefile tools/ndefhandlergen/templates/symbian/symbian.xml - - The \i {%APPNAME%} tags need to be changed to match the name of the application. The - \i description xml tags should be used to describe the application, however these values are - not used. The \i {%DATATYPE%} tag must be set with the NDEF record type to match For example - the following would be used to match NDEF messages that contain a RTD-URI record: - \code <customproperty key="datatype">urn:nfc:wkt:U</customproperty> \endcode - The following would be used to match NDEF messages that contain a custom type - urn:nfc:ext:example.com:f: - - \code - <customproperty key="datatype">urn:nfc:ext:com.example:f</customproperty> - \endcode - - The value of the \i customproperty xml tag can be set to any valid match string supported by - the Symbian^3 platform. - - It is recommended to name the xml file after the application package name. For example - myapplication.xml. To install the above xml file into the correct location the following should - be added to the application .pro file: - - \code - symbian { - ndefhandler.sources = myapplication.xml - ndefhandler.path = /private/2002AC7F/import/ - DEPLOYMENT += ndefhandler - } - \endcode - - \section3 Maemo6 - - On Maemo6 the NDEF message handler notifications are passed over D-Bus. Registration of the - NDEF message match criteria is done via a D-Bus call. The application must also ensure that it - has registered a D-Bus service name so that the application can be automatically launched when - a notification message is sent to the registered service. - - To register the D-Bus service the two files need to be created and installed into particular - directories on the device. The first file is the D-Bus bus configuration file: - - \quotefile tools/ndefhandlergen/templates/maemo6/maemo6.conf - - The \i {%APPNAME%} tag must be replaced with the name of your application binary. - - The second file is a D-Bus service file which is used by the D-Bus daemon to launch your - application. - - \quotefile tools/ndefhandlergen/templates/maemo6/maemo6.service - - The \i {%APPNAME%} tag must be replace with the name of your application binary and the - \i {%APPPATH%} tag must be replaced with the path to your installed application binary. - - It is recommended to name these files after the application package name. For example - myapplication.conf and myapplication.service. To install the above files into the correct - location the following should be added to the application .pro file: - - \code - maemo6 { - ndefhandler_conf.sources = myapplication.conf - ndefhandler_conf.path = /etc/dbus-1/system.d/ - - ndefhandler_service.sources = myapplication.service - ndefhandler_service.path = /usr/share/dbus-1/system-services/ - - DEPLOYMENT += ndefhandler_conf ndefhandler_service - } - \endcode - - The NDEF message handler is registered with the following D-Bus command. Applications should - ensure that the following command (or similar) is executed once at installation time. For - example in the packages post-installation script. - - \quotefile tools/ndefhandlergen/templates/maemo6/maemo6.postinst - - The \i {%APPNAME%} string must be replaced with the name of the application binary. The - \i {%DATATYPE%} string must be replaced with the NDEF record type to match. For example the - following would be used to match NDEF messages that contain a RTD-URI record: - - \code - string:"urn:nfc:wkt:U[1:*];" - \endcode - - The following would be used to match NDEF messages that contain a custom type - urn:nfc:ext:example.com:f: - - \code - string:"urn:nfc:ext:example.com:f[1:*];" - \endcode - - Note that \c {[1:*]} indicates one or more records of the specified type must be in the NDEF - message. The value of the datatype string argument can be set to any valid match string - supported by the Maemo6 platform. - - The NDEF message handler should be unregistered at uninstallation time. For example in the - packages pre-removal script. - - \quotefile tools/ndefhandlergen/templates/maemo6/maemo6.prerm - - The \i {%APPNAME%} string must be replace with the name of the application binary. */ /*! diff --git a/src/nfc/qnearfieldmanager_symbian.cpp b/src/nfc/qnearfieldmanager_symbian.cpp index a2343320..41fe8612 100644 --- a/src/nfc/qnearfieldmanager_symbian.cpp +++ b/src/nfc/qnearfieldmanager_symbian.cpp @@ -79,7 +79,7 @@ void ContentHandlerInterface::handleMessage(const QByteArray& btArray) \brief The QNearFieldManagerPrivateImpl class provides symbian backend access to NFC service. \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc A Qt-Symbian wrapper implementation class to support symbian NFC backend. */ diff --git a/src/nfc/qnearfieldtagtype1.cpp b/src/nfc/qnearfieldtagtype1.cpp index cd63f1d6..d9845ef7 100644 --- a/src/nfc/qnearfieldtagtype1.cpp +++ b/src/nfc/qnearfieldtagtype1.cpp @@ -55,10 +55,9 @@ QTNFC_BEGIN_NAMESPACE \class QNearFieldTagType1 \brief The QNearFieldTagType1 class provides an interface for communicating with an NFC Tag Type 1 tag. - \since 5.0 \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc */ /*! diff --git a/src/nfc/qnearfieldtagtype1_symbian.cpp b/src/nfc/qnearfieldtagtype1_symbian.cpp index f1adfede..1cfe1b42 100644 --- a/src/nfc/qnearfieldtagtype1_symbian.cpp +++ b/src/nfc/qnearfieldtagtype1_symbian.cpp @@ -171,7 +171,7 @@ QVariant QNearFieldTagType1Symbian::decodeResponse(const QByteArray &command, co Type 1 tag. \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc */ /* diff --git a/src/nfc/qnearfieldtagtype2.cpp b/src/nfc/qnearfieldtagtype2.cpp index 6ee0f77d..7755af68 100644 --- a/src/nfc/qnearfieldtagtype2.cpp +++ b/src/nfc/qnearfieldtagtype2.cpp @@ -54,10 +54,9 @@ QTNFC_BEGIN_NAMESPACE \class QNearFieldTagType2 \brief The QNearFieldTagType2 class provides an interface for communicating with an NFC Tag Type 2 tag. - \since 5.0 \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc */ /*! diff --git a/src/nfc/qnearfieldtagtype3.cpp b/src/nfc/qnearfieldtagtype3.cpp index 68f26bfb..c39b7812 100644 --- a/src/nfc/qnearfieldtagtype3.cpp +++ b/src/nfc/qnearfieldtagtype3.cpp @@ -47,10 +47,9 @@ QTNFC_BEGIN_NAMESPACE \class QNearFieldTagType3 \brief The QNearFieldTagType3 class provides an interface for communicating with an NFC Tag Type 3 tag. - \since 5.0 \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc */ /*! diff --git a/src/nfc/qnearfieldtagtype4.cpp b/src/nfc/qnearfieldtagtype4.cpp index 0fa36ac7..6bd59de8 100644 --- a/src/nfc/qnearfieldtagtype4.cpp +++ b/src/nfc/qnearfieldtagtype4.cpp @@ -47,10 +47,9 @@ QTNFC_BEGIN_NAMESPACE \class QNearFieldTagType4 \brief The QNearFieldTagType4 class provides an interface for communicating with an NFC Tag Type 4 tag. - \since 5.0 \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc */ /*! diff --git a/src/nfc/qnearfieldtarget.cpp b/src/nfc/qnearfieldtarget.cpp index 6bdfbc8a..aea8b0de 100644 --- a/src/nfc/qnearfieldtarget.cpp +++ b/src/nfc/qnearfieldtarget.cpp @@ -57,8 +57,7 @@ QTNFC_BEGIN_NAMESPACE device. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc QNearFieldTarget provides a generic interface for communicating with an NFC target device. Both NFC Forum devices and NFC Forum Tag targets are supported by this class. All target diff --git a/src/nfc/qnfcglobal.h b/src/nfc/qnfcglobal.h index 3e9618b6..6cb90386 100644 --- a/src/nfc/qnfcglobal.h +++ b/src/nfc/qnfcglobal.h @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: http://www.qt-project.org/ ** -** This file is part of the QtConnectivity module of the Qt Toolkit. +** This file is part of the QtNfc module of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:LGPL$ ** GNU Lesser General Public License Usage diff --git a/src/nfc/symbian/nearfieldmanager_symbian.cpp b/src/nfc/symbian/nearfieldmanager_symbian.cpp index b6e6f636..ca4826ca 100644 --- a/src/nfc/symbian/nearfieldmanager_symbian.cpp +++ b/src/nfc/symbian/nearfieldmanager_symbian.cpp @@ -52,8 +52,7 @@ \brief The CNearFieldManager class provides symbian backend implementation to access NFC service. \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc \internal A Symbian implementation class to support symbian NFC backend. diff --git a/src/nfc/symbian/nearfieldtag_symbian.cpp b/src/nfc/symbian/nearfieldtag_symbian.cpp index 5e4a6a41..3b68cdf3 100644 --- a/src/nfc/symbian/nearfieldtag_symbian.cpp +++ b/src/nfc/symbian/nearfieldtag_symbian.cpp @@ -50,9 +50,8 @@ \brief The CNearFieldTag class provides ways to access tag \ingroup connectivity-nfc - \inmodule QtConnectivity + \inmodule QtNfc \internal - \since 5.0 */ CNearFieldTag::CNearFieldTag(MNfcTag * aNfcTag, RNfcServer& aNfcServer) : CActive(EPriorityStandard), diff --git a/src/nfc/symbian/nearfieldtargetfactory_symbian.cpp b/src/nfc/symbian/nearfieldtargetfactory_symbian.cpp index 959f46e1..32e8d1c9 100644 --- a/src/nfc/symbian/nearfieldtargetfactory_symbian.cpp +++ b/src/nfc/symbian/nearfieldtargetfactory_symbian.cpp @@ -59,8 +59,7 @@ to the input tag information \ingroup connectivity-nfc - \inmodule QtConnectivity - \since 5.0 + \inmodule QtNfc */ /* |