void OnOpenComplete(Status aStatus) override { // If we hit an error, fail. if (aStatus != Status::kSuccess) {
Done(aStatus);
} elseif (mFileIO) { // Otherwise, write our data to the file.
mFileIO->Write(&mData[0], mData.size());
}
}
void OnReadComplete(Status aStatus, const uint8_t* aData,
uint32_t aDataSize) override { // This function should never be called, we only ever write data with this // client.
assert(false);
}
void Done(cdm::FileIOClient::Status aStatus) { // Note: Call Close() before running continuation, in case the // continuation tries to open the same record; if we call Close() // after running the continuation, the Close() call will arrive // just after the Open() call succeeds, immediately closing the // record we just opened. if (mFileIO) {
mFileIO->Close();
}
if (IO_SUCCEEDED(aStatus)) {
mOnSuccess();
} else {
mOnFailure();
}
void Done(cdm::FileIOClient::Status aStatus, const uint8_t* aData,
uint32_t aDataSize) { // Note: Call Close() before running continuation, in case the // continuation tries to open the same record; if we call Close() // after running the continuation, the Close() call will arrive // just after the Open() call succeeds, immediately closing the // record we just opened. if (mFileIO) {
mFileIO->Close();
}
if (IO_SUCCEEDED(aStatus)) {
mOnSuccess(aData, aDataSize);
} else {
mOnFailure();
}
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.