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