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.
50 lines
1.2 KiB
50 lines
1.2 KiB
4 months ago
|
/*
|
||
|
* Copyright (c) Hisilicon Technologies Co., Ltd.. 2019-2022. All rights reserved.
|
||
|
* Description: Support hwdisplay hal adaptation interface
|
||
|
* Author: Hisilicon
|
||
|
* Created: 2022-12-28
|
||
|
*/
|
||
|
|
||
|
#ifndef TVMANAGER_H
|
||
|
#define TVMANAGER_H
|
||
|
|
||
|
#define TAG "DispManager"
|
||
|
|
||
|
#include "IDispManager.h"
|
||
|
#include "DispClient.h"
|
||
|
#include "td_type.h"
|
||
|
|
||
|
#include <utils/String16.h>
|
||
|
#include <binder/Parcel.h>
|
||
|
#include <hwbinder/Parcel.h>
|
||
|
#include <vendor/huanglong/hardware/hwdisplay/2.0/types.h>
|
||
|
|
||
|
namespace android {
|
||
|
|
||
|
class DispManager : virtual public IDispManager, virtual public IDispClientCallback {
|
||
|
public:
|
||
|
int SetListener(const sp<IDispListener> &listener) override;
|
||
|
void RegisterCallback(const unsigned int eventId) override;
|
||
|
void UnRegisterCallback(const unsigned int eventId) override;
|
||
|
void InitTvClient();
|
||
|
status_t Invoke(const hardware::Parcel &request, hardware::Parcel *reply) override;
|
||
|
|
||
|
DispManager();
|
||
|
~DispManager() override;
|
||
|
|
||
|
private:
|
||
|
void Notify(unsigned int type, const void *data, unsigned int len) override;
|
||
|
sp<IDispListener> mListener;
|
||
|
sp<DispClient> mClient;
|
||
|
Mutex mLock;
|
||
|
};
|
||
|
|
||
|
inline DispManager::DispManager()
|
||
|
{
|
||
|
InitTvClient();
|
||
|
}
|
||
|
|
||
|
inline DispManager::~DispManager() {}
|
||
|
}; // namespace android
|
||
|
#endif
|