You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
2.3 KiB
71 lines
2.3 KiB
/*
|
|
* Copyright (c) Hisilicon Technologies Co., Ltd. 2012-2021. All rights reserved.
|
|
* Description: hidl interface of DTV
|
|
*/
|
|
#ifndef ANDROID_HARDWARE_HWDTV_V1_0_HWDTV_H
|
|
#define ANDROID_HARDWARE_HWDTV_V1_0_HWDTV_H
|
|
|
|
#include <binder/IPCThreadState.h>
|
|
#include <vendor/huanglong/hardware/hwdtv/1.0/IHwdtv.h>
|
|
#include <vendor/huanglong/hardware/hwdtv/1.0/IHwdtvCallback.h>
|
|
|
|
#include "IPluginCallback.h"
|
|
#include "IPlugin.h"
|
|
|
|
namespace vendor {
|
|
namespace huanglong {
|
|
namespace hardware {
|
|
namespace hwdtv {
|
|
namespace V1_0 {
|
|
namespace implementation {
|
|
using ::android::Parcel;
|
|
using ::android::status_t;
|
|
using ::android::Vector;
|
|
using ::android::Mutex;
|
|
using ::android::wp;
|
|
using ::vendor::huanglong::hardware::hwdtv::V1_0::IHwdtv;
|
|
using ::vendor::huanglong::hardware::hwdtv::V1_0::IHwdtvCallback;
|
|
using ::android::hardware::Return;
|
|
using ::android::hardware::Void;
|
|
using ::android::hardware::hidl_vec;
|
|
using ::android::hardware::hidl_string;
|
|
using ::android::hardware::hidl_death_recipient;
|
|
using ::android::sp;
|
|
|
|
class DtvDeathRecipient;
|
|
|
|
struct Hwdtv : public IHwdtv, public IPluginCallback {
|
|
Hwdtv();
|
|
|
|
// Methods from ::vendor::huanglong::hardware::hwdtv::V1_0::IHwdtv follow.
|
|
Return<int32_t> setPlugins(const hidl_string& path) override;
|
|
Return<void> hwInvoke(const hidl_string& request, hwInvoke_cb _hidl_cb) override;
|
|
Return<void> disconnect() override;
|
|
Return<int32_t> setCallback(const sp<IHwdtvCallback>& callback) override;
|
|
Return<void> getCapBuffer(uint32_t id, getCapBuffer_cb _hidl_cb) override;
|
|
Return<void> onObjectDeath(uint64_t cookie);
|
|
public:
|
|
sp<DtvDeathRecipient> mDeathRecipient;
|
|
private:
|
|
Return<void> getDtvClient();
|
|
Return<int32_t> registerPlugin(const SVR_CHAR* pcUrl);
|
|
status_t notify(SVR_S32 s32Msg, SVR_S32 s32Ext1, SVR_S32 s32Ext2, SVR_S32 s32Ext3,
|
|
const Parcel* pParcelObj, Parcel* pParcelReply) override;
|
|
status_t invoke(const android::Parcel& request, android::Parcel* reply);
|
|
|
|
std::vector<sp<IHwdtvCallback>> mCallbacks;
|
|
Vector<DOL_DTV_PLUGIN_S *> mPluginList;
|
|
Mutex mNotifyLock;
|
|
Mutex mLock;
|
|
};
|
|
|
|
extern "C" IHwdtv* HIDL_FETCH_IHwdtv(const char* name);
|
|
} // namespace implementation
|
|
} // namespace V1_0
|
|
} // namespace hwdtv
|
|
} // namespace hardware
|
|
} // namespace huanglong
|
|
} // namespace vendor
|
|
|
|
#endif // ANDROID_HARDWARE_HWDTV_V1_0_HWDTV_H
|