⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mfccddb.htm

📁 MfcCDDB v1.11 A freeware MFC class to support access to CDDB servers Welcome to MfcCDDB, a collectio
💻 HTM
📖 第 1 页 / 共 4 页
字号:
correspond to the m_Categories array.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="m_PendingSites"></a><big><strong>CCDDBStatus::m_PendingSites</strong></big></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">m_PendingSites is of type CStringArray and is the list of sites
which are fed database entries from the current site.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="m_PendingEntries"></a><big><strong>CCDDBStatus::m_PendingEntries</strong></big></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">m_PendingEntries is of type CArray&lt;int, int&gt; and contains the
number of pending entries to be sent to each site. The elements at each offset correspond
to the m_PendingSites array.</font></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="CCDDBTrackPosition"></a><strong><big>CCDDBTrackPosition</big></strong></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">This class represents the absolute track position of a CD in MSF
(Minute, Second, Frame) format. This class is used in the <a href="#ComputeDiscID"><strong>CCDDB::ComputeDiscID</strong></a>,
<strong><a href="#GetTrackPositions">CCDDB::GetTrackPositions</a> &amp; <a href="#Query">CCDDB::Query</a></strong>
functions.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="CCDDBTrackPosition_operator="></a><big><strong>CCDDBTrackPosition::operator=</strong></big></font></p>

<p><font face="Arial"><strong>CCDDBTrackPosition&amp; operator=(const
CCDDBTrackPosition&amp;</strong><em> position</em><strong>);</strong></font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>position</em> This CCDDBTrackPosition instance to copy into this
instance.</font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">Standard operator= for the CCDDBTrackPosition class.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="m_nMinute"></a><strong><big>CCDDBTrackPosition::m_nMinute</big></strong></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">m_nMinute is of type int and contains the minutes component of a
track's position.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="m_nSecond"></a><strong><big>CCDDBTrackPosition::m_nSecond</big></strong></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">m_nSecond is of type int and contains the seconds component of a
track's position.</font></p>

<p>&nbsp;</p>

<p><font face="Arial"><a name="m_nFrame"></a><strong><big>CCDDBTrackPosition::m_nFrame</big></strong></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">m_nFrame is of type int and contains the frame component of a
track's position. A frame is defined as 1/75 of a second meaning that this value ranges
from 0 - 74.</font></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<p><a name="CCDDB"></a><big><font face="Arial"><strong>CCDDB::CCDDB</strong></font></big></p>

<p><font face="Arial"><strong>CCDDB();</strong></font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">Standard constructor for the class. This class is the main CDDB
support class and contains all the CDDB related functions. It also includes a number of
simple wrapper functions for accessing CD-Audio discs through the Windows MCI programming
interface.</font></p>

<p>&nbsp;</p>

<p><a name="GetCDROMDrives"></a><big><font face="Arial"><strong>CCDDB::GetCDROMDrives</strong></font></big></p>

<p><font face="Arial"><strong>void GetCDROMDrives(CStringArray&amp; </strong><em>drives</em><strong>);</strong></font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>drives</em> Upon return this will contain the drive letters
which correspond to CDROM drives.</font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">Upon return the &quot;drives&quot; array will contain all the drives
on the current machine which are CDROM drives. Any of the values in the array can then be
used in a call to <strong><a href="#ComputeDiscID">CCDDB::ComputeDiscID</a></strong>. The
format returned is in the format of &quot;x:&quot; where x is the drive letter of the
CDROM drive.</font></p>

<p>&nbsp;</p>

<p><a name="ComputeDiscID"></a><big><font face="Arial"><strong>CCDDB::ComputeDiscID</strong></font></big></p>

<p><font face="Arial"><strong>BOOL ComputeDiscID(DWORD&amp; </strong><em>dwDiscID</em><strong>,
LPCTSTR </strong><em>pszDrive</em><strong> = NULL);</strong></font></p>

<p><font face="Arial"><strong>DWORD ComputeDiscID(const CArray&lt;CCDDBTrackPosition,
CCDDBTrackPosition&amp;&gt;&amp; </strong><em>tracks</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">1) TRUE if the CDDB DISC-ID was computed successfully
otherwise FALSE.</font></p>

<p class="t"><font face="Arial">2) The computed DISC-ID of the specified track positions.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>dwDiscID</em> Upon successful return from the first form of the
function, this will contain the DISC-ID of the inserted album.</font></p>

