1 /* 2 * Copyright (C) 2021 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 #ifndef SADUMPER_H 16 #define SADUMPER_H 17 #include <iservice_registry.h> 18 #include "../include/executor/hidumper_executor.h" 19 20 namespace OHOS { 21 namespace HiviewDFX { 22 class SADumper : public HidumperExecutor { 23 public: 24 SADumper(void); 25 ~SADumper(void); 26 27 public: 28 virtual DumpStatus PreExecute(const std::shared_ptr<DumperParameter> ¶meter, StringMatrix dumpDatas) override; 29 virtual DumpStatus Execute() override; 30 virtual DumpStatus AfterExecute() override; 31 using StringVector = std::vector<std::string>; 32 using U16StringVector = std::vector<std::u16string>; 33 34 private: 35 StringMatrix result_; 36 StringVector names_; 37 U16StringVector args_; 38 39 DumpStatus GetData(const std::string &name, const sptr<ISystemAbilityManager> &sam); 40 }; 41 } // namespace HiviewDFX 42 } // namespace OHOS 43 44 #endif // End of SADUMPER_H 45