Widevine MediaCas client code that works with Android R

This commit is contained in:
Lu Chen
2020-08-13 15:18:12 -07:00
parent ff9728aaa2
commit 0f6db6f751
243 changed files with 47012 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
// Copyright 2018 Google LLC. All Rights Reserved. This file and proprietary
// source code may only be used and distributed under the Widevine Master
// License Agreement.
#ifndef CAS_PROPERTIES_H
#define CAS_PROPERTIES_H
#include <string>
namespace wvcas {
// Properties methods must be implemented for a platform. The values returned
// describe the capabilities and configuration of a device using Widevine CAS.
class Properties {
private:
Properties(); // Not implemented
~Properties(); // NotImplemented
public:
// Sets the |company_name| field value to be populated in and EMM license
// request. Returns false if unable to set the value.
static bool GetCompanyName(std::string* company_name);
// Sets the |model_name| field value to be populated in and EMM license
// request. Returns false if unable to set the value.
static bool GetModelName(std::string* model_name);
// Sets the |product_name| field value to be populated in and EMM license
// request. Returns false if unable to set the value.
static bool GetProductName(std::string* product_name);
// Sets the |arch_name| field value to be populated in and EMM license
// request. Returns false if unable to set the value.
static bool GetArchitectureName(std::string* arch_name);
// Sets the |device_name| field value to be populated in and EMM license
// request. Returns false if unable to set the value.
static bool GetDeviceName(std::string* device_name);
// Returns a path to CAS oemcrypto library, either default,
// or overridden through system property.
// Returned path could be either absolute or relative.
// Returns false if unable to set the value.
static bool GetOEMCryptoPath(std::string* path);
};
} // namespace wvcas
#endif // CAS_PROPERTIES_H