![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\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.
Definition at line 111 of file qandroidextras_p.h.
QAndroidServiceConnection::QAndroidServiceConnection | ( | ) |
Creates a new object.
Definition at line 389 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 401 of file qandroidextras.cpp.
|
virtual |
Definition at line 406 of file qandroidextras.cpp.
QJniObject QAndroidServiceConnection::handle | ( | ) | const |
returns the underline QJniObject
Definition at line 414 of file qandroidextras.cpp.
|
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