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 #include "cloud_sync_service_proxy.h"
16
17 #include <sstream>
18
19 #include "cloud_sync_common.h"
20 #include "dfs_error.h"
21 #include "iservice_registry.h"
22 #include "i_cloud_sync_service_mock.h"
23 #include "system_ability_definition.h"
24 #include "utils_log.h"
25
26 namespace OHOS::FileManagement::CloudSync {
27 using namespace std;
28
RegisterCallbackInner(const sptr<IRemoteObject> & remoteObject,const std::string & bundleName)29 int32_t CloudSyncServiceProxy::RegisterCallbackInner(const sptr<IRemoteObject> &remoteObject,
30 const std::string &bundleName)
31 {
32 return E_OK;
33 }
34
StartSyncInner(bool forceFlag,const std::string & bundleName)35 int32_t CloudSyncServiceProxy::StartSyncInner(bool forceFlag, const std::string &bundleName)
36 {
37 return E_OK;
38 }
39
StopSyncInner(const std::string & bundleName,bool forceFlag)40 int32_t CloudSyncServiceProxy::StopSyncInner(const std::string &bundleName, bool forceFlag)
41 {
42 return E_OK;
43 }
44
ChangeAppSwitch(const std::string & accoutId,const std::string & bundleName,bool status)45 int32_t CloudSyncServiceProxy::ChangeAppSwitch(const std::string &accoutId, const std::string &bundleName, bool status)
46 {
47 return E_OK;
48 }
49
Clean(const std::string & accountId,const CleanOptions & cleanOptions)50 int32_t CloudSyncServiceProxy::Clean(const std::string &accountId, const CleanOptions &cleanOptions)
51 {
52 return E_OK;
53 }
54
NotifyDataChange(const std::string & accoutId,const std::string & bundleName)55 int32_t CloudSyncServiceProxy::NotifyDataChange(const std::string &accoutId, const std::string &bundleName)
56 {
57 return E_OK;
58 }
59
EnableCloud(const std::string & accoutId,const SwitchDataObj & switchData)60 int32_t CloudSyncServiceProxy::EnableCloud(const std::string &accoutId, const SwitchDataObj &switchData)
61 {
62 return E_OK;
63 }
64
DisableCloud(const std::string & accoutId)65 int32_t CloudSyncServiceProxy::DisableCloud(const std::string &accoutId)
66 {
67 return E_OK;
68 }
69
GetInstance()70 sptr<ICloudSyncService> CloudSyncServiceProxy::GetInstance()
71 {
72 serviceProxy_ = iface_cast<ICloudSyncService>(sptr(new CloudSyncServiceMock()));
73 return serviceProxy_;
74 }
75
UploadAsset(const int32_t userId,const std::string & request,std::string & result)76 int32_t UploadAsset(const int32_t userId, const std::string &request, std::string &result)
77 {
78 return E_OK;
79 }
80
DownloadFile(const int32_t userId,const std::string & bundleName,AssetInfoObj & assetInfoObj)81 int32_t DownloadFile(const int32_t userId, const std::string &bundleName, AssetInfoObj &assetInfoObj)
82 {
83 return E_OK;
84 }
85
DeleteAsset(const int32_t userId,const std::string & uri)86 int32_t DeleteAsset(const int32_t userId, const std::string &uri)
87 {
88 return E_OK;
89 }
90 } // namespace OHOS::FileManagement::CloudSync
91