• 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_ISERVICE_H
17 #define SOC_PERF_ISERVICE_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     virtual void PerfRequest(int cmdId, const std::string& msg) = 0;
35     virtual void PerfRequestEx(int cmdId, bool onOffTag, const std::string& msg) = 0;
36     virtual void PowerRequest(int cmdId, const std::string& msg) = 0;
37     virtual void PowerRequestEx(int cmdId, bool onOffTag, const std::string& msg) = 0;
38     virtual void PowerLimitBoost(bool onOffTag, const std::string& msg) = 0;
39     virtual void ThermalRequest(int cmdId, const std::string& msg) = 0;
40     virtual void ThermalRequestEx(int cmdId, bool onOffTag, const std::string& msg) = 0;
41     virtual void ThermalLimitBoost(bool onOffTag, const std::string& msg) = 0;
42 
43 public:
44     enum {
45         TRANS_IPC_ID_PERF_REQUEST             = 0x0001,
46         TRANS_IPC_ID_PERF_REQUEST_EX          = 0x0002,
47         TRANS_IPC_ID_POWER_REQUEST            = 0x0003,
48         TRANS_IPC_ID_POWER_REQUEST_EX         = 0x0004,
49         TRANS_IPC_ID_POWER_LIMIT_BOOST_FREQ   = 0x0005,
50         TRANS_IPC_ID_THERMAL_REQUEST          = 0x0006,
51         TRANS_IPC_ID_THERMAL_REQUEST_EX       = 0x0007,
52         TRANS_IPC_ID_THERMAL_LIMIT_BOOST_FREQ = 0x0008,
53     };
54 
55 public:
56     DECLARE_INTERFACE_DESCRIPTOR(u"Resourceschedule.ISocPerfService");
57 };
58 } // namespace SOCPERF
59 } // namespace OHOS
60 
61 #endif // SOC_PERF_ISERVICE_H