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 
16 #ifndef OHOS_AVQUEUE_INFO_H
17 #define OHOS_AVQUEUE_INFO_H
18 
19 #include <bitset>
20 #include <memory>
21 #include <string>
22 #include <map>
23 
24 #include "parcel.h"
25 #include "avsession_pixel_map.h"
26 
27 #ifndef WINDOWS_PLATFORM
28 #ifndef MAC_PLATFORM
29 #ifndef IOS_PLATFORM
30 #include <malloc.h>
31 #endif
32 #endif
33 #endif
34 
35 namespace OHOS::AVSession {
36 class AVQueueInfo : public Parcelable {
37 public:
38 
39     AVQueueInfo() = default;
40     ~AVQueueInfo() = default;
41 
42     bool Unmarshalling(Parcel& data);
43     bool Marshalling(Parcel& parcel) const;
44 
45     void SetBundleName(const std::string& bundleName);
46     std::string GetBundleName() const;
47 
48     void SetAVQueueName(const std::string& avQueueName);
49     std::string GetAVQueueName() const;
50 
51     void SetAVQueueId(const std::string& avQueueId);
52     std::string GetAVQueueId() const;
53 
54     void SetAVQueueImage(const std::shared_ptr<AVSessionPixelMap>& avQueueImage);
55     std::shared_ptr<AVSessionPixelMap> GetAVQueueImage() const;
56 
57     void SetAVQueueLength(const int32_t avQueueLength);
58     int32_t GetAVQueueLength() const;
59 
60     void SetAVQueueImageUri(const std::string& avQueueImageUri);
61     std::string GetAVQueueImageUri() const;
62 
63 private:
64     std::string bundleName_ = "";
65     std::string avQueueName_ = "";
66     std::string avQueueId_ = "";
67     std::shared_ptr<AVSessionPixelMap> avQueueImage_ = nullptr;
68     int32_t avQueueLength_ = 0;
69     std::string avQueueImageUri_ = "";
70 };
71 } // namespace OHOS::AVSession
72 #endif // OHOS_AVQUEUE_INFO_H