• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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)29 int32_t CloudSyncServiceProxy::RegisterCallbackInner(const sptr<IRemoteObject> &remoteObject)
30 {
31     return E_OK;
32 }
33 
StartSyncInner(bool forceFlag)34 int32_t CloudSyncServiceProxy::StartSyncInner(bool forceFlag)
35 {
36     return E_OK;
37 }
38 
StopSyncInner()39 int32_t CloudSyncServiceProxy::StopSyncInner()
40 {
41     return E_OK;
42 }
43 
ChangeAppSwitch(const std::string & accoutId,const std::string & bundleName,bool status)44 int32_t CloudSyncServiceProxy::ChangeAppSwitch(const std::string &accoutId, const std::string &bundleName, bool status)
45 {
46     return E_OK;
47 }
48 
Clean(const std::string & accountId,const CleanOptions & cleanOptions)49 int32_t CloudSyncServiceProxy::Clean(const std::string &accountId, const CleanOptions &cleanOptions)
50 {
51     return E_OK;
52 }
53 
NotifyDataChange(const std::string & accoutId,const std::string & bundleName)54 int32_t CloudSyncServiceProxy::NotifyDataChange(const std::string &accoutId, const std::string &bundleName)
55 {
56     return E_OK;
57 }
58 
EnableCloud(const std::string & accoutId,const SwitchDataObj & switchData)59 int32_t CloudSyncServiceProxy::EnableCloud(const std::string &accoutId, const SwitchDataObj &switchData)
60 {
61     return E_OK;
62 }
63 
DisableCloud(const std::string & accoutId)64 int32_t CloudSyncServiceProxy::DisableCloud(const std::string &accoutId)
65 {
66     return E_OK;
67 }
68 
GetInstance()69 sptr<ICloudSyncService> CloudSyncServiceProxy::GetInstance()
70 {
71     serviceProxy_ = iface_cast<ICloudSyncService>(sptr(new CloudSyncServiceMock()));
72     return serviceProxy_;
73 }
74 
UploadAsset(const int32_t userId,const std::string & request,std::string & result)75 int32_t UploadAsset(const int32_t userId, const std::string &request, std::string &result)
76 {
77     return E_OK;
78 }
79 
DownloadFile(const int32_t userId,const std::string & bundleName,AssetInfoObj & assetInfoObj)80 int32_t DownloadFile(const int32_t userId, const std::string &bundleName, AssetInfoObj &assetInfoObj)
81 {
82     return E_OK;
83 }
84 
DeleteAsset(const int32_t userId,const std::string & uri)85 int32_t DeleteAsset(const int32_t userId, const std::string &uri)
86 {
87     return E_OK;
88 }
89 } // namespace OHOS::FileManagement::CloudSync
90