• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 #ifndef OHOS_FILEMGMT_I_CLOUD_SYNC_SERVICE_H
17 #define OHOS_FILEMGMT_I_CLOUD_SYNC_SERVICE_H
18 
19 #include <map>
20 
21 #include "iremote_broker.h"
22 
23 #include "cloud_sync_common.h"
24 
25 namespace OHOS::FileManagement::CloudSync {
26 class ICloudSyncService : public IRemoteBroker {
27 public:
28     DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.Filemanagement.Dfs.ICloudSyncService")
29 
30     virtual int32_t UnRegisterCallbackInner() = 0;
31     virtual int32_t RegisterCallbackInner(const sptr<IRemoteObject> &remoteObject) = 0;
32     virtual int32_t StartSyncInner(bool forceFlag) = 0;
33     virtual int32_t StopSyncInner() = 0;
34     virtual int32_t ChangeAppSwitch(const std::string &accoutId, const std::string &bundleName, bool status) = 0;
35     virtual int32_t Clean(const std::string &accountId, const CleanOptions &cleanOptions) = 0;
36     virtual int32_t NotifyDataChange(const std::string &accoutId, const std::string &bundleName) = 0;
37     virtual int32_t EnableCloud(const std::string &accoutId, const SwitchDataObj &switchData) = 0;
38     virtual int32_t DisableCloud(const std::string &accoutId) = 0;
39     virtual int32_t StartDownloadFile(const std::string &path) = 0;
40     virtual int32_t StopDownloadFile(const std::string &path) = 0;
41     virtual int32_t RegisterDownloadFileCallback(const sptr<IRemoteObject> &downloadCallback) = 0;
42     virtual int32_t UnregisterDownloadFileCallback() = 0;
43     virtual int32_t UploadAsset(const int32_t userId, const std::string &request, std::string &result) = 0;
44     virtual int32_t DownloadFile(const int32_t userId, const std::string &bundleName, AssetInfoObj &assetInfoObj) = 0;
45 };
46 } // namespace OHOS::FileManagement::CloudSync
47 
48 #endif // OHOS_FILEMGMT_I_CLOUD_SYNC_SERVICE_H
49