B2G/gecko/toolkit/components/url-classifier/content/wireformat.js
/**
 * A class that knows how to serialize and deserialize meta-information.
 * This meta information is the table name and version number, and 
 * in its serialized form looks like the first line below:
 * 
 * [name-of-table X.Y update?]                
 * ...key/value pairs to add or delete follow...
 * <blank line ends the table>
 *
 * The X.Y is the version number and the optional "update" token means 
 * that the table is a differential from the curent table the extension
 * has. Its absence means that this is a full, new table.
 */
A class that knows how to serialize and deserialize meta-information.
This meta information is the table name and version number, and
in its serialized form looks like the first line below.

[name-of-table X.Y update?]
key/value pairs to add or delete follow


The X.Y is the version number and the optional "update" token means
that the table is a differential from the curent table the extension
has. Its absence means that this is a full, new table.
A class that knows how to serialize and deserialize meta - information . This meta information is the table name and version number and in its serialized form looks like the first line below . [ name - of - table X . Y update? ] key / value pairs to add or delete follow The X . Y is the version number and the optional " update " token means that the table is a differential from the curent table the extension has . Its absence means that this is a full new table .
function PROT_VersionParser(type, opt_major, opt_minor, opt_requireMac) {
  this.debugZone = "versionparser";
  this.type = type;
  this.major = 0;
  this.minor = 0;
  this.badHeader = false;
  this.mac = false;
  this.macval = "";
  this.macFailed = false;
  this.requireMac = !!opt_requireMac;
  this.update = false;
  this.needsUpdate = false;  
  this.didRead = false;
  if (opt_major)
    this.major = parseInt(opt_major);
  if (opt_minor)
    this.minor = parseInt(opt_minor);
}
function PROT_VersionParser ( type , opt_major , opt_minor , opt_requireMac ) { this . debugZone = "versionparser" ; this . type = type ; this . major = 0 ; this . minor = 0 ; this . badHeader = false ; this . mac = false ; this . macval = "" ; this . macFailed = false ; this . requireMac = ! ! opt_requireMac ; this . update = false ; this . needsUpdate = false ; this . didRead = false ; if ( opt_major ) this . major = parseInt ( opt_major ) ; if ( opt_minor ) this . minor = parseInt ( opt_minor ) ; }
A class that knows how to serialize and deserialize meta-information.
A class that knows how to serialize and deserialize meta - information .
// Should the wireformatreader compute a mac? // used by ListManager to determine update policy // Used by ListerManager to see if we have read data for this table from // disk.  Once we read a table from disk, we are not going to do so again // but instead update remotely if necessary.