1d590543dSopenharmony_ci/* 2d590543dSopenharmony_ci * Copyright (c) 2021 Huawei Device Co., Ltd. 3d590543dSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4d590543dSopenharmony_ci * you may not use this file except in compliance with the License. 5d590543dSopenharmony_ci * You may obtain a copy of the License at 6d590543dSopenharmony_ci * 7d590543dSopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8d590543dSopenharmony_ci * 9d590543dSopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10d590543dSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11d590543dSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12d590543dSopenharmony_ci * See the License for the specific language governing permissions and 13d590543dSopenharmony_ci * limitations under the License. 14d590543dSopenharmony_ci */ 15d590543dSopenharmony_ci 16d590543dSopenharmony_ci#ifndef BATTERY_STATS_STUB_H 17d590543dSopenharmony_ci#define BATTERY_STATS_STUB_H 18d590543dSopenharmony_ci 19d590543dSopenharmony_ci#include <cstdint> 20d590543dSopenharmony_ci#include "message_option.h" 21d590543dSopenharmony_ci#include "message_parcel.h" 22d590543dSopenharmony_ci#include "refbase.h" 23d590543dSopenharmony_ci#include "iremote_stub.h" 24d590543dSopenharmony_ci#include "nocopyable.h" 25d590543dSopenharmony_ci 26d590543dSopenharmony_ci#include "ibattery_stats.h" 27d590543dSopenharmony_ci 28d590543dSopenharmony_cinamespace OHOS { 29d590543dSopenharmony_cinamespace PowerMgr { 30d590543dSopenharmony_ciclass BatteryStatsStub : public IRemoteStub<IBatteryStats> { 31d590543dSopenharmony_cipublic: 32d590543dSopenharmony_ci DISALLOW_COPY_AND_MOVE(BatteryStatsStub); 33d590543dSopenharmony_ci 34d590543dSopenharmony_ci BatteryStatsStub() = default; 35d590543dSopenharmony_ci 36d590543dSopenharmony_ci virtual ~BatteryStatsStub() = default; 37d590543dSopenharmony_ci 38d590543dSopenharmony_ci int OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; 39d590543dSopenharmony_ciprivate: 40d590543dSopenharmony_ci int32_t GetBatteryStatsStub(MessageParcel& reply); 41d590543dSopenharmony_ci int32_t SetOnBatteryStub(MessageParcel& data); 42d590543dSopenharmony_ci int32_t GetAppStatsMahStub(MessageParcel& data, MessageParcel& reply); 43d590543dSopenharmony_ci int32_t GetAppStatsPercentStub(MessageParcel& data, MessageParcel& reply); 44d590543dSopenharmony_ci int32_t GetPartStatsMahStub(MessageParcel& data, MessageParcel& reply); 45d590543dSopenharmony_ci int32_t GetPartStatsPercentStub(MessageParcel& data, MessageParcel& reply); 46d590543dSopenharmony_ci int32_t GetTotalTimeSecondStub(MessageParcel& data, MessageParcel& reply); 47d590543dSopenharmony_ci int32_t GetTotalDataBytesStub(MessageParcel& data, MessageParcel& reply); 48d590543dSopenharmony_ci int32_t ResetStub(); 49d590543dSopenharmony_ci int32_t ShellDumpStub(MessageParcel& data, MessageParcel& reply); 50d590543dSopenharmony_ci int32_t ChooseCodeStub(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); 51d590543dSopenharmony_ci}; 52d590543dSopenharmony_ci} // namespace PowerMgr 53d590543dSopenharmony_ci} // namespace OHOS 54d590543dSopenharmony_ci#endif // BATTERY_STATS_STUB_H 55