using std::function;
using std::string;
using std::stringstream;
using std::vector;
void ClearKeyPersistence::ReadAllRecordsFromIndex(
function<void()>&& aOnComplete) { // Clear what we think the index file contains, we're about to read it again.
mPersistentSessionIds.clear();
// Hold a reference to the persistence manager, so it isn't released before // we try and use it.
RefPtr<ClearKeyPersistence> self(this);
function<void(const uint8_t*, uint32_t)> onIndexSuccess =
[self, aOnComplete](const uint8_t* data, uint32_t size) {
CK_LOGD("ClearKeyPersistence: Loaded index file!"); constchar* charData = (constchar*)data;
stringstream ss(string(charData, charData + size));
string name; while (getline(ss, name)) { if (ClearKeyUtils::IsValidSessionId(name.data(), name.size())) {
self->mPersistentSessionIds.insert(atoi(name.c_str()));
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.