Dactyloidae/dom/media/gmp/GMPDecryptorProxy.h
Roy Tam 03b286c4d8 Revert following changes for fixing Primetime issue:
- Issue #26 Part 2a: make more EME code conditional. (99118e38e)
- Issue #26 - Part 2b: Stub out GMPDecryptorProxy functions. (d44c61bf6)
- Issue #26 - Part 2c: Remove dependence on gmp/widevine-adapter/* (4c9689f68)
- Issue #1392 - Change --enable-eme to MOZ_ARG_ENABLE_BOOL and remove MOZ_EME_MODULES (832d84d2c)
- [Basilisk] Issue MoonchildProductions/UXP#1392 - Remove usage of MOZ_EME_MODULES (3a165cd)
- Issue #65 - Remove AppConstants from toolkit/mozapps/extensions (758618b60)
2020-03-01 08:30:28 +08:00

63 lines
2.1 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#ifndef GMPDecryptorProxy_h_
#define GMPDecryptorProxy_h_
#include "mozilla/DecryptorProxyCallback.h"
#include "GMPCallbackBase.h"
#include "gmp-decryption.h"
#include "nsString.h"
namespace mozilla {
class CryptoSample;
} // namespace mozilla
class GMPDecryptorProxyCallback : public DecryptorProxyCallback,
public GMPCallbackBase {
public:
virtual ~GMPDecryptorProxyCallback() {}
};
class GMPDecryptorProxy {
public:
~GMPDecryptorProxy() {}
virtual uint32_t GetPluginId() const = 0;
virtual nsresult Init(GMPDecryptorProxyCallback* aCallback,
bool aDistinctiveIdentifierRequired,
bool aPersistentStateRequired) = 0;
virtual void CreateSession(uint32_t aCreateSessionToken,
uint32_t aPromiseId,
const nsCString& aInitDataType,
const nsTArray<uint8_t>& aInitData,
GMPSessionType aSessionType) = 0;
virtual void LoadSession(uint32_t aPromiseId,
const nsCString& aSessionId) = 0;
virtual void UpdateSession(uint32_t aPromiseId,
const nsCString& aSessionId,
const nsTArray<uint8_t>& aResponse) = 0;
virtual void CloseSession(uint32_t aPromiseId,
const nsCString& aSessionId) = 0;
virtual void RemoveSession(uint32_t aPromiseId,
const nsCString& aSessionId) = 0;
virtual void SetServerCertificate(uint32_t aPromiseId,
const nsTArray<uint8_t>& aServerCert) = 0;
virtual void Decrypt(uint32_t aId,
const mozilla::CryptoSample& aCrypto,
const nsTArray<uint8_t>& aBuffer) = 0;
virtual void Close() = 0;
};
#endif // GMPDecryptorProxy_h_