/* * Copyright (c) 2021 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef HDI_STREAM_OPERATOR_CLIENT_PROXY_H #define HDI_STREAM_OPERATOR_CLIENT_PROXY_H #include #include "istream_operator.h" namespace OHOS::Camera { class StreamOperatorProxy : public IRemoteProxy { public: explicit StreamOperatorProxy(const sptr& impl) : IRemoteProxy(impl) {} virtual ~StreamOperatorProxy() = default; virtual CamRetCode IsStreamsSupported( OperationMode mode, const std::shared_ptr &modeSetting, const std::shared_ptr &info, StreamSupportType &type) override; virtual CamRetCode IsStreamsSupported( OperationMode mode, const std::shared_ptr &modeSetting, const std::vector>& pInfo, StreamSupportType &pType) override; virtual CamRetCode CreateStreams( const std::vector> &streamInfos) override; virtual CamRetCode ReleaseStreams(const std::vector &streamIds) override; virtual CamRetCode CommitStreams(OperationMode mode, const std::shared_ptr &modeSetting) override; virtual CamRetCode GetStreamAttributes( std::vector> &attributes) override; virtual CamRetCode AttachBufferQueue(int streamId, const OHOS::sptr &producer) override; virtual CamRetCode DetachBufferQueue(int streamId) override; virtual CamRetCode Capture(int captureId, const std::shared_ptr &pInfo, bool isStreaming) override; virtual CamRetCode CancelCapture(int captureId) override; virtual CamRetCode ChangeToOfflineStream(const std::vector &streamIds, OHOS::sptr &callback, OHOS::sptr &offlineOperator) override; private: static constexpr int CMD_STREAM_OPERATOR_IS_STREAMS_SUPPORTED = 0; static constexpr int CMD_STREAM_OPERATOR_CREATE_STREAMS = 1; static constexpr int CMD_STREAM_OPERATOR_RELEASE_STREAMS = 2; static constexpr int CMD_STREAM_OPERATOR_COMMIT_STREAMS = 3; static constexpr int CMD_STREAM_OPERATOR_GET_STREAM_ATTRIBUTES = 4; static constexpr int CMD_STREAM_OPERATOR_ATTACH_BUFFER_QUEUE = 5; static constexpr int CMD_STREAM_OPERATOR_DETACH_BUFFER_QUEUE = 6; static constexpr int CMD_STREAM_OPERATOR_CAPTURE = 7; static constexpr int CMD_STREAM_OPERATOR_CANCEL_CAPTURE = 8; static constexpr int CMD_STREAM_OPERATOR_CHANGE_TO_OFFLINE_STREAM = 9; static inline BrokerDelegator delegator_; }; } #endif // HDI_STREAM_OPERATOR_CLIENT_PROXY_H