uint32_t ID3Parser::GetHeaderLength() const { MOZ_ASSERT(IsParsed(), "Queried length of ID3 header before parsing finished."); return mHeaderLength; }
bool ID3Parser::ParseChar(char ch) { // First three bytes of an ID3v2 header must match the string "ID3". if (mCurrentChar < sizeof(sID3Head) / sizeof(*sID3Head) && ch != sID3Head[mCurrentChar]) { goto fail; } // The last four bytes of the header is a 28-bit unsigned integer with the // high bit of each byte unset. if (mCurrentChar >= 6 && mCurrentChar < ID3_HEADER_LENGTH) { if (ch & 0x80) { goto fail; } else { mHeaderLength <<= 7; mHeaderLength |= ch; } } mCurrentChar++; return IsParsed(); fail: Reset(); return false; }
void CBSymbolList::FileChanged ( const JCharacter* fileName, const CBTextFileType fileType, const JFAID_t id ) { if (IsParsed(fileType)) { if (!itsBeganEmptyFlag) { RemoveFile(id); } ParseFile(fileName, fileType, id); } }