1 /*
2 * Copyright (c) 2024 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 "sa_backup_connection_mock.h"
17
18 namespace OHOS::FileManagement::Backup {
19 using namespace std;
20
ConnectBackupSAExt(std::string bundleName,std::string extension,std::string extInfo)21 ErrCode SABackupConnection::ConnectBackupSAExt(std::string bundleName, std::string extension, std::string extInfo)
22 {
23 return BSABackupConnection::saConnect->ConnectBackupSAExt(bundleName, extension, extInfo);
24 }
25
DisconnectBackupSAExt()26 ErrCode SABackupConnection::DisconnectBackupSAExt()
27 {
28 return BSABackupConnection::saConnect->DisconnectBackupSAExt();
29 }
30
IsSAExtConnected()31 bool SABackupConnection::IsSAExtConnected()
32 {
33 return BSABackupConnection::saConnect->IsSAExtConnected();
34 }
35
GetBackupSAExtProxy()36 sptr<ILocalAbilityManager> SABackupConnection::GetBackupSAExtProxy()
37 {
38 return BSABackupConnection::saConnect->GetBackupSAExtProxy();
39 }
40
LoadBackupSAExt()41 ErrCode SABackupConnection::LoadBackupSAExt()
42 {
43 return BSABackupConnection::saConnect->LoadBackupSAExt();
44 }
45
LoadBackupSAExtInner()46 ErrCode SABackupConnection::LoadBackupSAExtInner()
47 {
48 return BSABackupConnection::saConnect->LoadBackupSAExtInner();
49 }
50
InputParaSet(MessageParcel & data)51 bool SABackupConnection::InputParaSet(MessageParcel &data)
52 {
53 return BSABackupConnection::saConnect->InputParaSet(data);
54 }
55
OutputParaGet(MessageParcel & reply)56 bool SABackupConnection::OutputParaGet(MessageParcel &reply)
57 {
58 return BSABackupConnection::saConnect->OutputParaGet(reply);
59 }
60
CallBackupSA()61 ErrCode SABackupConnection::CallBackupSA()
62 {
63 return BSABackupConnection::saConnect->CallBackupSA();
64 }
65
CallRestoreSA(UniqueFd fd)66 ErrCode SABackupConnection::CallRestoreSA(UniqueFd fd)
67 {
68 return BSABackupConnection::saConnect->CallRestoreSA(std::move(fd));
69 }
70
OnLoadSystemAbilitySuccess(int32_t,const OHOS::sptr<IRemoteObject> &)71 void SABackupConnection::SALoadCallback::OnLoadSystemAbilitySuccess(int32_t, const OHOS::sptr<IRemoteObject>&) {}
72
OnLoadSystemAbilityFail(int32_t)73 void SABackupConnection::SALoadCallback::OnLoadSystemAbilityFail(int32_t) {}
74 } // namespace OHOS::FileManagement::Backup
75