LCOV - code coverage report
Current view: top level - dom/media/gmp - GMPDecryptorProxy.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 4 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
       2             : /* This Source Code Form is subject to the terms of the Mozilla Public
       3             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       4             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       5             : 
       6             : #ifndef GMPDecryptorProxy_h_
       7             : #define GMPDecryptorProxy_h_
       8             : 
       9             : #include "mozilla/DecryptorProxyCallback.h"
      10             : #include "GMPCallbackBase.h"
      11             : #include "gmp-decryption.h"
      12             : #include "nsString.h"
      13             : 
      14             : namespace mozilla {
      15             : class CryptoSample;
      16             : } // namespace mozilla
      17             : 
      18           0 : class GMPDecryptorProxyCallback : public DecryptorProxyCallback,
      19             :                                   public GMPCallbackBase {
      20             : public:
      21           0 :   virtual ~GMPDecryptorProxyCallback() {}
      22             : };
      23             : 
      24           0 : class GMPDecryptorProxy {
      25             : public:
      26           0 :   ~GMPDecryptorProxy() {}
      27             : 
      28             :   virtual uint32_t GetPluginId() const = 0;
      29             : 
      30             :   virtual nsresult Init(GMPDecryptorProxyCallback* aCallback,
      31             :                         bool aDistinctiveIdentifierRequired,
      32             :                         bool aPersistentStateRequired) = 0;
      33             : 
      34             :   virtual void CreateSession(uint32_t aCreateSessionToken,
      35             :                              uint32_t aPromiseId,
      36             :                              const nsCString& aInitDataType,
      37             :                              const nsTArray<uint8_t>& aInitData,
      38             :                              GMPSessionType aSessionType) = 0;
      39             : 
      40             :   virtual void LoadSession(uint32_t aPromiseId,
      41             :                            const nsCString& aSessionId) = 0;
      42             : 
      43             :   virtual void UpdateSession(uint32_t aPromiseId,
      44             :                              const nsCString& aSessionId,
      45             :                              const nsTArray<uint8_t>& aResponse) = 0;
      46             : 
      47             :   virtual void CloseSession(uint32_t aPromiseId,
      48             :                             const nsCString& aSessionId) = 0;
      49             : 
      50             :   virtual void RemoveSession(uint32_t aPromiseId,
      51             :                              const nsCString& aSessionId) = 0;
      52             : 
      53             :   virtual void SetServerCertificate(uint32_t aPromiseId,
      54             :                                     const nsTArray<uint8_t>& aServerCert) = 0;
      55             : 
      56             :   virtual void Decrypt(uint32_t aId,
      57             :                        const mozilla::CryptoSample& aCrypto,
      58             :                        const nsTArray<uint8_t>& aBuffer) = 0;
      59             : 
      60             :   virtual void Close() = 0;
      61             : };
      62             : 
      63             : #endif // GMPDecryptorProxy_h_

Generated by: LCOV version 1.13