• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 SOC_PERF_INCLUDE_I_SOCPERF_SERVICE_H
17 #define SOC_PERF_INCLUDE_I_SOCPERF_SERVICE_H
18 
19 #include <string>
20 #include "iremote_broker.h"
21 #include "iremote_stub.h"
22 #include "iremote_proxy.h"
23 #include "iremote_object.h"
24 #include "system_ability.h"
25 #include "system_ability_definition.h"
26 #include "if_system_ability_manager.h"
27 #include "iservice_registry.h"
28 #include "socperf_common.h"
29 
30 namespace OHOS {
31 namespace SOCPERF {
32 class ISocPerfService : public IRemoteBroker {
33 public:
34     ISocPerfService() = default;
35     ~ISocPerfService() override = default;
36     DISALLOW_COPY_AND_MOVE(ISocPerfService);
37 
38 public:
39     virtual void PerfRequest(int32_t cmdId, const std::string& msg) = 0;
40     virtual void PerfRequestEx(int32_t cmdId, bool onOffTag, const std::string& msg) = 0;
41     virtual void PowerLimitBoost(bool onOffTag, const std::string& msg) = 0;
42     virtual void ThermalLimitBoost(bool onOffTag, const std::string& msg) = 0;
43     virtual void LimitRequest(int32_t clientId,
44         const std::vector<int32_t>& tags, const std::vector<int64_t>& configs, const std::string& msg) = 0;
45 
46 public:
47     enum {
48         TRANS_IPC_ID_PERF_REQUEST             = 0x0001,
49         TRANS_IPC_ID_PERF_REQUEST_EX          = 0x0002,
50         TRANS_IPC_ID_POWER_LIMIT_BOOST_FREQ   = 0x0005,
51         TRANS_IPC_ID_THERMAL_LIMIT_BOOST_FREQ = 0x0008,
52         TRANS_IPC_ID_LIMIT_REQUEST            = 0x0009,
53     };
54 
55 public:
56     DECLARE_INTERFACE_DESCRIPTOR(u"Resourceschedule.ISocPerfService");
57 };
58 } // namespace SOCPERF
59 } // namespace OHOS
60 
61 #endif // SOC_PERF_INCLUDE_I_SOCPERF_SERVICE_H
62