Add EMMG to carry fingerprinting and service blocking info

This commit is contained in:
Widevine Buildbot
2020-09-15 17:24:55 +00:00
parent 535930dc60
commit 8fd98d66f3
14 changed files with 205 additions and 49 deletions

View File

@@ -1,15 +1,9 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Google LLC.
//
// This software is licensed under the terms defined in the Widevine Master
// License Agreement. For a copy of this agreement, please contact
// widevine-licensing@google.com.
////////////////////////////////////////////////////////////////////////////////
// Copyright 2017 Google LLC. All rights reserved.
#ifndef COMMON_CERTIFICATE_TYPE_H_
#define COMMON_CERTIFICATE_TYPE_H_
#ifndef VIDEO_WIDEVINE_EXPORT_COMMON_CERTIFICATE_TYPE_H_
#define VIDEO_WIDEVINE_EXPORT_COMMON_CERTIFICATE_TYPE_H_
namespace widevine {
namespace video_widevine {
enum CertificateType {
kCertificateTypeTesting,
@@ -17,6 +11,6 @@ enum CertificateType {
kCertificateTypeProduction,
};
} // namespace widevine
} // namespace video_widevine
#endif // COMMON_CERTIFICATE_TYPE_H_
#endif // VIDEO_WIDEVINE_EXPORT_COMMON_CERTIFICATE_TYPE_H_

View File

@@ -1,20 +1,14 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright 2020 Google LLC.
//
// This software is licensed under the terms defined in the Widevine Master
// License Agreement. For a copy of this agreement, please contact
// widevine-licensing@google.com.
////////////////////////////////////////////////////////////////////////////////
// Copyright 2020 Google LLC. All rights reserved.
//
// Description:
// Container of Widevine default security profiless.
#ifndef COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_
#define COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_
#ifndef VIDEO_WIDEVINE_EXPORT_COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_
#define VIDEO_WIDEVINE_EXPORT_COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_
#include "common/security_profile_list.h"
#include "video/widevine/export/common/security_profile_list.h"
namespace widevine {
namespace video_widevine {
class DefaultDeviceSecurityProfileList : public SecurityProfileList {
public:
@@ -34,6 +28,6 @@ class DefaultDeviceSecurityProfileList : public SecurityProfileList {
std::vector<std::string>* default_profile_strings) const;
};
} // namespace widevine
} // namespace video_widevine
#endif // COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_
#endif // VIDEO_WIDEVINE_EXPORT_COMMON_DEFAULT_DEVICE_SECURITY_PROFILE_LIST_H_

View File

@@ -1,26 +1,20 @@
////////////////////////////////////////////////////////////////////////////////
// Copyright 2020 Google LLC.
//
// This software is licensed under the terms defined in the Widevine Master
// License Agreement. For a copy of this agreement, please contact
// widevine-licensing@google.com.
////////////////////////////////////////////////////////////////////////////////
// Copyright 2020 Google LLC. All rights reserved.
//
// Description:
// Container of device security profiles. Security profiles indicate rules
// to allow using the profile. The rules are based on DRM capabilities of a
// device.
#ifndef COMMON_SECURITY_PROFILE_LIST_H_
#define COMMON_SECURITY_PROFILE_LIST_H_
#ifndef VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_
#define VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_
#include "absl/synchronization/mutex.h"
#include "protos/public/client_identification.pb.h"
#include "protos/public/device_security_profile_data.pb.h"
#include "protos/public/provisioned_device_info.pb.h"
#include "protos/public/security_profile.pb.h"
#include "third_party/absl/synchronization/mutex.h"
#include "video/widevine/protos/public/client_identification.proto.h"
#include "video/widevine/protos/public/device_security_profile_data.proto.h"
#include "video/widevine/protos/public/provisioned_device_info.proto.h"
#include "video/widevine/protos/public/security_profile.proto.h"
namespace widevine {
namespace video_widevine {
using ClientCapabilities = ClientIdentification::ClientCapabilities;
// The SecurityProfileList will hold all security profiles. During license
@@ -82,6 +76,10 @@ class SecurityProfileList {
const ClientIdentification& client_id,
const ProvisionedDeviceInfo& device_info) const;
int64 GetCurrentTimeSeconds() const;
bool IsProfileActive(const SecurityProfile& profile,
int64 current_time_seconds) const;
mutable absl::Mutex mutex_;
// Security profiles
@@ -89,5 +87,5 @@ class SecurityProfileList {
std::vector<SecurityProfile> security_profiles_ ABSL_GUARDED_BY(mutex_);
};
} // namespace widevine
#endif // COMMON_SECURITY_PROFILE_LIST_H_
} // namespace video_widevine
#endif // VIDEO_WIDEVINE_EXPORT_COMMON_SECURITY_PROFILE_LIST_H_