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 #ifndef OHOS_STORAGE_ASSET_OBJ_H
17 #define OHOS_STORAGE_ASSET_OBJ_H
18 
19 #include <string>
20 #include <vector>
21 #include "parcel.h"
22 
23 namespace OHOS {
24 namespace Storage {
25 namespace DistributedFile {
26 struct AssetObj : public Parcelable {
27 public:
28     std::string sessionId_;
29     std::string dstNetworkId_;
30     std::string srcBundleName_;
31     std::string dstBundleName_;
32     std::vector<std::string> uris_;
33     bool ReadFromParcel(Parcel &parcel);
34     bool Marshalling(Parcel &parcel) const override;
35     static AssetObj *Unmarshalling(Parcel &parcel);
36 
37     AssetObj() = default;
AssetObjAssetObj38     AssetObj(const AssetObj &assetObj)
39         : sessionId_(assetObj.sessionId_),
40           dstNetworkId_(assetObj.dstNetworkId_),
41           srcBundleName_(assetObj.srcBundleName_),
42           dstBundleName_(assetObj.dstBundleName_),
43           uris_(assetObj.uris_)
44     {
45     }
46 };
47 } // namespace DistributedFile
48 } // namespace Storage
49 } // namespace OHOS
50 #endif // OHOS_STORAGE_ASSET_OBJ_H
51