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 #ifndef OHOS_AVQUEUE_INFO_H 16 #define OHOS_AVQUEUE_INFO_H 17 18 #include <bitset> 19 #include <memory> 20 #include <string> 21 #include <map> 22 23 #include "parcel.h" 24 #include "message_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 static AVQueueInfo* UnmarshallingMessageParcel(MessageParcel& data); 46 bool MarshallingMessageParcel(MessageParcel& parcel) const; 47 bool MarshallingQueueImage(MessageParcel& parcel) const; 48 49 void SetBundleName(const std::string& bundleName); 50 std::string GetBundleName() const; 51 52 void SetAVQueueName(const std::string& avQueueName); 53 std::string GetAVQueueName() const; 54 55 void SetAVQueueId(const std::string& avQueueId); 56 std::string GetAVQueueId() const; 57 58 void SetAVQueueImage(const std::shared_ptr<AVSessionPixelMap>& avQueueImage); 59 std::shared_ptr<AVSessionPixelMap> GetAVQueueImage() const; 60 61 void SetAVQueueLength(const int32_t avQueueLength); 62 int32_t GetAVQueueLength() const; 63 64 void SetAVQueueImageUri(const std::string& avQueueImageUri); 65 std::string GetAVQueueImageUri() const; 66 67 private: 68 std::string bundleName_ = ""; 69 std::string avQueueName_ = ""; 70 std::string avQueueId_ = ""; 71 std::shared_ptr<AVSessionPixelMap> avQueueImage_ = nullptr; 72 int32_t avQueueLength_ = 0; 73 std::string avQueueImageUri_ = ""; 74 }; 75 } // namespace OHOS::AVSession 76 #endif // OHOS_AVQUEUE_INFO_H