1 /*
2  * Copyright (c) 2021 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  *     http://www.apache.org/licenses/LICENSE-2.0
7  * Unless required by applicable law or agreed to in writing, software
8  * distributed under the License is distributed on an "AS IS" BASIS,
9  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10  * See the License for the specific language governing permissions and
11  * limitations under the License.
12  */
13 
14 #ifndef HOST_STREAM_MANAGER_H
15 #define HOST_STREAM_MANAGER_H
16 #include "host_stream_data_structure.h"
17 #include "no_copyable.h"
18 #include <memory>
19 #include <vector>
20 
21 namespace OHOS::Camera {
22 class HostStreamMgr : public NoCopyable {
23 public:
24     static std::shared_ptr<HostStreamMgr> Create();
25     virtual RetCode CreateHostStream(const HostStreamInfo& info, BufferCb c) = 0;
26     virtual RetCode DestroyHostStream(const std::vector<int>& types) = 0;
27     virtual void GetStreamTypes(std::vector<int32_t>& s) const = 0;
28     virtual HostStreamInfo GetStreamInfo(const int32_t& id) const = 0;
29     virtual BufferCb GetBufferCb(const int32_t& type) const = 0;
30     virtual void GetStreamIds(std::vector<int32_t>& s) const = 0;
31     virtual int32_t DesignateStreamIdForType(const int32_t streamType) = 0;
32     virtual ~HostStreamMgr() = default;
33 };
34 }
35 #endif
36