Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #ifndef API_TEST_MOCK_FRAME_DECRYPTOR_H_ |
| 12 | #define API_TEST_MOCK_FRAME_DECRYPTOR_H_ |
| 13 | |
Dor Hen | 1921fa5 | 2024-08-13 12:43:47 | [diff] [blame] | 14 | #include <cstddef> |
| 15 | #include <cstdint> |
Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 16 | #include <vector> |
| 17 | |
Dor Hen | 1921fa5 | 2024-08-13 12:43:47 | [diff] [blame] | 18 | #include "api/array_view.h" |
Steve Anton | 10542f2 | 2019-01-11 17:11:00 | [diff] [blame] | 19 | #include "api/crypto/frame_decryptor_interface.h" |
Dor Hen | 1921fa5 | 2024-08-13 12:43:47 | [diff] [blame] | 20 | #include "api/media_types.h" |
Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 21 | #include "test/gmock.h" |
| 22 | |
| 23 | namespace webrtc { |
| 24 | |
| 25 | class MockFrameDecryptor : public FrameDecryptorInterface { |
| 26 | public: |
Danil Chapovalov | fc11519 | 2020-05-08 13:03:03 | [diff] [blame] | 27 | MOCK_METHOD(Result, |
| 28 | Decrypt, |
| 29 | (cricket::MediaType, |
| 30 | const std::vector<uint32_t>&, |
| 31 | rtc::ArrayView<const uint8_t>, |
| 32 | rtc::ArrayView<const uint8_t>, |
| 33 | rtc::ArrayView<uint8_t>), |
| 34 | (override)); |
Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 35 | |
Danil Chapovalov | fc11519 | 2020-05-08 13:03:03 | [diff] [blame] | 36 | MOCK_METHOD(size_t, |
| 37 | GetMaxPlaintextByteSize, |
| 38 | (cricket::MediaType, size_t encrypted_frame_size), |
| 39 | (override)); |
Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 40 | }; |
| 41 | |
Benjamin Wright | 78410ad | 2018-10-25 16:52:57 | [diff] [blame] | 42 | } // namespace webrtc |
| 43 | |
| 44 | #endif // API_TEST_MOCK_FRAME_DECRYPTOR_H_ |