/****************************************************************************
**
** Copyright (C) 2021 The Qt Company Ltd.
** Contact: https://www.qt.io/licensing/
**
** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:FDL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
** and conditions see https://www.qt.io/terms-conditions. For further
** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Free Documentation License Usage
** Alternatively, this file may be used under the terms of the GNU Free
** Documentation License version 1.3 as published by the Free Software
** Foundation and appearing in the file included in the packaging of
** this file. Please review the following information to ensure
** the GNU Free Documentation License version 1.3 requirements
** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
** $QT_END_LICENSE$
**
****************************************************************************/

/*!
    \page qtnfc-changes-qt6.html
    \title Changes to Qt NFC
    \ingroup changes-qt-5-to-6
    \brief Migrate Qt NFC to Qt 6.

    Qt 6 is a result of the conscious effort to make the framework more
    efficient and easy to use.

    We try to maintain binary and source compatibility for all the public
    APIs in each release. But some changes were inevitable in an effort to
    make Qt a better framework.

    In this topic we summarize those changes in Qt NFC, and provide guidance
    to handle them.

    \section1 New Features and Methods

    \section2 Added \l QNdefRecord::clear()

    Use this method to clear an NDEF record.

    \section2 Added \l QNdefFilter::match()

    Use this method to check if a \l QNdefMessage matches the given filter.
    The method returns \c true in case of successful match and \c false
    otherwise.

    \section2 Extended \l QNearFieldTarget::Type

    The enum was extended with two more types:
    \list
    \li \l QNearFieldTarget::NfcTagType4A
    \li \l QNearFieldTarget::NfcTagType4B
    \endlist

    \section1 Changes in the Features and Methods

    \section2 Renamed QNearFieldManager::isAvailable()

    The \c QNearFieldManager::isAvailable() was renamed to
    \l QNearFieldManager::isEnabled().

    \section2 Added access method argument to \l QNearFieldManager::isSupported

    The \c accessMethod argument allows to check if a specific feature is
    supported. This is relevant because different platforms or versions of
    operating systems can support different options.

    \section2 Added access method argument to \l QNearFieldManager::startTargetDetection

    The \c accessMethod argument allows to scan for NFC tags with the given
    access method.

    \section2 Changed \l QNdefNfcSmartPosterRecord::typeInfo from \l QByteArray to \l QString

    According to NDEF Smart Poster specification, the type is a UTF-8 formatted
    string.
    This affects the \l QNdefNfcSmartPosterRecord::typeInfo() and
    \l QNdefNfcSmartPosterRecord::setTypeInfo() methods.

    \section2 Updated return type of \l QNdefFilter::appendRecord

    \l QNdefFilter::appendRecord now performs a basic validation of input
    parameters and returns a boolean value indicating if the record is appended
    to the filter or not.

    \section1 Removed Features and Methods

    \section2 Removed QNearFieldTarget::url

    The method was never implemented in the existing subclasses of
    \l QNearFieldTarget.

    \section2 Removed QNearFieldTarget::sendCommands

    In Qt 5, the method was not very helpful because it didn't provide a way to
    track the results of intermediate commands. Normally, an additional command
    needs to be sent only when the previous command is successfully executed.

    The correct approach would be to manually create a queue of commands,
    use \l QNearFieldTarget::sendCommand to send a command and
    \l QNearFieldTarget::requestCompleted or \l QNearFieldTarget::error to
    handle the results of each command individually.

    \section2 Removed QNearFieldTarget::keepConnection

    The methods \c QNearFieldTarget::keepConnection() and
    \c QNearFieldTarget::setKeepConnection() were removed. Keeping the
    connection is the default behavior for now.

    \section2 Removed QNearFieldTarget::isProcessingCommand

    The method was never implemented and always returned \c false.

    \section2 Made QNearFieldTarget::setResponseForRequest private API

    The method should not be exposed as a public API. Use
    \l QNearFieldTarget::ndefMessageRead or \l QNearFieldTarget::requestResponse
    to read the data from an NFC tag.

    \section2 Removed QNearFieldTarget::handleResponse

    The method was removed as it just forwarded the call to
    \c QNearFieldManager::setResponseForRequest, which became private API.

    \section2 Made QNearFieldTarget::reportError private API

    A \l QNearFieldTarget::error signal can be used instead.

    \section2 Removed QNearFieldTarget::ndefMessagesWritten signal

    The \l QNearFieldTarget::requestCompleted signal is used for both NDEF
    messages and custom commands. The \c id parameter can be used to check which
    request is actually completed.

    \section2 Removed QNearFieldManager::(un)registerNdefMessageHandler

    The methods \c QNearFieldTarget::registerNdefMessageHandler and
    \c QNearFieldTarget::unregisterNdefMessageHandler were removed.

    Use \l QNearFieldTarget::ndefMessageRead() and \l QNdefFilter::match() to
    detect the NDEF messages and filter the required ones.

    \note The application can still be automatically started once the NDEF Tag
    is touched. The \l {annotatedurl}{Annotated URL} example shows how to
    achieve it on Android.

    \section2 Removed QNearFieldManager::TargetAccessModes

    The \c TargetAccessModes enum was removed together with the getter and
    setter methods (\c QNearFieldManager::setTargetAccessModes() and
    \c {QNearFieldManager::targetAccessModes()}).

    The feature is not supported on Android and iOS platforms.

    \section2 Removed QNearFieldShareManager and QNearFieldShareTarget

    File sharing via NFC is deprecated on Android in API 29. Other technologies
    should be used instead.

    \section2 Removed QML API

    The support for QML API is discontinued.

*/
