Revert submission 29489024-pixel_tablet_mediadrm Reason for revert: DroidMonitor: Potential culprit for http://b/369192150 - Verifying through ABTD before submission. Reverted changes: /q/submissionid:29489024-pixel_tablet_mediadrm Change-Id: I3c1c31b871275bf2b5ceb93120918f749f828cd1
28 lines
No EOL
587 B
C++
28 lines
No EOL
587 B
C++
#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_
|