* The Usage APIs return usage reports from either L1 or L3 (if available). * Correction to when usage reports are saved. In addition to other events they are now saved when keys are loaded, usage reports are released and soon after first decryption and periodically (60 seconds) after that, if decryption takes place. * Usage reports now get deleted on an unprovision request. * Policy timer is now started when offline licenses are restored. * Usage session is now released, when a usage response is received. * Usage tests ahev been enabled. * Added CDM extended duration (integration) tests to test usage reporting and querying. These need to be run manually as they take a while (currently half an hour). b/15592374 [ Merge of https://widevine-internal-review.googlesource.com/#/c/10800 from the Widevine CDM repo ] Change-Id: Ia817e03ebbe880e08ba7b4a235ecb82b3ff35fbf
30 lines
981 B
C++
30 lines
981 B
C++
// Copyright 2013 Google Inc. All Rights Reserved.
|
|
|
|
#ifndef WVCDM_CORE_STRING_CONVERSIONS_H_
|
|
#define WVCDM_CORE_STRING_CONVERSIONS_H_
|
|
|
|
#include <stddef.h>
|
|
#include <stdint.h>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace wvcdm {
|
|
|
|
std::vector<uint8_t> a2b_hex(const std::string& b);
|
|
std::vector<uint8_t> a2b_hex(const std::string& label, const std::string& b);
|
|
std::string a2bs_hex(const std::string& b);
|
|
std::string b2a_hex(const std::vector<uint8_t>& b);
|
|
std::string b2a_hex(const std::string& b);
|
|
std::string Base64SafeEncode(const std::vector<uint8_t>& bin_input);
|
|
std::string Base64SafeEncodeNoPad(const std::vector<uint8_t>& bin_input);
|
|
std::vector<uint8_t> Base64SafeDecode(const std::string& bin_input);
|
|
std::string HexEncode(const uint8_t* bytes, unsigned size);
|
|
std::string IntToString(int value);
|
|
std::string UintToString(unsigned int value);
|
|
int64_t htonll64(int64_t x);
|
|
int64_t ntohll64(int64_t x);
|
|
|
|
}; // namespace wvcdm
|
|
|
|
#endif // WVCDM_CORE_STRING_CONVERSIONS_H_
|