IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QAndroidServiceConnection Class

Wraps the most important methods of Android ServiceConnection class.

This class was introduced in Qt 5.10.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QAndroidServiceConnection Class

  • Header: QAndroidServiceConnection

  • Since: Qt 5.10

  • qmake: QT += androidextras

Detailed Description

The QAndroidServiceConnection is a convenience abstract class which wraps the Android ServiceConnection interface.

It is useful when you perform a QtAndroid::bindService operation.

Member Function Documentation

 

QAndroidServiceConnection::QAndroidServiceConnection()

Creates a new object

[explicit] QAndroidServiceConnection::QAndroidServiceConnection(const QAndroidJniObject &serviceConnection)

Creates a new object from an existing serviceConnection.

It's useful when you have your own Java implementation. Of course onServiceConnected()/onServiceDisconnected() will not be called anymore.

QAndroidJniObject QAndroidServiceConnection::handle() const

returns the underline QAndroidJniObject

[pure virtual] void QAndroidServiceConnection::onServiceConnected(const QString &name, const QAndroidBinder &serviceBinder)

This notification is called when the client managed to connect to the service. The name contains the server name, the serviceBinder is the binder that the client uses to perform IPC operations.

This method is called from Binder's thread which is different from the thread that this object was created.

returns the underline QAndroidJniObject

[pure virtual] void QAndroidServiceConnection::onServiceDisconnected(const QString &name)

Called when a connection to the Service has been lost. The name parameter specifies which connectioen was lost.

This method is called from Binder's thread which is different from the thread that this object was created.

returns the underline QAndroidJniObject

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+