123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174 |
- /*
- * Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
- * All rights reserved.
- * This component and the accompanying materials are made available
- * under the terms of "Eclipse Public License v1.0"
- * which accompanies this distribution, and is available
- * at the URL "http://www.eclipse.org/legal/epl-v10.html".
- *
- * Initial Contributors:
- * Nokia Corporation - initial contribution.
- *
- * Contributors:
- *
- * Description: Main.
- */
- /*!
- * \file
- * \brief Declaration of the main() function for the Qt NFC NPP Example
- * application.
- */
-
- /*! \mainpage NFC NPP Example application.
- *
- * \section intro_sec Introduction
- *
- * The NFC NPP Example is a sample application that demonstrates how to
- * use the NFC LLCP protocol to create a peer-to-peer connection between two
- * NFC enabled devices and how to send and receive NDEF messages between a Symbian
- * and an Android device. NDEF messages containing NFC Text records or NFC URI
- * records as defined in NFC Forum specifications can be sent and received.
- *
- * Android uses NDEF Push Protocol to format the NDEF messages sent between two
- * Android devices. The NFC NPP Example application demonstrates how to create and
- * parse NPP compliant messages to be able to communicate with an Android device.
- *
- * A custom-made Qt Quick user interface uses a toggle button to switch between
- * NFC Text or NFC URI record types and a simple listview to show the received messages
- * on the screen. The "Send" button stores the message into a buffer. Buffer is then
- * sent when devices are brought close to each other. Also a "Message sent." dialog,
- * is shown when the devices have connected and the message has been sent.
- *
- * The C++ class NfcNppExample is responsible for listening for NFC targets and
- * establishing an LLCP socket connection to the client. An LLCP server is waiting for
- * incoming connections at a specified URI and then provides a socket to read data
- * from the client. It also parses and creates the NDEF Push Protocol messages sent
- * between the Symbian and Android device.
- *
- * \section capability_sec Required capablities
- * The application can be self-signed.
- *
- * \section knownissues_sec Known issues
- * Symbian does not yet support the "com.android.npp" service URI.
- *
- * If the selected link does not open in the Symbian device, check that the browser is
- * not already running. If it is, close it and activate the link again. This is a drawback
- * caused by the application not having the SwEvent capability. Adding the capability
- * would require the installation package to be signed with a developer certificate,
- * and self-signing would no longer be possible.
- *
- * \section build_install_sec Building and installation
- *
- * \subsection build_and_installation_preparations_subsec Preparations
- *
- * Check that you have the latest Qt/Qt SDK installed in the development environment
- * and on the device. Qt SDK 1.1 or later is required.
- *
- * Additionally, create a target for Qt 4.7.3 and Qt Mobility 1.2
- * for Symbian^3 following the instructions from:
- * https://projects.forum.nokia.com/QtM12bSymb
- *
- * Make sure you have a C7-00 with Symbian Anna Firmware to test.
- * The application can be self-signed.
- *
- * \subsection build_and_installation_qt_sdk_subsec Build & installation instructions using Qt SDK
- *
- * <ol>
- * <li>
- * Open nfcnppexample.pro by selecting the File > Open File or Project, browse
- * to the location where you unpacked the sample application and select nfcnppexample.pro.
- * </li>
- * <li>
- * Select the "Qt 4.7.3 for Symbian^3 with QtM1.2b" target and press the Finish button.
- * </li>
- * <li>
- * Ensure your NFC enabled Symbian device is connected to the development PC
- * via USB and that is shows up as connected in Qt Creator (i.e. the build
- * target selection button in the lower left corner shows a Symbian Device
- * with a green checkbox).
- * </li>
- * <li>
- * Press the Run button to build the project and create the nfcnppexample.sis
- * Symbian install package. The application is installed and run on the device.
- * </li>
- * </ol>
- *
- * \subsection build_and_installation_command_prompt_subsec Build & installation instructions using the Command Prompt
- *
- * <ol>
- * <li>
- * Open Qt SDK command prompt from the Start menu by selecting Start > All
- * Programs > Qt SDK 1.1 > Symbian^3 Qt 4.7.3 > Qt 4.7.3 for Symbian^3 Command Prompt.
- * </li>
- * <li>
- * In the directory where nfcnppexample.pro is located use the following
- * commands to build the application and to create the installation package:
- * \code
- * >qmake
- * >sbs -c armv5_gcce
- * >createpackage -g nfcnppexample_template.pkg release-gcce
- * \endcode
- * </li>
- * <li>
- * Nokia Ovi Suite is required to deploy the created installation package
- * into the device. Double click the created nfcnppexample.sis file in
- * Windows Explorer or use the createpackage command with -i option. Both
- * start the installation process.
- * </li>
- * </ol>
- *
- * \section usage_sec Usage
- *
- * You must have one Symbian NFC enabled device that has NfcNppExample application
- * installed and one Android Nexus S device that has the NfcNppExample Android
- * counterpart application installed.
- *
- * To establish a connection between devices, start the applications on both devices and
- * bring devices close to each other. The "Message sent." dialog is shown on successful
- * connection and data exchange.
- *
- * The content of the sent NDEF message can be toggled between NFC Text record and NFC URI
- * record. The default data for the record type changes accordingly. To change the data,
- * tap the text editor and write a new value. Press the "Send" button to buffer the data.
- * Bring the devices close to each other to send the message.
- *
- * Received messages are shown on the scrolling view. Received NFC URI record links can
- * be opened in the browser by tapping on them.
- *
- *
- * \section compatibility_sec Compatibility
- *
- * This sample application has been tested using the following hardware and
- * software:
- *
- * <ul>
- * <li>Nokia C7-00 with Symbian Anna Firmware</li>
- * <li>Nokia Qt SDK 1.1</li>
- * <li>QtMobility 1.2 Beta1</li>
- * </ul>
- *
- * \section change_history_sec Change history
- *
- * 1.0 First version
- *
- * \section references_sec References
- *
- * NFC: http://www.forum.nokia.com/NFC
- *
- * Qt for Symbian: http://qt.nokia.com/downloads
- */
- #ifndef MAIN_H
- #define MAIN_H
- /*!
- * \fn int main(int argc, char *argv[])
- * \brief The <code>main()</code> function for the Qt NFC NPP Example application.
- *
- * Constructs the declarative main view of the application and starts the Qt event loop.
- */
- int main(int argc, char *argv[]);
- #endif // MAIN_H
|