@ -56,7 +56,7 @@ extern "C"
# include <client.h>
# include "kcompactdisc.h"
using namespace K IO;
using namespace TDE IO;
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 ( K IO: : ERR_UNSUPPORTED_ACTION ,
error ( TDE IO: : 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 ( K IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
error ( TDE IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
return ;
}
}
@ -503,23 +503,23 @@ void AudioCDProtocol::stat(const KURL & url)
UDSEntry entry ;
UDSAtom atom ;
atom . m_uds = K IO: : UDS_NAME ;
atom . m_uds = TDE IO: : UDS_NAME ;
atom . m_str = url . fileName ( ) . replace ( ' / ' , TQFL1 ( " %2F " ) ) ;
kdDebug ( 7117 ) < < k_funcinfo < < atom . m_str < < endl ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_FILE_TYPE ;
atom . m_uds = TDE IO: : 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 = K IO: : UDS_ACCESS ;
atom . m_uds = TDE IO: : UDS_ACCESS ;
atom . m_long = 0666 & ( ~ _umask ) ;
entry . append ( atom ) ;
atom . m_uds = K IO: : UDS_SIZE ;
atom . m_uds = TDE IO: : 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 , K IO: : UDS_NAME , TQFile : : decodeName ( n . local8Bit ( ) ) ) ;
app_entry ( e , K IO: : UDS_FILE_TYPE , S_IFDIR ) ;
app_entry ( e , K IO: : UDS_ACCESS , 0400 ) ;
app_entry ( e , K IO: : UDS_SIZE , s ) ;
app_entry ( e , K IO: : UDS_MIME_TYPE , " inode/directory " ) ;
app_entry ( e , TDE IO: : UDS_NAME , TQFile : : decodeName ( n . local8Bit ( ) ) ) ;
app_entry ( e , TDE IO: : UDS_FILE_TYPE , S_IFDIR ) ;
app_entry ( e , TDE IO: : UDS_ACCESS , 0400 ) ;
app_entry ( e , TDE IO: : UDS_SIZE , s ) ;
app_entry ( e , TDE IO: : UDS_MIME_TYPE , " inode/directory " ) ;
}
static void app_file ( UDSEntry & e , const TQString & n , size_t s )
{
e . clear ( ) ;
app_entry ( e , K IO: : UDS_NAME , TQFile : : decodeName ( n . local8Bit ( ) ) ) ;
app_entry ( e , K IO: : UDS_FILE_TYPE , S_IFREG ) ;
app_entry ( e , K IO: : UDS_ACCESS , 0400 ) ;
app_entry ( e , K IO: : UDS_SIZE , s ) ;
app_entry ( e , TDE IO: : UDS_NAME , TQFile : : decodeName ( n . local8Bit ( ) ) ) ;
app_entry ( e , TDE IO: : UDS_FILE_TYPE , S_IFREG ) ;
app_entry ( e , TDE IO: : UDS_ACCESS , 0400 ) ;
app_entry ( e , TDE IO: : 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 ( K IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
error ( TDE IO: : ERR_DOES_NOT_EXIST , url . path ( ) ) ;
cdda_close ( drive ) ;
return ;
}
if ( ! d - > fname . isEmpty ( ) ) {
error ( K IO: : ERR_IS_FILE , url . path ( ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_INTERNAL , url . path ( ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_SLAVE_DEFINED , i18n ( " Device doesn't have read permissions for this account. Check the read permissions on the device. " ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_SLAVE_DEFINED , i18n ( " Device doesn't have write permissions for this account. Check the write permissions on the device. " ) ) ;
error ( TDE IO: : 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 ( K IO: : ERR_DOES_NOT_EXIST , d - > device ) ;
else error ( K IO: : ERR_SLAVE_DEFINED ,
error ( TDE IO: : ERR_DOES_NOT_EXIST , d - > device ) ;
else error ( TDE IO: : 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 ( K IO: : ERR_CANNOT_OPEN_FOR_READING , d - > device ) ;
error ( TDE IO: : 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 K Config( TQFL1 ( " kcmaudiocdrc " ) , true /*readonly*/ , false /*no kdeglobals*/ ) ;
TDEConfig * config = new TDE Config( 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 K Config, so the space has to be qouted, but then here the regexp searches really for " "
// supported by TDE Config, 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 ) )