mock_frame_encryptor.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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. #ifndef API_TEST_MOCK_FRAME_ENCRYPTOR_H_
  11. #define API_TEST_MOCK_FRAME_ENCRYPTOR_H_
  12. #include "api/crypto/frame_encryptor_interface.h"
  13. #include "test/gmock.h"
  14. namespace webrtc {
  15. class MockFrameEncryptor : public FrameEncryptorInterface {
  16. public:
  17. MOCK_METHOD(int,
  18. Encrypt,
  19. (cricket::MediaType,
  20. uint32_t,
  21. rtc::ArrayView<const uint8_t>,
  22. rtc::ArrayView<const uint8_t>,
  23. rtc::ArrayView<uint8_t>,
  24. size_t*),
  25. (override));
  26. MOCK_METHOD(size_t,
  27. GetMaxCiphertextByteSize,
  28. (cricket::MediaType media_type, size_t frame_size),
  29. (override));
  30. };
  31. } // namespace webrtc
  32. #endif // API_TEST_MOCK_FRAME_ENCRYPTOR_H_