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 16 #ifndef FRAMEWORKS_DUMPRE_INCLUDE_IGRAPHIC_DUMPER_COMMAND_H 17 #define FRAMEWORKS_DUMPRE_INCLUDE_IGRAPHIC_DUMPER_COMMAND_H 18 19 #include <string> 20 21 #include <iremote_broker.h> 22 23 #include "graphic_common.h" 24 #include "ipc/igraphic_dumper_info_listener.h" 25 26 namespace OHOS { 27 class IGraphicDumperCommand : public IRemoteBroker { 28 public: 29 virtual GSError GetConfig(const std::string &k, std::string &v) = 0; 30 virtual GSError SetConfig(const std::string &k, const std::string &v) = 0; 31 virtual GSError Dump(const std::string &tag) = 0; 32 virtual GSError GetLog(const std::string &tag, std::string &log) = 0; 33 virtual GSError AddInfoListener(const std::string &tag, sptr<IGraphicDumperInfoListener> &listener) = 0; 34 35 DECLARE_INTERFACE_DESCRIPTOR(u"IGraphicDumperCommand"); 36 37 protected: 38 enum { 39 IGRAPHIC_DUMPER_COMMAND_GET_CONFIG, 40 IGRAPHIC_DUMPER_COMMAND_SET_CONFIG, 41 IGRAPHIC_DUMPER_COMMAND_DUMP, 42 IGRAPHIC_DUMPER_COMMAND_GET_LOG, 43 IGRAPHIC_DUMPER_COMMAND_ADD_INFO_LISTENER, 44 }; 45 }; 46 } // namespace OHOS 47 48 #endif // FRAMEWORKS_DUMPRE_INCLUDE_IGRAPHIC_DUMPER_COMMAND_H 49