1 /* 2 * Copyright (c) 2022 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_HDI_SEQUENCE_DATA_H 17 #define OHOS_HDI_SEQUENCE_DATA_H 18 19 #include <parcel.h> 20 #include <string> 21 #include <vector> 22 #include "surface.h" 23 24 namespace OHOS { 25 namespace HDI { 26 namespace Camera { 27 namespace V1_0 { 28 using OHOS::Parcelable; 29 using OHOS::Parcel; 30 using OHOS::sptr; 31 using OHOS::IBufferProducer; 32 33 class BufferProducerSequenceable : public Parcelable { 34 public: 35 BufferProducerSequenceable() = default; 36 virtual ~BufferProducerSequenceable() = default; 37 BufferProducerSequenceable(const sptr<IBufferProducer> & producer)38 explicit BufferProducerSequenceable(const sptr<IBufferProducer> &producer):producer_(producer) {} 39 BufferProducerSequenceable &operator=(const BufferProducerSequenceable &other); 40 BufferProducerSequenceable(const BufferProducerSequenceable & other)41 BufferProducerSequenceable(const BufferProducerSequenceable &other):producer_(other.producer_) {} 42 43 bool Marshalling(Parcel &parcel) const override; 44 45 static sptr<BufferProducerSequenceable> Unmarshalling(Parcel &parcel); 46 47 sptr<IBufferProducer> producer_; 48 }; 49 } // V1_0 50 } // Camera 51 } // HDI 52 } // OHOS 53 #endif // OHOS_HDI_SEQUENCE_DATA_H 54