summaryrefslogtreecommitdiffstats
path: root/kscd/kcompactdisc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kscd/kcompactdisc.cpp')
-rw-r--r--kscd/kcompactdisc.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/kscd/kcompactdisc.cpp b/kscd/kcompactdisc.cpp
index ea87fce4..4e477055 100644
--- a/kscd/kcompactdisc.cpp
+++ b/kscd/kcompactdisc.cpp
@@ -1,5 +1,5 @@
/*
- * KCompactDisc - A CD drive interface for the KDE Project.
+ * TDECompactDisc - A CD drive interface for the KDE Project.
*
* Copyright (c) 2005 Shaheedur R. Haque <srhaque@iee.org>
*
@@ -94,10 +94,10 @@ extern "C"
#define TRACK_VALID(track) \
((track) && (track <= m_tracks))
-const TQString KCompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
-const unsigned KCompactDisc::missingDisc = (unsigned)-1;
+const TQString TDECompactDisc::defaultDevice = DEFAULT_CD_DEVICE;
+const unsigned TDECompactDisc::missingDisc = (unsigned)-1;
-KCompactDisc::KCompactDisc(InformationMode infoMode) :
+TDECompactDisc::TDECompactDisc(InformationMode infoMode) :
m_device(TQString()),
m_status(0),
m_previousStatus(123456),
@@ -117,7 +117,7 @@ KCompactDisc::KCompactDisc(InformationMode infoMode) :
connect(&timer, TQT_SIGNAL(timeout()), TQT_SLOT(timerExpired()));
}
-KCompactDisc::~KCompactDisc()
+TDECompactDisc::~TDECompactDisc()
{
// Ensure nothing else starts happening.
timer.stop();
@@ -126,24 +126,24 @@ KCompactDisc::~KCompactDisc()
wm_cd_destroy();
}
-const TQString &KCompactDisc::device() const
+const TQString &TDECompactDisc::device() const
{
return m_device;
}
-unsigned KCompactDisc::discLength() const
+unsigned TDECompactDisc::discLength() const
{
if (NO_DISC || !m_tracks)
return 0;
return FRAMES_TO_MS(m_trackStartFrames[m_tracks+1] - m_trackStartFrames[0]);
}
-unsigned KCompactDisc::discPosition() const
+unsigned TDECompactDisc::discPosition() const
{
return cur_pos_abs * 1000 - FRAMES_TO_MS(m_trackStartFrames[0]);
}
-TQString KCompactDisc::discStatus(int status)
+TQString TDECompactDisc::discStatus(int status)
{
TQString message;
@@ -192,7 +192,7 @@ TQString KCompactDisc::discStatus(int status)
/**
* Do everything needed if the user requested to eject the disc.
*/
-void KCompactDisc::eject()
+void TDECompactDisc::eject()
{
if (m_status == WM_CDM_EJECTED)
{
@@ -206,33 +206,33 @@ void KCompactDisc::eject()
}
}
-unsigned KCompactDisc::track() const
+unsigned TDECompactDisc::track() const
{
return m_track;
}
-bool KCompactDisc::isPaused() const
+bool TDECompactDisc::isPaused() const
{
return (m_status == WM_CDM_PAUSED);
}
-bool KCompactDisc::isPlaying() const
+bool TDECompactDisc::isPlaying() const
{
return WM_CDS_DISC_PLAYING(m_status) && (m_status != WM_CDM_PAUSED) && (m_status != WM_CDM_TRACK_DONE);
}
-void KCompactDisc::pause()
+void TDECompactDisc::pause()
{
// wm_cd_pause "does the right thing" by flipping between pause and resume.
wm_cd_pause();
}
-void KCompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsigned endTrack)
+void TDECompactDisc::play(unsigned startTrack, unsigned startTrackPosition, unsigned endTrack)
{
wm_cd_play(TRACK_VALID(startTrack) ? startTrack : 1, startTrackPosition / 1000, TRACK_VALID(endTrack) ? endTrack : WM_ENDTRACK );
}
-TQString KCompactDisc::urlToDevice(const TQString& device)
+TQString TDECompactDisc::urlToDevice(const TQString& device)
{
KURL deviceUrl(device);
if (deviceUrl.protocol() == "media" || deviceUrl.protocol() == "system")
@@ -256,7 +256,7 @@ TQString KCompactDisc::urlToDevice(const TQString& device)
return device;
}
-bool KCompactDisc::setDevice(
+bool TDECompactDisc::setDevice(
const TQString &device_,
unsigned volume,
bool digitalPlayback,
@@ -304,64 +304,64 @@ bool KCompactDisc::setDevice(
return m_device != TQString();
}
-void KCompactDisc::setVolume(unsigned volume)
+void TDECompactDisc::setVolume(unsigned volume)
{
int status = wm_cd_volume(volume, WM_BALANCE_SYMMETRED);
kdDebug() << "Volume change: " << volume << ", status: " << discStatus(status) << endl;
}
-void KCompactDisc::stop()
+void TDECompactDisc::stop()
{
wm_cd_stop();
}
-const TQString &KCompactDisc::trackArtist() const
+const TQString &TDECompactDisc::trackArtist() const
{
return trackArtist(m_track);
}
-const TQString &KCompactDisc::trackArtist(unsigned track) const
+const TQString &TDECompactDisc::trackArtist(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return TQString();
return m_trackArtists[track - 1];
}
-unsigned KCompactDisc::trackLength() const
+unsigned TDECompactDisc::trackLength() const
{
return trackLength(m_track);
}
-unsigned KCompactDisc::trackLength(unsigned track) const
+unsigned TDECompactDisc::trackLength(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return 0;
return cd->trk[track - 1].length * 1000;
}
-unsigned KCompactDisc::trackPosition() const
+unsigned TDECompactDisc::trackPosition() const
{
return cur_pos_rel * 1000;
}
-unsigned KCompactDisc::tracks() const
+unsigned TDECompactDisc::tracks() const
{
return m_tracks;
}
-const TQString &KCompactDisc::trackTitle() const
+const TQString &TDECompactDisc::trackTitle() const
{
return trackTitle(m_track);
}
-const TQString &KCompactDisc::trackTitle(unsigned track) const
+const TQString &TDECompactDisc::trackTitle(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return TQString();
return m_trackTitles[track - 1];
}
-bool KCompactDisc::isAudio(unsigned track) const
+bool TDECompactDisc::isAudio(unsigned track) const
{
if (NO_DISC || !TRACK_VALID(track))
return 0;
@@ -374,7 +374,7 @@ bool KCompactDisc::isAudio(unsigned track) const
* - Data discs not recognized as data discs.
*
*/
-void KCompactDisc::timerExpired()
+void TDECompactDisc::timerExpired()
{
m_status = wm_cd_status();