summaryrefslogtreecommitdiffstats
path: root/kioslave/audiocd/audiocd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/audiocd/audiocd.cpp')
-rw-r--r--kioslave/audiocd/audiocd.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/kioslave/audiocd/audiocd.cpp b/kioslave/audiocd/audiocd.cpp
index 51e4d6c1..7898be5a 100644
--- a/kioslave/audiocd/audiocd.cpp
+++ b/kioslave/audiocd/audiocd.cpp
@@ -56,7 +56,7 @@ extern "C"
#include <client.h>
#include "kcompactdisc.h"
-using namespace KIO;
+using namespace TDEIO;
using namespace KCDDB;
#define TQFL1(x) TQString::fromLatin1(x)
@@ -197,7 +197,7 @@ struct cdrom_drive * AudioCDProtocol::initRequest(const KURL & url)
{
if (url.hasHost())
{
- error(KIO::ERR_UNSUPPORTED_ACTION,
+ error(TDEIO::ERR_UNSUPPORTED_ACTION,
i18n("You cannot specify a host with this protocol. "
"Please use the audiocd:/ format instead."));
return 0;
@@ -426,7 +426,7 @@ void AudioCDProtocol::get(const KURL & url)
found = true;
}
if( !found )
- error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.path());
cdda_close(drive);
return;
}
@@ -434,7 +434,7 @@ void AudioCDProtocol::get(const KURL & url)
long firstSector, lastSector;
if (!getSectorsForRequest(drive, firstSector, lastSector))
{
- error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.path());
cdda_close(drive);
return;
}
@@ -495,7 +495,7 @@ void AudioCDProtocol::stat(const KURL & url)
// does this track exist?
if (isFile && (trackNumber < 1 || trackNumber > d->tracks))
{
- error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.path());
return;
}
}
@@ -503,23 +503,23 @@ void AudioCDProtocol::stat(const KURL & url)
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName().replace('/', TQFL1("%2F"));
kdDebug(7117) << k_funcinfo << atom.m_str << endl;
entry.append(atom);
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = isFile ? S_IFREG : S_IFDIR;
entry.append(atom);
const mode_t _umask = ::umask(0);
::umask(_umask);
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = 0666 & (~_umask);
entry.append(atom);
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
if (!isFile)
{
atom.m_long = cdda_tracks(drive);
@@ -560,20 +560,20 @@ static void app_entry(UDSEntry& e, unsigned int uds, long l)
static void app_dir(UDSEntry& e, const TQString & n, size_t s)
{
e.clear();
- app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit()));
- app_entry(e, KIO::UDS_FILE_TYPE, S_IFDIR);
- app_entry(e, KIO::UDS_ACCESS, 0400);
- app_entry(e, KIO::UDS_SIZE, s);
- app_entry(e, KIO::UDS_MIME_TYPE, "inode/directory");
+ app_entry(e, TDEIO::UDS_NAME, TQFile::decodeName(n.local8Bit()));
+ app_entry(e, TDEIO::UDS_FILE_TYPE, S_IFDIR);
+ app_entry(e, TDEIO::UDS_ACCESS, 0400);
+ app_entry(e, TDEIO::UDS_SIZE, s);
+ app_entry(e, TDEIO::UDS_MIME_TYPE, "inode/directory");
}
static void app_file(UDSEntry& e, const TQString & n, size_t s)
{
e.clear();
- app_entry(e, KIO::UDS_NAME, TQFile::decodeName(n.local8Bit()));
- app_entry(e, KIO::UDS_FILE_TYPE, S_IFREG);
- app_entry(e, KIO::UDS_ACCESS, 0400);
- app_entry(e, KIO::UDS_SIZE, s);
+ app_entry(e, TDEIO::UDS_NAME, TQFile::decodeName(n.local8Bit()));
+ app_entry(e, TDEIO::UDS_FILE_TYPE, S_IFREG);
+ app_entry(e, TDEIO::UDS_ACCESS, 0400);
+ app_entry(e, TDEIO::UDS_SIZE, s);
}
void AudioCDProtocol::listDir(const KURL & url)
@@ -585,13 +585,13 @@ void AudioCDProtocol::listDir(const KURL & url)
return;
if (d->which_dir == Unknown){
- error(KIO::ERR_DOES_NOT_EXIST, url.path());
+ error(TDEIO::ERR_DOES_NOT_EXIST, url.path());
cdda_close(drive);
return;
}
if ( !d->fname.isEmpty() ){
- error(KIO::ERR_IS_FILE, url.path());
+ error(TDEIO::ERR_IS_FILE, url.path());
cdda_close(drive);
return;
}
@@ -681,7 +681,7 @@ void AudioCDProtocol::listDir(const KURL & url)
case Info:
case Unknown:
default:
- error(KIO::ERR_INTERNAL, url.path());
+ error(TDEIO::ERR_INTERNAL, url.path());
cdda_close(drive);
return;
}
@@ -752,12 +752,12 @@ struct cdrom_drive *AudioCDProtocol::getDrive()
TQFileInfo fi(d->device);
if(!fi.isReadable())
- error(KIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have read permissions for this account. Check the read permissions on the device."));
+ error(TDEIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have read permissions for this account. Check the read permissions on the device."));
else if(!fi.isWritable())
- error(KIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have write permissions for this account. Check the write permissions on the device."));
+ error(TDEIO::ERR_SLAVE_DEFINED, i18n("Device doesn't have write permissions for this account. Check the write permissions on the device."));
else if(!fi.exists())
- error(KIO::ERR_DOES_NOT_EXIST, d->device);
- else error(KIO::ERR_SLAVE_DEFINED,
+ error(TDEIO::ERR_DOES_NOT_EXIST, d->device);
+ else error(TDEIO::ERR_SLAVE_DEFINED,
i18n("Unknown error. If you have a cd in the drive try running cdparanoia -vsQ as yourself (not root). Do you see a track list? If not, make sure you have permission to access the CD device. If you are using SCSI emulation (possible if you have an IDE CD writer) then make sure you check that you have read and write permissions on the generic SCSI device, which is probably /dev/sg0, /dev/sg1, etc.. If it still does not work, try typing audiocd:/?device=/dev/sg0 (or similar) to tell kio_audiocd which device your CD-ROM is."));
return 0;
}
@@ -765,7 +765,7 @@ i18n("Unknown error. If you have a cd in the drive try running cdparanoia -vsQ
if (0 != cdda_open(drive))
{
kdDebug(7117) << "cdda_open failed" << endl;
- error(KIO::ERR_CANNOT_OPEN_FOR_READING, d->device);
+ error(TDEIO::ERR_CANNOT_OPEN_FOR_READING, d->device);
cdda_close(drive);
return 0;
}
@@ -984,7 +984,7 @@ void AudioCDProtocol::parseURLArgs(const KURL & url)
*/
void AudioCDProtocol::loadSettings()
{
- KConfig *config = new KConfig(TQFL1("kcmaudiocdrc"), true /*readonly*/, false /*no kdeglobals*/);
+ TDEConfig *config = new TDEConfig(TQFL1("kcmaudiocdrc"), true /*readonly*/, false /*no kdeglobals*/);
config->setGroup(TQFL1("CDDA"));
@@ -1019,7 +1019,7 @@ void AudioCDProtocol::loadSettings()
d->rreplace = config->readEntry("regexp_replace");
// if the regular expressions are enclosed in qoutes. remove them
// otherwise it is not possible to search for a space " ", since an empty (only spaces) value is not
- // supported by KConfig, so the space has to be qouted, but then here the regexp searches really for " "
+ // supported by TDEConfig, so the space has to be qouted, but then here the regexp searches really for " "
// instead of just the space. Alex
TQRegExp qoutedString("^\".*\"$");
if (qoutedString.exactMatch(d->rsearch))