three
T'I'X'
the free
Track'Info'Xchange'
''' / articles / 0011
[printable version]
home
contact
mail

Query result data format

Overview

This article shows the data transfer format between Deluxe CD Player and its servers. It is for developers who intend to write their own DeluxeCD compatible client or server.

Note: I'd like you to contact me if you go in production/deployment with your project.

The server output uses the HTTP transfer protocol and has the same structure as Windows *.INI files (see e.g. GetPrivateProfileString() in the Windows API reference).

The format is

[section]
key=string
  :
  :
The section name is always "CD" (without quotes). It is followed by a series of key-names and values, separated by the equal sign "=".

Keys / values
CERTIFICATE
Holds a certificate string of 48 characters length depending on the provider name and provider url. Your application may ignore this value. However, Deluxe CD player does not accept data from servers with wrong or missing certificate string. The string may be in upper or lower case letters.
See also Server Certificates.
Example
CERTIFICATE=45A761848DCA48F5E21A59BAD22F06B789B1616FF99C8ECE
Mode
Holds the return code of the query request. See also examples later in this article. The following modes are known:
Mode=0The album information has been found and is listed in the output stream.
Mode=1There is more than one set of album information. See Mode=1 discussion below in the examples.
Mode=2The album information could not be found in the database.
Title
Title of the CD
Example
Title=Thriller
Artist
Artist of the CD
Example
Artist=Michael Jackson
Track[n]
Where [n] stands for a track number between 1 and 99:
Track information; in general the song name.
Example
Track1=Wanna Be Startin' Somethin'
Menu[n]
Where [n] stands for a number. This optional data gives information about a hyperlink related to the inserted cd. The hyperlink is then available as menu item of Deluxe CD Player.
The menu item text and the hyperlink are separated by two colons ::. More than one item is allowed.
Example
Menu1=More about The Beatles::http://www.beatles.com
Shows the following menu
(please watch the last menu item):
picture showing sample menu
URL[n]
Where [n] stands for a number. If mode=1 one there is listed one URL for every entry found in the database. See complete mode=1 example below.
Example
URL1=http://www.threetix.net/cgi-bin/query.php?dbID=27926724&v=1
Artist[n]
Where [n] stands for a number. If mode=1 one there is listed one artist for every entry found in the database. See complete mode=1 example below.
Example
Artist1=Strelki
Title[n]
Where [n] stands for a number. If mode=1 one there is listed one title for every entry found in the database. See complete mode=1 example below.
Example
Title1=Sipy i Rozy (using russian charset)
Copyright
Label
ReleaseDate
CoverLarge
CoverSmall
This optional data are stored in deluxecd.mdb (if given) but not used by the Deluxe CD Player application.
Example(s)
Copyright=19650701
Label=Apple Records
ReleaseDate=19650701
CoverLarge=http://www.beatles.com/fantasy_image_name1.jpg
CoverSmall=http://www.beatles.com/fantasy_image_name2.jpg
Rules

Your parser should follow the same rules as if using GetPrivateProfileString(), especially:

  • The section and key names are not case sensitive, that means that [cd] and [CD] are the same section name and Artist=... and artist=... are the same key name.
  • The key names may be in any order. That means that
    Track2=...
    Track1=...
    is valid although the track numbers are not in logical order.
  • The key/value pairs need not to be complete. That means:
    Track1=...
    Track3=...
    is valid although Track2 is not listed. Your application must use default values if they are not present.
  • There may be more than one equal sign per line. E.g.:
    Track1=1+1=2
    is valid. The first equal sign (from left to right) is used as delimiter. In this example, Track1 is the key name and 1+1=2 is the assigned value.
  • There may appear "unknown" keys, e.g.
    Greetings=Happy new Year!
    is valid although the key "Greetings" is not part of the standard (and only mentioned as sample here).
  • The data stream may have blank lines and comment lines. Comment lines begin with the ";" sign.
Complete examples
Mode=0 - entry found
[CD]
CERTIFICATE=45A761848DCA48F5E21A59BAD22F06B789B1616FF99C8ECE
Mode=0
Artist=Michael Jackson
Title=Thriller
Track1=Wanna Be Startin' Somethin'
Track2=Baby Be Mine
Track3=The Girl Is Mine
Track4=Thriller
Track5=Beat It
Track6=Billie Jean
Track7=Human Nature
Track8=P.Y.T. (Pretty Young Thing)
Track9=The Lady In My Life
Mode=1 - more than one entry found
If there is more than one entry found in the database - e.g. different CDs or info in different languages - data are returned with Mode set to 1.
For each entry in the database, an URL[n], Artist[n] and Title[n] will be listed. The application will prompt the user which entry to download (showing title and artist).
If the user has made his selection, the application can retrieve the data under the given URL.
Please note that the format and parameters of the URL may vary from server to server and should be used as given.
[CD]
CERTIFICATE=45A761848DCA48F5E21A59BAD22F06B789B1616FF99C8ECE
Mode=1
URL1=http://www.threetix.net/cgi-bin/query.php?dbID=27926724&v=1
Artist1=Strelki
Title1=Sipy i Rozy (using russian charset)
URL2=http://www.threetix.net/cgi-bin/query.php?dbID=27926724&v=2
Artist2=Strelki
Title2=Sipy i Rozy
Shows this dialog box: picture showing dialog box
Mode=2 - no entry found
[CD]
CERTIFICATE=45A761848DCA48F5E21A59BAD22F06B789B1616FF99C8ECE
Mode=2
See also

How to calculate the TitleQuery string for DeluxeCD.mdb?



''' / articles / 0011