147 files changed, 55964 insertions, 55946 deletions
diff --git a/tvapi/android/libtvbinder/ITvService.cpp b/tvapi/android/libtvbinder/ITvService.cpp index d68c60d..b56fea0 100644 --- a/tvapi/android/libtvbinder/ITvService.cpp +++ b/tvapi/android/libtvbinder/ITvService.cpp @@ -1,51 +1,50 @@ - -#include <stdint.h> -#include <sys/types.h> -#include <utils/Log.h> -#include <binder/Parcel.h> -#include <binder/IPCThreadState.h> -#include <binder/IServiceManager.h> - -#include <include/ITvService.h> - -class BpTvService: public BpInterface<ITvService> -{ -public: - BpTvService(const sp<IBinder> &impl) - : BpInterface<ITvService>(impl) - { - } - - // connect to tv service - virtual sp<ITv> connect(const sp<ITvClient> &tvClient) - { - Parcel data, reply; - data.writeInterfaceToken(ITvService::getInterfaceDescriptor()); - data.writeStrongBinder(tvClient->asBinder()); - remote()->transact(BnTvService::CONNECT, data, &reply); - return interface_cast<ITv>(reply.readStrongBinder()); - } -}; - -IMPLEMENT_META_INTERFACE(TvService, "android.amlogic.ITvService"); - -// ---------------------------------------------------------------------- - -status_t BnTvService::onTransact( - uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags) -{ - switch (code) { - case CONNECT: { - CHECK_INTERFACE(ITvService, data, reply); - sp<ITvClient> tvClient = interface_cast<ITvClient>(data.readStrongBinder()); - sp<ITv> tv = connect(tvClient); - ALOGD("BnTvService::onTransact( sp<ITv> tv = connect(tvClient);"); - reply->writeStrongBinder(tv->asBinder()); - return NO_ERROR; - } - break; - default: - return BBinder::onTransact(code, data, reply, flags); - } -} - +
+#include <stdint.h>
+#include <sys/types.h>
+#include <utils/Log.h>
+#include <binder/Parcel.h>
+#include <binder/IPCThreadState.h>
+#include <binder/IServiceManager.h>
+
+#include <include/ITvService.h>
+
+class BpTvService: public BpInterface<ITvService> {
+public:
+ BpTvService(const sp<IBinder> &impl)
+ : BpInterface<ITvService>(impl)
+ {
+ }
+
+ // connect to tv service
+ virtual sp<ITv> connect(const sp<ITvClient> &tvClient)
+ {
+ Parcel data, reply;
+ data.writeInterfaceToken(ITvService::getInterfaceDescriptor());
+ data.writeStrongBinder(tvClient->asBinder());
+ remote()->transact(BnTvService::CONNECT, data, &reply);
+ return interface_cast<ITv>(reply.readStrongBinder());
+ }
+};
+
+IMPLEMENT_META_INTERFACE(TvService, "android.amlogic.ITvService");
+
+// ----------------------------------------------------------------------
+
+status_t BnTvService::onTransact(
+ uint32_t code, const Parcel &data, Parcel *reply, uint32_t flags)
+{
+ switch(code) {
+ case CONNECT: {
+ CHECK_INTERFACE(ITvService, data, reply);
+ sp<ITvClient> tvClient = interface_cast<ITvClient>(data.readStrongBinder());
+ sp<ITv> tv = connect(tvClient);
+ ALOGD("BnTvService::onTransact( sp<ITv> tv = connect(tvClient);");
+ reply->writeStrongBinder(tv->asBinder());
+ return NO_ERROR;
+ }
+ break;
+ default:
+ return BBinder::onTransact(code, data, reply, flags);
+ }
+}
+
|