<p><font face="Arial"><em>pszDrive</em> The drive letter of the CDROM drive to compute the
DISC-ID of the inserted CD.</font></p>

<p><font face="Arial"><em>tracks</em> An array specifying an albums contents which the
DISC-ID is to be computed for.</font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">Computes the DISC-ID of the inserted CD in the specified CDROM
drive. If you specify NULL for the drive then the default CDROM drive will be used. Please
note that the tracks parameter includes the lead-out track position also. The tracks
parameter can be computed using the <a href="#GetTrackPositions"><strong>CCDDB::GetTrackPostions</strong></a>
function</font></p>

<p>&nbsp;</p>

<p><a name="GetTrackPositions"></a><big><font face="Arial"><strong>CCDDB::GetTrackPositions</strong></font></big></p>

<p><font face="Arial"><strong>BOOL GetTrackPositions(CArray&lt;CCDDBTrackPosition,
CCDDBTrackPosition&amp;&gt;&amp; </strong><em>tracks</em><strong>, LPCTSTR </strong><em>pszDrive</em><strong>
= NULL);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the track positions were obtained successfully
otherwise FALSE.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>tracks</em> Upon successful return this will contain the track
positions of the album in the specified CDROM drive.</font></p>

<p><font face="Arial"><em>pszDrive</em> The drive letter of the CDROM drive to get the
track positions of.</font></p>

<p><font face="Arial"><strong>Remarks</strong></font></p>

<p><font face="Arial">Upon return the &quot;tracks&quot; array will contain the track
positions for the specified album in the &quot;pszDrive&quot; CDROM drive. If you specify
NULL for the drive, then the default CDROM drive will be used. Please note that the tracks
array will include the leadout track position as the last element in the array as well as
the normal audio tracks. This means that the size of the array upon return will be 1
greater than the number of audio tracks on the album. This is required for the calculation
of the DISC-ID as returned from the <strong><a href="#ComputeDiscID">CCDDB::ComputeDiscID</a></strong>
function.</font></p>

<p>&nbsp;</p>

<p><a name="Sites"></a><big><font face="Arial"><strong>CCDDB::Sites</strong></font></big></p>

<p><font face="Arial"><strong>BOOL Sites(CArray&lt;CCDDBSite, CCDDBSite&amp;&gt;&amp; </strong><em>sites</em><strong>,
const CString&amp; </strong><em>sServe</em>r<strong> = _T(&quot;cddb.cddb.com&quot;),
const CString&amp; </strong><em>sAddress<strong> = </em>_T(&quot;/~cddb/cddb.cgi&quot;),
int </strong><em>nPort<strong> = </em>80);</strong></font></p>

