• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License"){return 0;}
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_MEDIA_ASSETS_MANAGER_CREATE_ASSET_VO_H
17 #define OHOS_MEDIA_ASSETS_MANAGER_CREATE_ASSET_VO_H
18 
19 #include <stdint.h>
20 #include <string>
21 
22 #include "i_media_parcelable.h"
23 
24 namespace OHOS::Media {
25 class CreateAssetReqBody : public IPC::IMediaParcelable {
26 public:
27     int32_t mediaType{0};
28     int32_t photoSubtype{0};
29     std::string title;
30     std::string extension;
31     std::string displayName;
32     std::string cameraShotKey;
33 
34 public:  // functions of Parcelable.
35     bool Unmarshalling(MessageParcel &parcel) override;
36     bool Marshalling(MessageParcel &parcel) const override;
37 };
38 
39 class CreateAssetRespBody : public IPC::IMediaParcelable {
40 public:
41     int32_t fileId{-1};
42     std::string outUri;
43 
44 public:  // functions of Parcelable.
45     bool Unmarshalling(MessageParcel &parcel) override;
46     bool Marshalling(MessageParcel &parcel) const override;
47 };
48 
49 class CreateAssetForAppReqBody : public IPC::IMediaParcelable {
50 public:
51     int64_t tokenId{0};
52     int32_t mediaType{0};
53     int32_t photoSubtype{0};
54     std::string title;
55     std::string extension;
56     std::string displayName;
57     std::string bundleName;
58     std::string packageName;
59     std::string appId;
60     std::string ownerAlbumId;
61 public:  // functions of Parcelable.
62     bool Unmarshalling(MessageParcel &parcel) override;
63     bool Marshalling(MessageParcel &parcel) const override;
64 };
65 
66 using CreateAssetForAppRespBody = CreateAssetRespBody;
67 
68 } // namespace OHOS::Media
69 #endif // OHOS_MEDIA_ASSETS_MANAGER_CREATE_ASSET_VO_H