CastAuthApk: Castkey AIDL mediaDrm plugin
Bug: 229298787 Test: Access Cast creds with MediaDrm plugin Change-Id: I085b193ff4046d9005366c8bc8b3eb8020716b4b
This commit is contained in:
parent
9bf1a707f4
commit
66c1664383
15 changed files with 968 additions and 0 deletions
28
cast_auth/mediadrm/include/SessionLibrary.h
Normal file
28
cast_auth/mediadrm/include/SessionLibrary.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
#ifndef SESSION_LIBRARY_H_
|
||||
#define SESSION_LIBRARY_H_
|
||||
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
|
||||
namespace castkeydrm {
|
||||
|
||||
class SessionLibrary {
|
||||
public:
|
||||
static SessionLibrary* get();
|
||||
std::vector<uint8_t> createSession();
|
||||
void closeSession(const std::vector<uint8_t>& session);
|
||||
|
||||
private:
|
||||
SessionLibrary() : next_session_id_(1) {}
|
||||
|
||||
static std::mutex singleton_lock_;
|
||||
static SessionLibrary* singleton_;
|
||||
|
||||
std::mutex session_lock_;
|
||||
uint32_t next_session_id_;
|
||||
std::vector<std::vector<uint8_t>> sessions_;
|
||||
};
|
||||
|
||||
} // namespace castkeydrm
|
||||
|
||||
#endif // SESSION_LIBRARY_H_
|
Loading…
Add table
Add a link
Reference in a new issue