<p><font face="Arial"><strong>BOOL Sites(CArray&lt;CCDDBSite, CCDDBSite&amp;&gt;&amp; </strong><em>sites</em><strong>,
const CCDDBSite&amp; </strong><em>server</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the sites command was issued successfully
otherwise FALSE.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>sites</em> Upon successful return this will contain the list of
CDDB servers as returned from the Sites command.</font></p>

<p><font face="Arial"><em>sServer</em> The IP address or domain name of the CDDB HTTP
server to use.</font></p>

<p><font face="Arial"><em>sAddress</em> The HTTP request to make.</font></p>

<p><font face="Arial"><em>nPort</em> The TCP/IP port number on which to make the
connection.</font></p>

<p><font face="Arial"><em>server</em> The server to use as specified through its
parameters <strong><a href="#m_sSite">m_sSite</a>, <a href="#m_nPort">m_nPort</a></strong>
and<strong> <a href="#m_sAddress">m_sAddress</a></strong> parameters<strong>.</strong></font></p>

<p><strong><font face="Arial">Remarks</font></strong></p>

<p><font face="Arial">Issues the CDDB &quot;Sites&quot; command. For more information
about this command, please consult the CDDB howto document. The first form of the
function uses the default CDDB server at &quot;cddb.cddb.com&quot; to retrieve the site
list, whereas the second form allows you to specify the server details through the
&quot;server&quot; parameter. </font></p>

<p>&nbsp;</p>

<p><big><a name="Categories"></a><strong><font face="Arial">CCDDB::Categories</font></strong></big></p>

<p><font face="Arial"><strong>BOOL Categories(const CCDDBSite&amp; </strong><em>server</em><strong>,
CStringArray&amp;</strong><em> categories</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the Categories command was issued successfully
otherwise FALSE.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>server</em> The server to use as specified through its
parameters <strong><a href="#m_sSite">m_sSite</a>, <a href="#m_nPort">m_nPort</a></strong>
and<strong> <a href="#m_sAddress">m_sAddress</a></strong> parameters<strong>.</strong></font></p>

<p><font face="Arial"><em>categories</em> Upon successful return this will contain the
list of categories which this server's database contains.</font></p>

<p><strong><font face="Arial">Remarks</font></strong></p>

<p><font face="Arial">Issues the CDDB &quot;lscat&quot; command. This function returns the
type of categories which this servers database contains. For more information about this
command, please consult the CDDB howto document.</font></p>

<p>&nbsp;</p>

<p><big><a name="Status"></a><strong><font face="Arial">CCDDB::Status</font></strong></big></p>

<p><font face="Arial"><strong>BOOL Status(const CCDDBSite&amp; </strong><em>server</em><strong>,
CCDDBStatus&amp; </strong><em>status</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the &quot;Stat&quot; command was issued
successfully otherwise FALSE.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>server</em> The server to use as specified through its
parameters <strong><a href="#m_sSite">m_sSite</a>, <a href="#m_nPort">m_nPort</a></strong>
and<strong> <a href="#m_sAddress">m_sAddress</a></strong> parameters<strong>.</strong></font></p>

<p><font face="Arial"><em>status</em> Upon successful return this will contain the CDDB
servers information.</font></p>

<p><strong><font face="Arial">Remarks</font></strong></p>

<p><font face="Arial">Issues the CDDB &quot;stat&quot; command. This function returns
information relating to a CDDB server such as number of albums in the database etc in the
status parameter. For more information about this command, please consult the CDDB
howto document.&nbsp; </font></p>

<p>&nbsp;</p>

<p><big><a name="Query"></a><strong><font face="Arial">CCDDB::Query</font></strong></big></p>

<p><font face="Arial"><strong>BOOL Query(const CCDDBSite&amp;</strong> <em>server</em>, <strong>DWORD
</strong><em>dwDiscID</em>, <strong>const CArray&lt;CCDDBTrackPosition,
CCDDBTrackPosition&amp;&gt;&amp;</strong> <em>tracks</em>, <strong>CArray&lt;CCDDBQueryResult,
CCDDBQueryResult&amp;&gt;&amp;</strong> <em>results</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the &quot;query&quot; command was issued
successfully otherwise FALSE.</font></p>

<p><font face="Arial"><strong>Parameters</strong></font></p>

<p><font face="Arial"><em>server</em> The server to use as specified through its
parameters <strong><a href="#m_sSite">m_sSite</a>, <a href="#m_nPort">m_nPort</a></strong>
and<strong> <a href="#m_sAddress">m_sAddress</a></strong> parameters<strong>.</strong></font></p>

<p><font face="Arial"><em>dwDiscID</em> The DISC-ID of the inserted album.</font></p>

<p><font face="Arial"><em>tracks</em> An array specifying an albums contents which the
DISC-ID is to be computed for.</font></p>

<p><font face="Arial">results Upon successful return this will contain an array of query
result instances which represent the matching albums</font></p>

<p><strong><font face="Arial">Remarks</font></strong></p>

<p><font face="Arial">Issues the CDDB &quot;query&quot; command. This function queries the
CDDB servers database about whether or not the specified album is present. If the album is
not found, then the return value will be TRUE and there will be no entries in the
&quot;results&quot; array. An exact match will have just one element in the array while an
inexact match will result in multiple entries in the array. For more information about
this command, please consult the CDDB howto document.&nbsp; </font></p>

<p>&nbsp;</p>

<p><big><a name="Read"></a><strong><font face="Arial">CCDDB::Read</font></strong></big></p>

<p><font face="Arial"><strong>BOOL Read(const CCDDBSite&amp;</strong> <em>server</em>, <strong>DWORD
</strong><em>dwDiscID</em>, <strong>const CString&amp; </strong><em>sCategory</em><strong>,
CCDDBRecord&amp;</strong> <em>record</em><strong>);</strong></font></p>

<p class="rl"><strong><font face="Arial">Return Value</font></strong></p>

<p class="t"><font face="Arial">TRUE if the &quot;read&quot; command was issued
successfully otherwise FALSE.</font></p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -