![]() |
Qt 6.x
The Qt SDK
|
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate More...
#include <qandroidextras_p.h>
Public Types | |
enum class | CallType { Normal = 0 , OneWay = 1 } |
This enum is used with \l QAndroidBinder::transact() to describe the mode in which the IPC call is performed. More... | |
Public Member Functions | |
QAndroidBinder () | |
Creates a new object which can be used to perform IPC. | |
QAndroidBinder (const QJniObject &binder) | |
Creates a new object from the binder Java object. | |
virtual | ~QAndroidBinder () |
virtual bool | onTransact (int code, const QAndroidParcel &data, const QAndroidParcel &reply, CallType flags) |
Default implementation is a stub that returns false. | |
bool | transact (int code, const QAndroidParcel &data, QAndroidParcel *reply=nullptr, CallType flags=CallType::Normal) const |
Performs an IPC call. | |
QJniObject | handle () const |
The return value is useful to call other Java API which are not covered by this wrapper. | |
Friends | |
class | QAndroidBinderPrivate |
class | QAndroidParcelPrivate |
class | QAndroidServicePrivate |
\inheaderfile QtCore/private/qandroidextras_p.h \preliminary \inmodule QtCorePrivate
Wraps the most important methods of Android Binder class.
The QAndroidBinder is a convenience class that wraps the most important \l {https://developer.android.com/reference/android/os/Binder.html}{Android Binder} methods.
qtcoreprivate-usage
Definition at line 37 of file qandroidextras_p.h.
|
strong |
This enum is used with \l QAndroidBinder::transact() to describe the mode in which the IPC call is performed.
\value Normal normal IPC, meaning that the caller waits the result from the callee \value OneWay one-way IPC, meaning that the caller returns immediately, without waiting for a result from the callee
Enumerator | |
---|---|
Normal | |
OneWay |
Definition at line 40 of file qandroidextras_p.h.
|
explicit |
Creates a new object which can be used to perform IPC.
Definition at line 301 of file qandroidextras.cpp.
QAndroidBinder::QAndroidBinder | ( | const QJniObject & | binder | ) |
Creates a new object from the binder Java object.
Definition at line 311 of file qandroidextras.cpp.
|
virtual |
Definition at line 316 of file qandroidextras.cpp.
QJniObject QAndroidBinder::handle | ( | ) | const |
The return value is useful to call other Java API which are not covered by this wrapper.
Definition at line 369 of file qandroidextras.cpp.
Referenced by QAndroidParcelPrivate::writeBinder().
|
virtual |
Default implementation is a stub that returns false.
The user should override this method to get the transact data from the caller.
The code is the action to perform. The data is the marshaled data sent by the caller.\br The reply is the marshaled data to be sent to the caller.\br The flags are the additional operation flags.\br
Definition at line 334 of file qandroidextras.cpp.
bool QAndroidBinder::transact | ( | int | code, |
const QAndroidParcel & | data, | ||
QAndroidParcel * | reply = nullptr , |
||
CallType | flags = CallType::Normal |
||
) | const |
Performs an IPC call.
The code is the action to perform. Should be between \l {https://developer.android.com/reference/android/os/IBinder.html#FIRST_CALL_TRANSACTION} {FIRST_CALL_TRANSACTION} and \l {https://developer.android.com/reference/android/os/IBinder.html#LAST_CALL_TRANSACTION} {LAST_CALL_TRANSACTION}.\br The data is the marshaled data to send to the target.\br The reply (if specified) is the marshaled data to be received from the target. May be nullptr if you are not interested in the return value.\br The flags are the additional operation flags.\br
Definition at line 355 of file qandroidextras.cpp.
References reply.
|
friend |
Definition at line 59 of file qandroidextras_p.h.
|
friend |
Definition at line 60 of file qandroidextras_p.h.
|
friend |
Definition at line 61 of file qandroidextras_p.h.