• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022-2023 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_INTERFACES_INNER_API_SOCPERF_CLIENT_INCLUDE_I_SOCPERF_SERVICE_H
17 #define SOC_PERF_INTERFACES_INNER_API_SOCPERF_CLIENT_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_action_type.h"
29 
30 namespace OHOS {
31 namespace SOCPERF {
32 class ISocPerfService : public IRemoteBroker {
33 public:
34     /**
35      * @brief Sending a performance request.
36      *
37      * @param cmdId scene id defined in config file.
38      * @param msg Additional string info, which is used for other extensions.
39      */
40     virtual void PerfRequest(int32_t cmdId, const std::string& msg) = 0;
41 
42     /**
43      * @brief Sending a performance request.
44      *
45      * @param cmdId Scene id defined in config file.
46      * @param onOffTag Indicates the start of end of a long-term frequency increase event.
47      * @param msg Additional string info, which is used for other extensions.
48      */
49     virtual void PerfRequestEx(int32_t cmdId, bool onOffTag, const std::string& msg) = 0;
50 
51     /**
52      * @brief Sending a power limit boost request.
53      *
54      * @param onOffTag Indicates the start of end of a power limit boost event.
55      * @param msg Additional string info, which is used for other extensions.
56      */
57     virtual void PowerLimitBoost(bool onOffTag, const std::string& msg) = 0;
58 
59     /**
60      * @brief Sending a thermal limit boost request.
61      *
62      * @param onOffTag Indicates the start of end of a thermal limit boost event.
63      * @param msg Additional string info, which is used for other extensions.
64      */
65     virtual void ThermalLimitBoost(bool onOffTag, const std::string& msg) = 0;
66 
67     /**
68      * @brief Sending a limit request.
69      *
70      * @param clientId Used to indentify the caller of frequency limiting, such as
71      * the thermal module or power consumption module.
72      * @param configs Indicates the specific value to be limited.
73      * @param msg Additional string info, which is used for other extensions.
74      */
75     virtual void LimitRequest(int32_t clientId,
76         const std::vector<int32_t>& tags, const std::vector<int64_t>& configs, const std::string& msg) = 0;
77 
78 public:
79     DECLARE_INTERFACE_DESCRIPTOR(u"Resourceschedule.ISocPerfService");
80 };
81 } // namespace SOCPERF
82 } // namespace OHOS
83 
84 #endif // SOC_PERF_INTERFACES_INNER_API_SOCPERF_CLIENT_INCLUDE_I_SOCPERF_SERVICE_H
85