libqservice: Add a client interface.
Add a client interface which interfaces with hwc.
qservice upon receiving IPC, provides a callback notification to the qclient
which does appropriate stuff in hwc.
In future, qservice can safely be even made a separate process with no changes
to exisiting code. This was not true earlier owing to the hwc pointer held by
qservice forcing it to be in the same process that hwc is in.
CRs-fixed: 452977
Change-Id: I05838c213f5d4606a6573693de1bacbc5876107e
diff --git a/libqservice/IQService.h b/libqservice/IQService.h
index 8647efa..70e6c64 100644
--- a/libqservice/IQService.h
+++ b/libqservice/IQService.h
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2010 The Android Open Source Project
- * Copyright (C) 2012, The Linux Foundation. All rights reserved.
+ * Copyright (C) 2012-2013, The Linux Foundation. All rights reserved.
*
* Not a Contribution, Apache license notifications and license are
* retained for attribution purposes only.
@@ -26,6 +26,8 @@
#include <utils/Errors.h>
#include <utils/RefBase.h>
#include <binder/IInterface.h>
+#include <binder/IBinder.h>
+#include <IQClient.h>
namespace qService {
// ----------------------------------------------------------------------------
@@ -34,8 +36,10 @@
public:
DECLARE_META_INTERFACE(QService);
enum {
- SECURING = 0, // Hardware securing start/end notification
+ // Hardware securing start/end notification
+ SECURING = android::IBinder::FIRST_CALL_TRANSACTION,
UNSECURING, // Hardware unsecuring start/end notification
+ CONNECT,
};
enum {
END = 0,
@@ -43,6 +47,7 @@
};
virtual void securing(uint32_t startEnd) = 0;
virtual void unsecuring(uint32_t startEnd) = 0;
+ virtual void connect(const android::sp<qClient::IQClient>& client) = 0;
};
// ----------------------------------------------------------------------------