1 /* 2 * Copyright (c) 2022 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 ACCESSIBILITY_DUMPER_H 17 #define ACCESSIBILITY_DUMPER_H 18 19 #include <refbase.h> 20 #include <string> 21 22 namespace OHOS { 23 namespace Accessibility { 24 enum DumpType : uint32_t { 25 DUMP_USER = 0, 26 DUMP_CLIENT, 27 DUMP_ACCESSIBILITY_WINDOW, 28 DUMP_NONE = 100, 29 }; 30 class AccessibilityDumper : public RefBase { 31 public: AccessibilityDumper()32 AccessibilityDumper() {} 33 int Dump(int fd, const std::vector<std::u16string>& args) const; 34 35 private: 36 int DumpAccessibilityInfo(const std::vector<std::string>& args, std::string& dumpInfo) const; 37 int DumpAccessibilityClientInfo(std::string& dumpInfo) const; 38 int DumpAccessibilityWindowInfo(std::string& dumpInfo) const; 39 int DumpAccessibilityUserInfo(std::string& dumpInfo) const; 40 void ShowHelpInfo(std::string& dumpInfo) const; 41 void ShowIllegalArgsInfo(std::string& dumpInfo) const; 42 }; 43 } // Accessibility 44 } // OHOS 45 #endif // ACCESSIBILITY_DUMPER_H 46