display: Clean up binder interface
The current binder implementation is inflexible when it comes to
adding new input/output parameters. It also needs a lot of
boilerplate code written when adding a simple enable/disable type
command.
Instead, let clients specify the parcels they want to pass and
unparcel them at the end points only.
Please note that it is assumed that all commands coming in
need the same permission checks. If this is no longer the case,
some commands need to be split out on the receiver end in
IQService.cpp.
This change also simplifies the code end clients need to write.
They should be able to include QServiceUtils and call a single
function to set the binder up and make the call.
Change-Id: I4db66f2427ecf16d7a6264462ae85815217a16b1
diff --git a/libhwcomposer/hwc_qclient.h b/libhwcomposer/hwc_qclient.h
index fa1d6b0..d955377 100644
--- a/libhwcomposer/hwc_qclient.h
+++ b/libhwcomposer/hwc_qclient.h
@@ -39,6 +39,7 @@
struct hwc_context_t;
+class Params;
namespace qClient {
// ----------------------------------------------------------------------------
@@ -46,7 +47,9 @@
public:
QClient(hwc_context_t *ctx);
virtual ~QClient();
- virtual android::status_t notifyCallback(uint32_t msg, uint32_t value);
+ virtual android::status_t notifyCallback(uint32_t command,
+ const android::Parcel* inParcel,
+ android::Parcel* outParcel);
private:
//Notifies of Media Player death
@@ -57,13 +60,6 @@
hwc_context_t *mHwcContext;
};
- void securing(uint32_t startEnd);
- void unsecuring(uint32_t startEnd);
- android::status_t screenRefresh();
- void setExtOrientation(uint32_t orientation);
- void setBufferMirrorMode(uint32_t enable);
- android::status_t vpuCommand(uint32_t command, uint32_t setting);
-
hwc_context_t *mHwcContext;
const android::sp<android::IMediaDeathNotifier> mMPDeathNotifier;
};