1ba5c3796Sopenharmony_ci/* 2ba5c3796Sopenharmony_ci * Copyright (c) 2022 Huawei Device Co., Ltd. 3ba5c3796Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4ba5c3796Sopenharmony_ci * you may not use this file except in compliance with the License. 5ba5c3796Sopenharmony_ci * You may obtain a copy of the License at 6ba5c3796Sopenharmony_ci * 7ba5c3796Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8ba5c3796Sopenharmony_ci * 9ba5c3796Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10ba5c3796Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11ba5c3796Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12ba5c3796Sopenharmony_ci * See the License for the specific language governing permissions and 13ba5c3796Sopenharmony_ci * limitations under the License. 14ba5c3796Sopenharmony_ci */ 15ba5c3796Sopenharmony_ci 16ba5c3796Sopenharmony_ci#ifndef OHOS_MEMORY_MEMMGR_INTERFACES_INNERKITS_INCLUDE_MEM_MGR_STUB_H 17ba5c3796Sopenharmony_ci#define OHOS_MEMORY_MEMMGR_INTERFACES_INNERKITS_INCLUDE_MEM_MGR_STUB_H 18ba5c3796Sopenharmony_ci 19ba5c3796Sopenharmony_ci#include <map> 20ba5c3796Sopenharmony_ci 21ba5c3796Sopenharmony_ci#include "iremote_stub.h" 22ba5c3796Sopenharmony_ci#include "nocopyable.h" 23ba5c3796Sopenharmony_ci#include "i_mem_mgr.h" 24ba5c3796Sopenharmony_ci 25ba5c3796Sopenharmony_cinamespace OHOS { 26ba5c3796Sopenharmony_cinamespace Memory { 27ba5c3796Sopenharmony_ciclass MemMgrStub : public IRemoteStub<IMemMgr> { 28ba5c3796Sopenharmony_cipublic: 29ba5c3796Sopenharmony_ci MemMgrStub(); 30ba5c3796Sopenharmony_ci virtual ~MemMgrStub(); 31ba5c3796Sopenharmony_ci 32ba5c3796Sopenharmony_ci virtual int OnRemoteRequest( 33ba5c3796Sopenharmony_ci uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; 34ba5c3796Sopenharmony_ci 35ba5c3796Sopenharmony_ciprivate: 36ba5c3796Sopenharmony_ci int32_t HandleGetBunldePriorityList(MessageParcel &data, MessageParcel &reply); 37ba5c3796Sopenharmony_ci int32_t HandleNotifyDistDevStatus(MessageParcel &data, MessageParcel &reply); 38ba5c3796Sopenharmony_ci int32_t HandleGetKillLevelOfLmkd(MessageParcel &data, MessageParcel &reply); 39ba5c3796Sopenharmony_ci#ifdef USE_PURGEABLE_MEMORY 40ba5c3796Sopenharmony_ci int32_t HandleRegisterActiveApps(MessageParcel &data, MessageParcel &reply); 41ba5c3796Sopenharmony_ci int32_t HandleDeregisterActiveApps(MessageParcel &data, MessageParcel &reply); 42ba5c3796Sopenharmony_ci int32_t HandleSubscribeAppState(MessageParcel &data, MessageParcel &reply); 43ba5c3796Sopenharmony_ci int32_t HandleUnsubscribeAppState(MessageParcel &data, MessageParcel &reply); 44ba5c3796Sopenharmony_ci int32_t HandleGetAvailableMemory(MessageParcel &data, MessageParcel &reply); 45ba5c3796Sopenharmony_ci int32_t HandleGetTotalMemory(MessageParcel &data, MessageParcel &reply); 46ba5c3796Sopenharmony_ci#endif 47ba5c3796Sopenharmony_ci int32_t HandleOnWindowVisibilityChanged(MessageParcel &data, MessageParcel &reply); 48ba5c3796Sopenharmony_ci int32_t HandleGetReclaimPriorityByPid(MessageParcel &data, MessageParcel &reply); 49ba5c3796Sopenharmony_ci bool IsCameraServiceCalling(); 50ba5c3796Sopenharmony_ci int32_t HandleNotifyProcessStateChangedSync(MessageParcel &data, MessageParcel &reply); 51ba5c3796Sopenharmony_ci int32_t HandleNotifyProcessStateChangedAsync(MessageParcel &data, MessageParcel &reply); 52ba5c3796Sopenharmony_ci int32_t HandleNotifyProcessStatus(MessageParcel &data, MessageParcel &reply); 53ba5c3796Sopenharmony_ci int32_t HandleSetCritical(MessageParcel &data, MessageParcel &reply); 54ba5c3796Sopenharmony_ci bool CheckCallingToken(); 55ba5c3796Sopenharmony_ci int32_t OnRemoteRequestInner(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option); 56ba5c3796Sopenharmony_ci 57ba5c3796Sopenharmony_ci DISALLOW_COPY_AND_MOVE(MemMgrStub); 58ba5c3796Sopenharmony_ci}; 59ba5c3796Sopenharmony_ci} // namespace Memory 60ba5c3796Sopenharmony_ci} // namespace OHOS 61ba5c3796Sopenharmony_ci#endif // OHOS_MEMORY_MEMMGR_INTERFACES_INNERKITS_INCLUDE_MEM_MGR_STUB_H 62