1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 // Mock for metadata readers. 18 19 #ifndef DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_MOCK_H_ 20 #define DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_MOCK_H_ 21 22 #include "metadata_reader.h" 23 24 #include <gmock/gmock.h> 25 26 namespace default_camera_hal { 27 28 class MetadataReaderMock : public MetadataReader { 29 public: MetadataReaderMock()30 MetadataReaderMock() : MetadataReader(nullptr){}; 31 MOCK_CONST_METHOD0(raw_metadata, const camera_metadata_t*()); 32 MOCK_CONST_METHOD1(Facing, int(int*)); 33 MOCK_CONST_METHOD1(Orientation, int(int*)); 34 MOCK_CONST_METHOD1(MaxInputStreams, int(int32_t*)); 35 MOCK_CONST_METHOD3(MaxOutputStreams, int(int32_t*, int32_t*, int32_t*)); 36 MOCK_CONST_METHOD1(RequestCapabilities, int(std::set<uint8_t>*)); 37 MOCK_CONST_METHOD1(StreamConfigurations, 38 int(std::vector<StreamConfiguration>*)); 39 MOCK_CONST_METHOD1(StreamStallDurations, 40 int(std::vector<StreamStallDuration>*)); 41 MOCK_CONST_METHOD1(ReprocessFormats, int(ReprocessFormatMap*)); 42 }; 43 44 } // namespace default_camera_hal 45 46 #endif // DEFAULT_CAMERA_HAL_METADATA_METADATA_READER_MOCK_H_ 47