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 "cloud_asset_read_session.h"
17 #include "dfs_error.h"
18 
19 namespace OHOS::FileManagement::CloudFile {
20 using namespace std;
21 
CloudAssetReadSession(std::string recordType,std::string recordId,std::string assetKey,std::string assetPath)22 CloudAssetReadSession::CloudAssetReadSession(std::string recordType,
23                                              std::string recordId,
24                                              std::string assetKey,
25                                              std::string assetPath)
26 {
27 }
28 
InitSession()29 CloudError CloudAssetReadSession::InitSession()
30 {
31     return CloudError::CK_NO_ERROR;
32 }
33 
PRead(int64_t offset,int64_t size,char * buffer,CloudError & error)34 int64_t CloudAssetReadSession::PRead(int64_t offset, int64_t size, char *buffer, CloudError &error)
35 {
36     return E_OK;
37 }
38 
Close(bool needRemain)39 bool CloudAssetReadSession::Close(bool needRemain)
40 {
41     return true;
42 }
43 
HasCache(int64_t offset,int64_t readSize)44 bool CloudAssetReadSession::HasCache(int64_t offset, int64_t readSize)
45 {
46     return true;
47 }
48 } // namespace OHOS::FileManagement::CloudFile