<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="GENERATOR" content="Mozilla/4.75 [en] (X11; U; Linux 2.2.16-22 i686) [Netscape]"> <meta name="Author" content="Tognon Stefano"> <meta name="Description" content="Inside TSID"> <meta name="Keywords" content="TSID, SID"> <title>Inside TSID</title> </head> <body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000"> <center><b><font size=+1>INSIDE TSID</font></b></center> <p>TSID is a library that allow a sid player to collect your listening statistic. <br>It comes with (actually) 3 classes: <ol> <li> TSID</li> <li> SIDT</li> <li> TSIDExaminer</li> </ol> <b>TSID class:</b><b></b> <p>The class TSID is the base class: it offers the methods for storing the listening information using the class SIDT. <br>Essentially, for storing information, you must use the <i>addTime </i>method. <br><i>addTime </i>needs to have the relative (or absolute) file path from HVSC, the listening time, and the sub song of the file you are listening. <p>To understand how the information are stored and lately used, some thing are to be known. TSID was thought for use with HVSC. HVSC are structured with directory named with composer names. This allows easy search for a given composer tune. So, TSID use the passed name as a HVSC directory name, and builds a hidden directory (.tsid_hvsc) that reflect the HVSC structure. In Windows the directory is tsid_hvsc and is placed inside windows home. <p>TSID use buffered technique to avoid player slow down operations, while registering the collected information. It uses SIDT class for this porpoise. <p><b>SIDT class:</b><b></b> <p>The class SIDT manage a .sidt file. When we listen for /Gray_Matt/Tusker.sid, TSID use SIDT for creating the file /Gray_Matt/Tusker.sidt in the hidden directory. SIDT has the <i>add</i> 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 <i>write</i> method is called. <p>A .sidt file contains these information: <ul> <li> each line reflect one sub tune of the corresponding sid file</li> <li> the line start with <b>#number</b> -> the sub tune number</li> <li> than there's the cumulative listened seconds</li> <li> and finally the cumulative number of listen</li> <li> the sub tune are ordered from low to high number</li> </ul> SIDT has two other useful methods: <i>InitForGet</i>, and <i>getNext</i> that are to be used for queering the sidt file. <p><b>TSIDExaminer</b><b></b> <p>The class TSIDExaminer 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). <br> <p><b>Error System</b></p> From TSID 0.6 there is a new error system. Each classes have the <code>getCodeError()</code> and <code>getError()</code> that are to be used to see what was the last error.<br> Else, if you test the class by the defined boolean operator, you can know if class can go away or it has some error. </body> </html>