INSIDE TSID2

TSID2 is a library that allow a sid player to collect your listening statistic.
It comes with (actually) 4 classes:

  1. TSID2
  2. SIDT2
  3. TSIDExaminer2
  4. TBList
TSID2 class:

The class TSID2 is the base class: it offers the methods for storing the listening information using the class SIDT2.
Essentially, for storing information, you must use the addTime method.
addTime needs to have the MD5 fingerprinter of the tune, the file path, the listening time, the sub song of the file you are listening, and eventually the length of this tune.

TSID2 use TBList internally for updating two best list in realtime.

TSID use buffered technique to avoid player slow down operations, while registering the collected information. It uses SIDT class for this porpoise.

SIDT class:

The class SIDT2 manage a .ini file containing the stored information of the tune that has the MD5 equal to the name of file.
SIDT has the add method for adding listening information about that tune. Note that for speed up operation, SIDT update an already existent file in the hidden directory, only when the write method is called.

A .ini file contains these information:

SIDT has two other useful methods: InitForGet, and getNext that are to be used for queering the ini file.

TSIDExaminer2

The class TSIDExaminer2 is the class that query the hidden directory and can produce lists of ordered classifies about the listened tunes. It manages single sub tunes, tunes (as a HVSC file) and authors (as HVSC directory).
He can use an external file containing the MD5/tune path-name for a better result.

TBList

This class takes updated the two best lists of tunes. They use an add methods for having MD5 and tune statistic about the tune to update.

Error System

From TSID 0.6 there is a new error system. Each classes have the getCodeError() and getError() that are to be used to see what was the last error.
Else, if you test the class by the defined boolean operator, you can know if class can go away or it has some error.
In TSID2 this error system is implemented again, but it is not yet completed.