• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 I_NATIVE_MEMORY_PROFILER_SA_H
17 #define I_NATIVE_MEMORY_PROFILER_SA_H
18 
19 #include "iremote_broker.h"
20 #include "system_ability_definition.h"
21 #include "native_memory_profiler_sa_interface_code.h"
22 #include "define_macro.h"
23 #include "native_memory_profiler_sa_config.h"
24 
25 namespace OHOS::Developtools::NativeDaemon {
26 class INativeMemoryProfilerSa : public IRemoteBroker {
27 public:
28     static constexpr int32_t NATIVE_DAEMON_SYSTEM_ABILITY_ID = DFX_SYS_NATIVE_MEMORY_PROFILER_SERVICE_ABILITY_ID;
29     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.NativeMemory.INativeMemoryProfilerSa");
30 
31     virtual int32_t Start(std::shared_ptr<NativeMemoryProfilerSaConfig>& config) = 0;
32     virtual int32_t Stop(uint32_t pid) = 0;
33     virtual int32_t Stop(const std::string& name) = 0;
34     virtual int32_t DumpData(uint32_t fd, std::shared_ptr<NativeMemoryProfilerSaConfig>& config) = 0;
35     virtual int32_t Start(std::shared_ptr<NativeMemoryProfilerSaConfig>& config, std::string& replyStats) = 0;
36     virtual int32_t Start(std::shared_ptr<NativeMemoryProfilerSaConfig>& config, MessageParcel &reply) = 0;
37 };
38 } // namespace OHOS::Developtools::NativeDaemon
39 
40 #endif // I_NATIVE_MEMORY_PROFILER_SA_H