Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

Connectivity

Overview

The Connectivity API provides a set of APIs for communicating with local devices.

The current version of the Connectivity API includes support for Bluetooth and Near Field Communication (NFC) technologies. Bluetooth is a short-range (less than 100 meters) wireless technology. It has a reasonably high data transfer rate of 2.1 Mbit/s, which makes it ideal for transfering data between devices.

The Bluetooth API provides classes for controlling the local Bluetooth device, discovering devices in the local vacinity, discovering services provided by those devices, publishing services and both server and client sockets for L2CAP and RFCOMM protocols.

NFC is an extremely short-range (approx. 1 centimeter) wireless techonology and has a maximum transfer rate of 424 kbit/s. NFC is ideal for transfer small packets of data when two devices are touched together.

The NFC API provides APIs for interacting with NFC Forum Tags and NFC Forum Devices, including target detection and loss, registering NDEF message handlers, reading and writing NDEF messages to NFC Forum Tags, send tag specific commands. The API also provides client and server LLCP sockets.

Known Issues and Limitations

Bluetooth and S60 5.0/Symbian^1

The S60 5.0 SDK as shipped by Nokia does not include all the required header files and libraries to compile the bluetooth backend for Symbian. It contains a subset of the requires bluetooth library. There is a Bluetooth plugin available for the S60 3.2 SDK but it cannot be used since it will overwrite and damage part of the bluetooth support already present in the 5.0 SDK. As such, compiling QtMobility for Symbian/S60 5.0 not recommended until Nokia releases a S60 5.0/Symbian^1 bluetooth plugin. A bug has been opened about this issue: http://bugreports.qt.nokia.com/browse/QTMOBILITY-1660

NFC

The NFC API is only supported on Harmattan and Symbian^3 and the Qt Simulator. On Symbian^3 the API is fully functional. On the Qt Simulator only target detection and loss and tag access are support. On Harmattan the following features are NOT supported:

  • Connectionless LLCP sockets (both client and server).
  • Tag type specific access.

Examples

Some interesting examples for the API exist.

ExampleDescription
NFC Annotated URLDisplays URL along with caption text and an image from from an NFC tag containing a specially formated NDEF message.
Bluetooth ChatA chat server and client using bluetooth.
Bluetooth TennisThe classic game of Pong. Supports multiplayer over Bluetooth and touch-to-play functionality on devices that support NFC.
Bluetooth File TransferTransfer files between Bluetooth devices.
Bluetooth ScannerScan for Bluetooth devices.
NDEF EditorCreate NDEF messages using the NDEF records supported by the Connectivity API and save them to supported NFC Forum tags.
QML Bluetooth TennisThe tennis game using a QML interface to the Bluetooth API. It must connect to an instance of the C++ Bluetooth Tennis game to play.
QML Bluetooth ScannerA QML implementation of the Bluetooth device scanner.
QML PosterA QML implementation of the NFC Annotated URL example.

Main Classes

NFC Classes

QDeclarativeNdefRecord

Implements the NdefRecord element in QML

QLlcpServer

NFC LLCP socket based server

QLlcpSocket

NFC LLCP socket

QML NdefMimeRecord Element

The NdefMimeRecord element represents an NFC MIME record.

QNdefFilter

Filter for matching NDEF messages

QNdefMessage

NFC NDEF message

QNdefNfcTextRecord

NFC RTD-Text

QNdefNfcUriRecord

NFC RTD-URI

QNdefRecord

NFC NDEF record

QNearFieldManager

Access to notifications for NFC events

QNearFieldTagType1

Interface for communicating with an NFC Tag Type 1 tag

QNearFieldTagType2

Interface for communicating with an NFC Tag Type 2 tag

QNearFieldTagType3

Interface for communicating with an NFC Tag Type 3 tag

QNearFieldTagType4

Interface for communicating with an NFC Tag Type 4 tag

QNearFieldTarget

Interface for communicating with a target device

Bluetooth Classes

QBluetoothServiceInfo::Alternative

Data type for Bluetooth Data Element Alternative attributes

QBluetooth

Contains functions and definitions related to Bluetooth

QBluetoothAddress

Bluetooth address

QBluetoothDeviceDiscoveryAgent

API for discovering nearby Bluetooth devices

QBluetoothDeviceInfo

Information about Bluetooth devices

QBluetoothLocalDevice

Access to local Bluetooth devices

QBluetoothServiceDiscoveryAgent

API for querying the services provided by a Bluetooth device

QBluetoothServiceInfo

Information about services

QBluetoothSocket

Bluetooth socket

QBluetoothTransferManager

Allows the application to send data objects to other devices. Currently implemented using OPP

QBluetoothTransferReply

Contains the data and headers for a request sent with QBluetoothTranferManager

QBluetoothTransferRequest

Holds a request to be sent with QBluetoothTransferManager

QBluetoothUuid

Bluetooth UUID

QL2capServer

L2CAP server

QRfcommServer

RFCOMM server

QBluetoothServiceInfo::Sequence

Data type for Bluetooth Data Element Sequence attributes

Qt Quick Elements

QML BluetoothDiscoveryModel Element

The BluetoothDiscoveryModel element provides access device and service scanning

QML BluetoothService Element

The BluetoothService element contains all the information available for a single bluetooth service..

QML BluetoothSocket Element

The BluetoothSocket element represents a single bluetooth client socket.

QML NdefFilter Element

The NdefFilter element represents a filtering constraint for NDEF message records.

QML NdefRecord Element

The NdefRecord element represents a record in an NDEF message.

QML NdefTextRecord Element

The NdefTextRecord element represents an NFC RTD-Text NDEF record.

QML NdefUriRecord Element

The NdefUriRecord element represents an NFC RTD-URI NDEF record.

QML NearField Element

The NearField element provides access to NDEF messages stored on NFC Forum tags.

QML NearFieldSocket Element

The NearFieldSocket element represents an LLCP socket.

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 53
  2. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  3. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  4. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  5. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  6. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
  7. La rubrique Qt a besoin de vous ! 1
Page suivante

Le blog Digia au hasard

Logo

Déploiement d'applications Qt Commercial sur les tablettes Windows 8

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtmobility-1.2
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web