1 /*
2  * Copyright (C) 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 #include "ipc_object_stub.h"
17 
18 namespace OHOS {
IPCObjectStub(const std::u16string & descriptor)19 IPCObjectStub::IPCObjectStub(const std::u16string &descriptor) : IRemoteObject(descriptor) {}
20 
~IPCObjectStub()21 IPCObjectStub::~IPCObjectStub()
22 {
23 }
24 
IsDeviceIdIllegal(const std::string & deviceID)25 bool IPCObjectStub::IsDeviceIdIllegal(const std::string &deviceID)
26 {
27     return false;
28 }
29 
GetObjectRefCount()30 int32_t IPCObjectStub::GetObjectRefCount()
31 {
32     return 0;
33 }
34 
Dump(int fd,const std::vector<std::u16string> & args)35 int IPCObjectStub::Dump(int fd, const std::vector<std::u16string> &args)
36 {
37     return -1;
38 }
39 
OnRemoteRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)40 int IPCObjectStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
41 {
42     return -1;
43 }
44 
OnRemoteDump(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)45 int IPCObjectStub::OnRemoteDump(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
46 {
47     return -1;
48 }
49 
SendRequest(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)50 int IPCObjectStub::SendRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
51 {
52     return -1;
53 }
54 
OnFirstStrongRef(const void * objectId)55 void IPCObjectStub::OnFirstStrongRef(const void *objectId)
56 {
57 }
58 
OnLastStrongRef(const void * objectId)59 void IPCObjectStub::OnLastStrongRef(const void *objectId)
60 {
61 }
62 
AddDeathRecipient(const sptr<DeathRecipient> & recipient)63 bool IPCObjectStub::AddDeathRecipient(const sptr<DeathRecipient> &recipient)
64 {
65     (void)recipient;
66     return false;
67 }
68 
RemoveDeathRecipient(const sptr<DeathRecipient> & recipient)69 bool IPCObjectStub::RemoveDeathRecipient(const sptr<DeathRecipient> &recipient)
70 {
71     return false;
72 }
73 
GetCallingPid()74 int IPCObjectStub::GetCallingPid()
75 {
76     return 0;
77 }
78 
GetCallingUid()79 int IPCObjectStub::GetCallingUid()
80 {
81     return 0;
82 }
83 
GetCallingTokenID()84 uint32_t IPCObjectStub::GetCallingTokenID()
85 {
86     return 0;
87 }
88 
GetFirstTokenID()89 uint32_t IPCObjectStub::GetFirstTokenID()
90 {
91     return 0;
92 }
93 
GetObjectType() const94 int IPCObjectStub::GetObjectType() const
95 {
96     return -1;
97 }
98 
ProcessProto(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)99 int32_t IPCObjectStub::ProcessProto(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
100 {
101     return -1;
102 }
103 
104 #ifndef CONFIG_IPC_SINGLE
InvokerThread(uint32_t code,MessageParcel & data,MessageParcel & reply,MessageOption & option)105 int32_t IPCObjectStub::InvokerThread(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option)
106 {
107     return -1;
108 }
109 
InvokerDataBusThread(MessageParcel & data,MessageParcel & reply)110 int32_t IPCObjectStub::InvokerDataBusThread(MessageParcel &data, MessageParcel &reply)
111 {
112     return -1;
113 }
114 
NoticeServiceDie(MessageParcel & data,MessageParcel & reply,MessageOption & option)115 int32_t IPCObjectStub::NoticeServiceDie(MessageParcel &data, MessageParcel &reply, MessageOption &option)
116 {
117     return -1;
118 }
119 
AddAuthInfo(MessageParcel & data,MessageParcel & reply,uint32_t code)120 int32_t IPCObjectStub::AddAuthInfo(MessageParcel &data, MessageParcel &reply, uint32_t code)
121 {
122     return -1;
123 }
124 #endif
125 } // namespace OHOS
126