1 /* 2 * Copyright (c) Huawei Technologies Co., Ltd. 2023. All rights reserved. 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 NATIVE_MEMORY_PROFILER_SA_STUB_H 17 #define NATIVE_MEMORY_PROFILER_SA_STUB_H 18 19 #include "iremote_stub.h" 20 #include "message_parcel.h" 21 #include "nocopyable.h" 22 23 #include "i_native_memory_profiler_sa.h" 24 #include "native_memory_profiler_sa_interface_code.h" 25 26 namespace OHOS::Developtools::NativeDaemon { 27 class NativeMemoryProfilerSaStub : public IRemoteStub<INativeMemoryProfilerSa> { 28 public: 29 NativeMemoryProfilerSaStub() = default; 30 DISALLOW_COPY_AND_MOVE(NativeMemoryProfilerSaStub); 31 virtual ~NativeMemoryProfilerSaStub() = default; 32 33 virtual int32_t OnRemoteRequest(uint32_t code, MessageParcel& data, MessageParcel& reply, 34 MessageOption& options) override; 35 36 protected: 37 int32_t StubStart(MessageParcel &data, MessageParcel &reply); 38 int32_t StubStopPid(MessageParcel &data, MessageParcel &reply); 39 int32_t StubStopName(MessageParcel &data, MessageParcel &reply); 40 int32_t StubDumpFile(MessageParcel &data, MessageParcel &reply); 41 int32_t StubDumpSimpFile(MessageParcel &data, MessageParcel &reply); 42 }; 43 } // namespace OHOS::Developtools::NativeDaemon 44 45 #endif // NATIVE_MEMORY_PROFILER_SA_STUB_H