1 /*
2  * Copyright (c) 2023 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef DISPLAY_DUMP_DISP_H
17 #define DISPLAY_DUMP_DISP_H
18 
19 #include <securec.h>
20 #include <stdio.h>
21 #include <thread>
22 #include <mutex>
23 #include <condition_variable>
24 #include "hdf_sbuf.h"
25 #include "devhost_dump_reg.h"
26 #include "display_log.h"
27 
28 namespace OHOS {
29 namespace HDI {
30 namespace Display {
31 namespace Composer {
32 namespace V1_0 {
33 
34 using namespace OHOS::HDI::Display::Composer::V1_0;
35 
36 class DisplayDumper {
37 public:
~DisplayDumper()38     ~DisplayDumper() {};
39     int32_t ShowDumpMenu(struct HdfSBuf *reply);
40     int32_t ComposerHostDumpProcess(struct HdfSBuf *data, struct HdfSBuf *reply, uint32_t argsNum);
GetInstance()41     static DisplayDumper& GetInstance()
42     {
43         static DisplayDumper instance_;
44         return instance_;
45     }
46 private:
DisplayDumper()47     DisplayDumper() {};
48 };
49 
50 } //namespace V1_0
51 } //namespace Composer
52 } //namespace Display
53 } //namespace HDI
54 } //namespace OHOS
55 #endif