• 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 #include "mock_thermal_remote_object.h"
17 
18 namespace OHOS {
19 namespace PowerMgr {
MockThermalRemoteObject(std::u16string descriptor)20 MockThermalRemoteObject::MockThermalRemoteObject(std::u16string descriptor) : IRemoteObject(descriptor) {}
21 
~MockThermalRemoteObject()22 MockThermalRemoteObject::~MockThermalRemoteObject() {}
23 
GetObjectRefCount()24 int32_t MockThermalRemoteObject::GetObjectRefCount()
25 {
26     return 0;
27 }
28 
Dump(int fd,const std::vector<std::u16string> & args)29 int MockThermalRemoteObject::Dump(int fd, const std::vector<std::u16string>& args)
30 {
31     (void)args;
32     return 0;
33 }
34 
SendRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)35 int MockThermalRemoteObject::SendRequest(
36     uint32_t code, MessageParcel& data, MessageParcel& reply, MessageOption& option)
37 {
38     (void)code;
39     (void)data;
40     (void)reply;
41     (void)option;
42 #ifdef MOCK_SEND_REQUEST_RETURN_ONE
43     return 1;
44 #else
45     return 0;
46 #endif
47 }
48 
AddDeathRecipient(const sptr<DeathRecipient> & recipient)49 bool MockThermalRemoteObject::AddDeathRecipient(const sptr<DeathRecipient>& recipient)
50 {
51     (void)recipient;
52     return false;
53 }
54 
RemoveDeathRecipient(const sptr<DeathRecipient> & recipient)55 bool MockThermalRemoteObject::RemoveDeathRecipient(const sptr<DeathRecipient>& recipient)
56 {
57     (void)recipient;
58     return false;
59 }
60 } // namespace PowerMgr
61 } // namespace OHOS
62