This CL merges several CLs from the widevine repo: http://go/wvgerrit/18012 Add support for querying allowed usage for key. http://go/wvgerrit/17971 Add per-origin storage. http://go/wvgerrit/18152 Add OEMCrypto's generic crypto operations to CDM. http://go/wvgerrit/17911 QueryKeyControlInfo => QueryOemCryptoSessionId Note: numbering in wv_cdm_types.h was added in this CL and will be back ported to wvgerrit in a future CL. Change-Id: Idb9e9a67e94f62f25dc16c5307f75a08b3430b64
34 lines
1.0 KiB
C++
34 lines
1.0 KiB
C++
// Copyright 2016 Google Inc. All Rights Reserved.
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include "wv_cdm_types.h"
|
|
|
|
namespace wvcdm {
|
|
|
|
const char kCurrentDirectory[] = ".";
|
|
const char kParentDirectory[] = "..";
|
|
const char kDirectoryDelimiter = '/';
|
|
const char kWildcard[] = "*";
|
|
bool IsCurrentOrParentDirectory(char* dir);
|
|
|
|
class FileUtils {
|
|
public:
|
|
static bool Exists(const std::string& src);
|
|
static bool Remove(const std::string& src);
|
|
static bool Copy(const std::string& src, const std::string& dest);
|
|
static bool List(const std::string& path, std::vector<std::string>* files);
|
|
static bool IsRegularFile(const std::string& path);
|
|
static bool IsDirectory(const std::string& path);
|
|
static bool CreateDirectory(const std::string& path);
|
|
|
|
// Certificate and offline licenses are now stored in security
|
|
// level specific directories. In an earlier version they were
|
|
// stored in a common directory and need to be copied over.
|
|
static void SecurityLevelPathBackwardCompatibility(
|
|
CdmSecurityLevel security_level);
|
|
};
|
|
|
|
} // namespace wvcdm
|