/* * 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 #include #include #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 setPlugins(const hidl_string& path) override; Return hwInvoke(const hidl_string& request, hwInvoke_cb _hidl_cb) override; Return disconnect() override; Return setCallback(const sp& callback) override; Return getCapBuffer(uint32_t id, getCapBuffer_cb _hidl_cb) override; Return onObjectDeath(uint64_t cookie); public: sp mDeathRecipient; private: Return getDtvClient(); Return 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> mCallbacks; Vector 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