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 * 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 /** 17 * @file ioffline_stream_operator.h 18 * 19 * @brief Declares APIs for offline stream operations. 20 * 21 * @since 1.0 22 * @version 1.0 23 */ 24 25 #ifndef HDI_OFFLINE_STREAM_OPERATOR_CLIENT_INF_H 26 #define HDI_OFFLINE_STREAM_OPERATOR_CLIENT_INF_H 27 28 #include <list> 29 #include <map> 30 #include <vector> 31 #include "types.h" 32 #include "icamera_interface.h" 33 34 namespace OHOS::Camera { 35 class IOfflineStreamOperator : public ICameraInterface { 36 public: 37 DECLARE_INTERFACE_DESCRIPTOR(u"HDI.Camera.V1_0.OfflineStreamOperator"); 38 ~IOfflineStreamOperator()39 virtual ~IOfflineStreamOperator() {} 40 41 /** 42 * @brief Cancels a capture request. 43 * 44 * @param captureId Indicates the ID of the capture request to cancel. 45 * 46 * @return Returns <b>NO_ERROR</b> if the operation is successful; returns an error code defined in {@link CamRetCode} otherwise. 47 * 48 * @since 1.0 49 * @version 1.0 50 */ 51 virtual CamRetCode CancelCapture(int captureId) = 0; 52 53 /** 54 * @brief Releases offline streams. 55 * 56 * @param streamIds Indicates the IDs of the offline streams to release. 57 * 58 * @return Returns <b>NO_ERROR</b> if the operation is successful; returns an error code defined in {@link CamRetCode} otherwise. 59 * 60 * @since 1.0 61 * @version 1.0 62 */ 63 virtual CamRetCode ReleaseStreams(const std::vector<int> &streamIds) = 0; 64 65 /** 66 * @brief Releases all offline streams. 67 * 68 * 69 * @return Returns <b>NO_ERROR</b> if the operation is successful; returns an error code defined in {@link CamRetCode} otherwise. 70 * 71 * @since 1.0 72 * @version 1.0 73 */ 74 virtual CamRetCode Release() = 0; 75 }; 76 } 77 #endif // HDI_OFFLINE_STREAM_OPERATOR_CLIENT_INF_H