// Minimal stub matching WebRTC M125 api/crypto/frame_decryptor_interface.h
#ifndef API_CRYPTO_FRAME_DECRYPTOR_INTERFACE_H_
#define API_CRYPTO_FRAME_DECRYPTOR_INTERFACE_H_

#include <cstddef>
#include <cstdint>
#include <vector>

#include "webrtc/rtc_base/ref_count.h"
#include "webrtc/api/array_view.h"
#include "webrtc/api/media_types.h"

namespace webrtc {

class FrameDecryptorInterface : public rtc::RefCountInterface {
 public:
  struct Result {
    enum class Status { kOk = 0, kRecoverable, kFailedToDecrypt };

    Result(Status s, size_t bw) : status(s), bytes_written(bw) {}
    bool IsOk() const { return status == Status::kOk; }

    Status status;
    size_t bytes_written;
  };

  virtual Result Decrypt(cricket::MediaType media_type,
                         const std::vector<uint32_t>& csrcs,
                         rtc::ArrayView<const uint8_t> additional_data,
                         rtc::ArrayView<const uint8_t> encrypted_frame,
                         rtc::ArrayView<uint8_t> frame) = 0;

  virtual size_t GetMaxPlaintextByteSize(cricket::MediaType media_type,
                                         size_t encrypted_frame_size) = 0;

 protected:
  ~FrameDecryptorInterface() override {}
};

}  // namespace webrtc

#endif  // API_CRYPTO_FRAME_DECRYPTOR_INTERFACE_H_
