![]() |
Qt 6.x
The Qt SDK
|
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate More...
#include <qandroidextras_p.h>
Public Member Functions | |
QAndroidServiceConnection () | |
Creates a new object. | |
QAndroidServiceConnection (const QJniObject &serviceConnection) | |
Creates a new object from an existing serviceConnection. | |
virtual | ~QAndroidServiceConnection () |
virtual void | onServiceConnected (const QString &name, const QAndroidBinder &serviceBinder)=0 |
This notification is called when the client managed to connect to the service. | |
virtual void | onServiceDisconnected (const QString &name)=0 |
Called when a connection to the Service has been lost. | |
QJniObject | handle () const |
returns the underline QJniObject | |
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate
Wraps the most important methods of Android ServiceConnection class.
The QAndroidServiceConnection is a convenience abstract class which wraps the \l {https://developer.android.com/reference/android/content/ServiceConnection.html}{AndroidServiceConnection} interface.
It is useful when you perform a QtAndroidPrivate::bindService operation.
qtcoreprivate-usage
Definition at line 109 of file qandroidextras_p.h.
QAndroidServiceConnection::QAndroidServiceConnection | ( | ) |
Creates a new object.
Definition at line 398 of file qandroidextras.cpp.
|
explicit |
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.
Definition at line 410 of file qandroidextras.cpp.
|
virtual |
Definition at line 415 of file qandroidextras.cpp.
QJniObject QAndroidServiceConnection::handle | ( | ) | const |
returns the underline QJniObject
Definition at line 423 of file qandroidextras.cpp.
Referenced by QtAndroidPrivate::bindService().
|
pure virtual |
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.
returns the underline QJniObject
Called when a connection to the Service has been lost.
The name parameter specifies which connectioen was lost.
returns the underline QJniObject