• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021–2022 Beijing OSWare Technology Co., Ltd
3  * This file contains confidential and proprietary information of
4  * OSWare Technology Co., Ltd
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #ifndef FB_DEVICE_H
20 #define FB_DEVICE_H
21 #include <memory>
22 #include <unordered_map>
23 #include "hdi_device_common.h"
24 #include "hdi_device_interface.h"
25 #include "hdi_display.h"
26 #include "fb_display.h"
27 #include "display_module_loader.h"
28 namespace OHOS {
29 namespace HDI {
30 namespace DISPLAY {
31 class FbDevice : public HdiDeviceInterface {
32 public:
33     static std::shared_ptr<HdiDeviceInterface> Create();
34     explicit FbDevice(int fd);
35     virtual ~FbDevice() override;
36     virtual int32_t Init() override;
37     virtual void DeInit() override;
38     std::unordered_map<uint32_t, std::shared_ptr<HdiDisplay>> DiscoveryDisplay() override;
39 
40 private:
41     IdMapPtr<HdiDisplay> displays_;
42     int deviceFd_ = -1;
43 };
44 } // namespace DISPLAY
45 } // namespace HDI
46 } // namespace OHOS
47 
48 #endif // FB_DEVICE_H