summaryrefslogtreecommitdiffstats
path: root/kioslave
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:35:07 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-25 00:35:07 -0600
commit703fb0c89c2eee56a1e613e67a446db9d4287929 (patch)
treedd8c5ca66075cd89c2638a2b48cf78386a9870a7 /kioslave
parent818e7abec3d5d3809b6b77293558678371c16b71 (diff)
downloadtdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.tar.gz
tdelibs-703fb0c89c2eee56a1e613e67a446db9d4287929.zip
Rename KCModule, KConfig, KIO, KServer, and KSocket to avoid conflicts with KDE4
Diffstat (limited to 'kioslave')
-rw-r--r--kioslave/file/file.cc220
-rw-r--r--kioslave/file/file.h6
-rw-r--r--kioslave/ftp/ftp.cc48
-rw-r--r--kioslave/ftp/ftp.h14
-rw-r--r--kioslave/http/http.cc62
-rw-r--r--kioslave/http/http.h24
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.cpp6
-rw-r--r--kioslave/http/kcookiejar/kcookiejar.h6
-rw-r--r--kioslave/http/kcookiejar/kcookieserver.cpp2
-rw-r--r--kioslave/http/kcookiejar/kcookieserver.h4
-rw-r--r--kioslave/http/kcookiejar/tests/kcookiejartest.cpp4
-rw-r--r--kioslave/iso/iso.cpp26
-rw-r--r--kioslave/iso/iso.h4
-rw-r--r--kioslave/iso/kiso.cpp4
-rw-r--r--kioslave/metainfo/metainfo.cpp2
-rw-r--r--kioslave/metainfo/metainfo.h2
16 files changed, 217 insertions, 217 deletions
diff --git a/kioslave/file/file.cc b/kioslave/file/file.cc
index 9b906ffb5..73a037b91 100644
--- a/kioslave/file/file.cc
+++ b/kioslave/file/file.cc
@@ -96,7 +96,7 @@
#include <kglobal.h>
#include <kmimetype.h>
-using namespace KIO;
+using namespace TDEIO;
#define MAX_IPC_SIZE (1024*32)
@@ -192,16 +192,16 @@ void FileProtocol::chmod( const KURL& url, int permissions )
switch (errno) {
case EPERM:
case EACCES:
- error( KIO::ERR_ACCESS_DENIED, url.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.path() );
break;
case ENOTSUP:
- error( KIO::ERR_UNSUPPORTED_ACTION, url.path() );
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, url.path() );
break;
case ENOSPC:
- error( KIO::ERR_DISK_FULL, url.path() );
+ error( TDEIO::ERR_DISK_FULL, url.path() );
break;
default:
- error( KIO::ERR_CANNOT_CHMOD, url.path() );
+ error( TDEIO::ERR_CANNOT_CHMOD, url.path() );
}
} else
finished();
@@ -217,13 +217,13 @@ void FileProtocol::mkdir( const KURL& url, int permissions )
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
if ( ::mkdir( _path.data(), 0777 /*umask will be applied*/ ) != 0 ) {
if ( errno == EACCES ) {
- error( KIO::ERR_ACCESS_DENIED, url.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.path() );
return;
} else if ( errno == ENOSPC ) {
- error( KIO::ERR_DISK_FULL, url.path() );
+ error( TDEIO::ERR_DISK_FULL, url.path() );
return;
} else {
- error( KIO::ERR_COULD_NOT_MKDIR, url.path() );
+ error( TDEIO::ERR_COULD_NOT_MKDIR, url.path() );
return;
}
} else {
@@ -237,10 +237,10 @@ void FileProtocol::mkdir( const KURL& url, int permissions )
if ( S_ISDIR( buff.st_mode ) ) {
kdDebug(7101) << "ERR_DIR_ALREADY_EXIST" << endl;
- error( KIO::ERR_DIR_ALREADY_EXIST, url.path() );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, url.path() );
return;
}
- error( KIO::ERR_FILE_ALREADY_EXIST, url.path() );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, url.path() );
return;
}
@@ -258,24 +258,24 @@ void FileProtocol::get( const KURL& url )
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, url.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, url.path() );
else
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
if ( S_ISDIR( buff.st_mode ) ) {
- error( KIO::ERR_IS_DIRECTORY, url.path() );
+ error( TDEIO::ERR_IS_DIRECTORY, url.path() );
return;
}
if ( !S_ISREG( buff.st_mode ) ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
return;
}
int fd = KDE_open( _path.data(), O_RDONLY);
if ( fd < 0 ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.path() );
return;
}
@@ -288,20 +288,20 @@ void FileProtocol::get( const KURL& url )
KMimeType::Ptr mt = KMimeType::findByURL( url, buff.st_mode, true /* local URL */ );
emit mimeType( mt->name() );
- KIO::filesize_t processed_size = 0;
+ TDEIO::filesize_t processed_size = 0;
TQString resumeOffset = metaData("resume");
if ( !resumeOffset.isEmpty() )
{
bool ok;
- KIO::fileoffset_t offset = resumeOffset.toLongLong(&ok);
+ TDEIO::fileoffset_t offset = resumeOffset.toLongLong(&ok);
if (ok && (offset > 0) && (offset < buff.st_size))
{
if (KDE_lseek(fd, offset, SEEK_SET) == offset)
{
canResume ();
processed_size = offset;
- kdDebug( 7101 ) << "Resume offset: " << KIO::number(offset) << endl;
+ kdDebug( 7101 ) << "Resume offset: " << TDEIO::number(offset) << endl;
}
}
}
@@ -318,7 +318,7 @@ void FileProtocol::get( const KURL& url )
{
if (errno == EINTR)
continue;
- error( KIO::ERR_COULD_NOT_READ, url.path());
+ error( TDEIO::ERR_COULD_NOT_READ, url.path());
close(fd);
return;
}
@@ -332,7 +332,7 @@ void FileProtocol::get( const KURL& url )
processed_size += n;
processedSize( processed_size );
- //kdDebug( 7101 ) << "Processed: " << KIO::number (processed_size) << endl;
+ //kdDebug( 7101 ) << "Processed: " << TDEIO::number (processed_size) << endl;
}
data( TQByteArray() );
@@ -395,7 +395,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
if (bPartExists && !_resume && !_overwrite && buff_part.st_size > 0 && S_ISREG(buff_part.st_mode))
{
kdDebug(7101) << "FileProtocol::put : calling canResume with "
- << KIO::number(buff_part.st_size) << endl;
+ << TDEIO::number(buff_part.st_size) << endl;
// Maybe we can use this partial file for resuming
// Tell about the size we have, and the app will tell us
@@ -409,9 +409,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
if ( bOrigExists && !_overwrite && !_resume)
{
if (S_ISDIR(buff_orig.st_mode))
- error( KIO::ERR_DIR_ALREADY_EXIST, dest_orig );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dest_orig );
else
- error( KIO::ERR_FILE_ALREADY_EXIST, dest_orig );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dest_orig );
return;
}
@@ -479,9 +479,9 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
kdDebug(7101) << "####################### COULD NOT WRITE " << dest << " _mode=" << _mode << endl;
kdDebug(7101) << "errno==" << errno << "(" << strerror(errno) << ")" << endl;
if ( errno == EACCES )
- error( KIO::ERR_WRITE_ACCESS_DENIED, dest );
+ error( TDEIO::ERR_WRITE_ACCESS_DENIED, dest );
else
- error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, dest );
return;
}
}
@@ -490,13 +490,13 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
{
if ( errno == ENOSPC ) // disk full
{
- error( KIO::ERR_DISK_FULL, dest_orig);
+ error( TDEIO::ERR_DISK_FULL, dest_orig);
result = -2; // means: remove dest file
}
else
{
kdWarning(7101) << "Couldn't write. Error:" << strerror(errno) << endl;
- error( KIO::ERR_COULD_NOT_WRITE, dest_orig);
+ error( TDEIO::ERR_COULD_NOT_WRITE, dest_orig);
result = -1;
}
}
@@ -534,7 +534,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
if ( close(fd) )
{
kdWarning(7101) << "Error when closing file descriptor:" << strerror(errno) << endl;
- error( KIO::ERR_COULD_NOT_WRITE, dest_orig);
+ error( TDEIO::ERR_COULD_NOT_WRITE, dest_orig);
return;
}
@@ -550,7 +550,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
if ( ::rename( _dest.data(), _dest_orig.data() ) )
{
kdWarning(7101) << " Couldn't rename " << _dest << " to " << _dest_orig << endl;
- error( KIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig );
+ error( TDEIO::ERR_CANNOT_RENAME_PARTIAL, dest_orig );
return;
}
}
@@ -561,7 +561,7 @@ void FileProtocol::put( const KURL& url, int _mode, bool _overwrite, bool _resum
if (::chmod(_dest_orig.data(), _mode) != 0)
{
// couldn't chmod. Eat the error if the filesystem apparently doesn't support it.
- if ( KIO::testFileSystemFlag( _dest_orig, KIO::SupportsChmod ) )
+ if ( TDEIO::testFileSystemFlag( _dest_orig, TDEIO::SupportsChmod ) )
warning( i18n( "Could not change permissions for\n%1" ).arg( dest_orig ) );
}
}
@@ -602,18 +602,18 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
if ( KDE_stat( _src.data(), &buff_src ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, src.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, src.path() );
else
- error( KIO::ERR_DOES_NOT_EXIST, src.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, src.path() );
return;
}
if ( S_ISDIR( buff_src.st_mode ) ) {
- error( KIO::ERR_IS_DIRECTORY, src.path() );
+ error( TDEIO::ERR_IS_DIRECTORY, src.path() );
return;
}
if ( S_ISFIFO( buff_src.st_mode ) || S_ISSOCK ( buff_src.st_mode ) ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, src.path() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, src.path() );
return;
}
@@ -623,19 +623,19 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
{
if (S_ISDIR(buff_dest.st_mode))
{
- error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() );
return;
}
if ( same_inode( buff_dest, buff_src) )
{
- error( KIO::ERR_IDENTICAL_FILES, dest.path() );
+ error( TDEIO::ERR_IDENTICAL_FILES, dest.path() );
return;
}
if (!_overwrite)
{
- error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() );
return;
}
@@ -651,7 +651,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
int src_fd = KDE_open( _src.data(), O_RDONLY);
if ( src_fd < 0 ) {
- error( KIO::ERR_CANNOT_OPEN_FOR_READING, src.path() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, src.path() );
return;
}
@@ -670,9 +670,9 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
if ( dest_fd < 0 ) {
kdDebug(7101) << "###### COULD NOT WRITE " << dest.url() << endl;
if ( errno == EACCES ) {
- error( KIO::ERR_WRITE_ACCESS_DENIED, dest.path() );
+ error( TDEIO::ERR_WRITE_ACCESS_DENIED, dest.path() );
} else {
- error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, dest.path() );
+ error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, dest.path() );
}
close(src_fd);
return;
@@ -692,7 +692,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
#endif
totalSize( buff_src.st_size );
- KIO::filesize_t processed_size = 0;
+ TDEIO::filesize_t processed_size = 0;
char buffer[ MAX_IPC_SIZE ];
int n;
#ifdef USE_SENDFILE
@@ -723,17 +723,17 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
kdDebug(7101) << "sendfile() error:" << strerror(errno) << endl;
if ( errno == ENOSPC ) // disk full
{
- error( KIO::ERR_DISK_FULL, dest.path());
+ error( TDEIO::ERR_DISK_FULL, dest.path());
remove( _dest.data() );
}
else {
- error( KIO::ERR_SLAVE_DEFINED,
+ error( TDEIO::ERR_SLAVE_DEFINED,
i18n("Cannot copy file from %1 to %2. (Errno: %3)")
.arg( src.path() ).arg( dest.path() ).arg( errno ) );
}
} else
#endif
- error( KIO::ERR_COULD_NOT_READ, src.path());
+ error( TDEIO::ERR_COULD_NOT_READ, src.path());
close(src_fd);
close(dest_fd);
#ifdef USE_POSIX_ACL
@@ -753,13 +753,13 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
if ( errno == ENOSPC ) // disk full
{
- error( KIO::ERR_DISK_FULL, dest.path());
+ error( TDEIO::ERR_DISK_FULL, dest.path());
remove( _dest.data() );
}
else
{
kdWarning(7101) << "Couldn't write[2]. Error:" << strerror(errno) << endl;
- error( KIO::ERR_COULD_NOT_WRITE, dest.path());
+ error( TDEIO::ERR_COULD_NOT_WRITE, dest.path());
}
#ifdef USE_POSIX_ACL
if (acl) acl_free(acl);
@@ -778,7 +778,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
if (close( dest_fd))
{
kdWarning(7101) << "Error when closing file descriptor[2]:" << strerror(errno) << endl;
- error( KIO::ERR_COULD_NOT_WRITE, dest.path());
+ error( TDEIO::ERR_COULD_NOT_WRITE, dest.path());
#ifdef USE_POSIX_ACL
if (acl) acl_free(acl);
#endif
@@ -795,7 +795,7 @@ void FileProtocol::copy( const KURL &src, const KURL &dest,
)
{
// Eat the error if the filesystem apparently doesn't support chmod.
- if ( KIO::testFileSystemFlag( _dest, KIO::SupportsChmod ) )
+ if ( TDEIO::testFileSystemFlag( _dest, TDEIO::SupportsChmod ) )
warning( i18n( "Could not change permissions for\n%1" ).arg( dest.path() ) );
}
}
@@ -824,9 +824,9 @@ void FileProtocol::rename( const KURL &src, const KURL &dest,
KDE_struct_stat buff_src;
if ( KDE_lstat( _src.data(), &buff_src ) == -1 ) {
if ( errno == EACCES )
- error( KIO::ERR_ACCESS_DENIED, src.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, src.path() );
else
- error( KIO::ERR_DOES_NOT_EXIST, src.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, src.path() );
return;
}
@@ -836,19 +836,19 @@ void FileProtocol::rename( const KURL &src, const KURL &dest,
{
if (S_ISDIR(buff_dest.st_mode))
{
- error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() );
return;
}
if ( same_inode( buff_dest, buff_src) )
{
- error( KIO::ERR_IDENTICAL_FILES, dest.path() );
+ error( TDEIO::ERR_IDENTICAL_FILES, dest.path() );
return;
}
if (!_overwrite)
{
- error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() );
return;
}
}
@@ -856,16 +856,16 @@ void FileProtocol::rename( const KURL &src, const KURL &dest,
if ( ::rename( _src.data(), _dest.data()))
{
if (( errno == EACCES ) || (errno == EPERM)) {
- error( KIO::ERR_ACCESS_DENIED, dest.path() );
+ error( TDEIO::ERR_ACCESS_DENIED, dest.path() );
}
else if (errno == EXDEV) {
- error( KIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename"));
+ error( TDEIO::ERR_UNSUPPORTED_ACTION, TQString::fromLatin1("rename"));
}
else if (errno == EROFS) { // The file is on a read-only filesystem
- error( KIO::ERR_CANNOT_DELETE, src.path() );
+ error( TDEIO::ERR_CANNOT_DELETE, src.path() );
}
else {
- error( KIO::ERR_CANNOT_RENAME, src.path() );
+ error( TDEIO::ERR_CANNOT_RENAME, src.path() );
}
return;
}
@@ -886,7 +886,7 @@ void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overw
// Try to delete the destination
if ( unlink( TQFile::encodeName( dest.path() ) ) != 0 )
{
- error( KIO::ERR_CANNOT_DELETE, dest.path() );
+ error( TDEIO::ERR_CANNOT_DELETE, dest.path() );
return;
}
// Try again - this won't loop forever since unlink succeeded
@@ -897,16 +897,16 @@ void FileProtocol::symlink( const TQString &target, const KURL &dest, bool overw
KDE_struct_stat buff_dest;
KDE_lstat( TQFile::encodeName( dest.path() ), &buff_dest );
if (S_ISDIR(buff_dest.st_mode))
- error( KIO::ERR_DIR_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_DIR_ALREADY_EXIST, dest.path() );
else
- error( KIO::ERR_FILE_ALREADY_EXIST, dest.path() );
+ error( TDEIO::ERR_FILE_ALREADY_EXIST, dest.path() );
return;
}
}
else
{
// Some error occurred while we tried to symlink
- error( KIO::ERR_CANNOT_SYMLINK, dest.path() );
+ error( TDEIO::ERR_CANNOT_SYMLINK, dest.path() );
return;
}
}
@@ -927,11 +927,11 @@ void FileProtocol::del( const KURL& url, bool isfile)
if ( unlink( _path.data() ) == -1 ) {
if ((errno == EACCES) || (errno == EPERM))
- error( KIO::ERR_ACCESS_DENIED, url.path());
+ error( TDEIO::ERR_ACCESS_DENIED, url.path());
else if (errno == EISDIR)
- error( KIO::ERR_IS_DIRECTORY, url.path());
+ error( TDEIO::ERR_IS_DIRECTORY, url.path());
else
- error( KIO::ERR_CANNOT_DELETE, url.path() );
+ error( TDEIO::ERR_CANNOT_DELETE, url.path() );
return;
}
} else {
@@ -944,10 +944,10 @@ void FileProtocol::del( const KURL& url, bool isfile)
if ( ::rmdir( _path.data() ) == -1 ) {
if ((errno == EACCES) || (errno == EPERM))
- error( KIO::ERR_ACCESS_DENIED, url.path());
+ error( TDEIO::ERR_ACCESS_DENIED, url.path());
else {
kdDebug( 7101 ) << "could not rmdir " << perror << endl;
- error( KIO::ERR_COULD_NOT_RMDIR, url.path() );
+ error( TDEIO::ERR_COULD_NOT_RMDIR, url.path() );
return;
}
}
@@ -1001,7 +1001,7 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString &
// because there's no real performance penalty in kio_file for returning the complete
// details. Please consider doing it in your kioslave if you're using this one as a model :)
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = filename;
entry.append( atom );
@@ -1019,7 +1019,7 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString &
buffer2[ n ] = 0;
}
- atom.m_uds = KIO::UDS_LINK_DEST;
+ atom.m_uds = TDEIO::UDS_LINK_DEST;
atom.m_str = TQFile::decodeName( buffer2 );
entry.append( atom );
@@ -1029,15 +1029,15 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString &
type = S_IFMT - 1;
access = S_IRWXU | S_IRWXG | S_IRWXO;
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = type;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = access;
entry.append( atom );
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = 0L;
entry.append( atom );
@@ -1053,15 +1053,15 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString &
type = buff.st_mode & S_IFMT; // extract file type
access = buff.st_mode & 07777; // extract permissions
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = type;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = access;
entry.append( atom );
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = buff.st_size;
entry.append( atom );
@@ -1073,19 +1073,19 @@ bool FileProtocol::createUDSEntry( const TQString & filename, const TQCString &
#endif
notype:
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = buff.st_mtime;
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
atom.m_str = getUserName( buff.st_uid );
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
atom.m_str = getGroupName( buff.st_gid );
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS_TIME;
+ atom.m_uds = TDEIO::UDS_ACCESS_TIME;
atom.m_long = buff.st_atime;
entry.append( atom );
@@ -1123,40 +1123,40 @@ void FileProtocol::stat( const KURL & url )
UDSEntry entry;
if ( !createUDSEntry( url.fileName(), _path, entry, details, true /*with acls*/ ) )
{
- error( KIO::ERR_DOES_NOT_EXIST, url.path(-1) );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path(-1) );
return;
}
#if 0
///////// debug code
- KIO::UDSEntry::ConstIterator it = entry.begin();
+ TDEIO::UDSEntry::ConstIterator it = entry.begin();
for( ; it != entry.end(); it++ ) {
switch ((*it).m_uds) {
- case KIO::UDS_FILE_TYPE:
+ case TDEIO::UDS_FILE_TYPE:
kdDebug(7101) << "File Type : " << (mode_t)((*it).m_long) << endl;
break;
- case KIO::UDS_ACCESS:
+ case TDEIO::UDS_ACCESS:
kdDebug(7101) << "Access permissions : " << (mode_t)((*it).m_long) << endl;
break;
- case KIO::UDS_USER:
+ case TDEIO::UDS_USER:
kdDebug(7101) << "User : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_GROUP:
+ case TDEIO::UDS_GROUP:
kdDebug(7101) << "Group : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_NAME:
+ case TDEIO::UDS_NAME:
kdDebug(7101) << "Name : " << ((*it).m_str.ascii() ) << endl;
//m_strText = decodeFileName( (*it).m_str );
break;
- case KIO::UDS_URL:
+ case TDEIO::UDS_URL:
kdDebug(7101) << "URL : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_MIME_TYPE:
+ case TDEIO::UDS_MIME_TYPE:
kdDebug(7101) << "MimeType : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_LINK_DEST:
+ case TDEIO::UDS_LINK_DEST:
kdDebug(7101) << "LinkDest : " << ((*it).m_str.ascii() ) << endl;
break;
- case KIO::UDS_EXTENDED_ACL:
+ case TDEIO::UDS_EXTENDED_ACL:
kdDebug(7101) << "Contains extended ACL " << endl;
break;
}
@@ -1188,12 +1188,12 @@ void FileProtocol::listDir( const KURL& url)
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
if ( !S_ISDIR( buff.st_mode ) ) {
- error( KIO::ERR_IS_FILE, url.path() );
+ error( TDEIO::ERR_IS_FILE, url.path() );
return;
}
@@ -1211,7 +1211,7 @@ void FileProtocol::listDir( const KURL& url)
break;
#endif
default:
- error( KIO::ERR_CANNOT_ENTER_DIRECTORY, url.path() );
+ error( TDEIO::ERR_CANNOT_ENTER_DIRECTORY, url.path() );
break;
}
return;
@@ -1280,7 +1280,7 @@ void FileProtocol::testDir( const TQString& path )
TQCString _path( TQFile::encodeName(path));
KDE_struct_stat buff;
if ( KDE_stat( _path.data(), &buff ) == -1 ) {
- error( KIO::ERR_DOES_NOT_EXIST, path );
+ error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
@@ -1335,12 +1335,12 @@ void FileProtocol::special( const TQByteArray &data)
TQString filename;
stream >> filename;
KShred shred( filename );
- connect( &shred, TQT_SIGNAL( processedSize( KIO::filesize_t ) ),
- this, TQT_SLOT( slotProcessedSize( KIO::filesize_t ) ) );
+ connect( &shred, TQT_SIGNAL( processedSize( TDEIO::filesize_t ) ),
+ this, TQT_SLOT( slotProcessedSize( TDEIO::filesize_t ) ) );
connect( &shred, TQT_SIGNAL( infoMessage( const TQString & ) ),
this, TQT_SLOT( slotInfoMessage( const TQString & ) ) );
if (!shred.shred())
- error( KIO::ERR_CANNOT_DELETE, filename );
+ error( TDEIO::ERR_CANNOT_DELETE, filename );
else
finished();
break;
@@ -1351,7 +1351,7 @@ void FileProtocol::special( const TQByteArray &data)
}
// Connected to KShred
-void FileProtocol::slotProcessedSize( KIO::filesize_t bytes )
+void FileProtocol::slotProcessedSize( TDEIO::filesize_t bytes )
{
kdDebug(7101) << "FileProtocol::slotProcessedSize (" << (unsigned int) bytes << ")" << endl;
processedSize( bytes );
@@ -1382,7 +1382,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
kdDebug(7101) << "VOLMGT: no media in "
<< devname.data() << endl;
err = i18n("No Media inserted or Media not recognized.");
- error( KIO::ERR_COULD_NOT_MOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_MOUNT, err );
return;
} else {
kdDebug(7101) << "VOLMGT: " << devname.data()
@@ -1393,7 +1393,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
} else {
err = i18n("\"vold\" is not running.");
kdDebug(7101) << "VOLMGT: " << err << endl;
- error( KIO::ERR_COULD_NOT_MOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_MOUNT, err );
return;
}
#else
@@ -1425,7 +1425,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
path += TQString::fromLatin1(":") + epath;
TQString mountProg = TDEGlobal::dirs()->findExe("mount", path);
if (mountProg.isEmpty()){
- error( KIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\""));
+ error( TDEIO::ERR_COULD_NOT_MOUNT, i18n("Could not find program \"mount\""));
return;
}
@@ -1472,7 +1472,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
else
{
// Didn't work - or maybe we just got a warning
- TQString mp = KIO::findDeviceMountPoint( _dev );
+ TQString mp = TDEIO::findDeviceMountPoint( _dev );
// Is the device mounted ?
if ( !mp.isEmpty() && mount_ret == 0)
{
@@ -1501,7 +1501,7 @@ void FileProtocol::mount( bool _ro, const char *_fstype, const TQString& _dev, c
}
else
{
- error( KIO::ERR_COULD_NOT_MOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_MOUNT, err );
return;
}
}
@@ -1536,7 +1536,7 @@ void FileProtocol::unmount( const TQString& _point )
if( (mnttab = KDE_fopen( MNTTAB, "r" )) == NULL ) {
err = "couldn't open mnttab";
kdDebug(7101) << "VOLMGT: " << err << endl;
- error( KIO::ERR_COULD_NOT_UNMOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_UNMOUNT, err );
return;
}
@@ -1561,7 +1561,7 @@ void FileProtocol::unmount( const TQString& _point )
kdDebug(7101) << "VOLMGT: "
<< TQFile::encodeName(_point).data()
<< ": " << err << endl;
- error( KIO::ERR_COULD_NOT_UNMOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_UNMOUNT, err );
return;
}
@@ -1599,7 +1599,7 @@ void FileProtocol::unmount( const TQString& _point )
*/
err = i18n("\"vold\" is not running.");
kdDebug(7101) << "VOLMGT: " << err << endl;
- error( KIO::ERR_COULD_NOT_UNMOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_UNMOUNT, err );
return;
}
#else
@@ -1610,7 +1610,7 @@ void FileProtocol::unmount( const TQString& _point )
TQString umountProg = TDEGlobal::dirs()->findExe("umount", path);
if (umountProg.isEmpty()) {
- error( KIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\""));
+ error( TDEIO::ERR_COULD_NOT_UNMOUNT, i18n("Could not find program \"umount\""));
return;
}
buffer.sprintf( "%s %s 2>%s", umountProg.latin1(), TQFile::encodeName(TDEProcess::quote(_point)).data(), tmp );
@@ -1646,7 +1646,7 @@ void FileProtocol::unmount( const TQString& _point )
if ( err.isEmpty() )
finished();
else
- error( KIO::ERR_COULD_NOT_UNMOUNT, err );
+ error( TDEIO::ERR_COULD_NOT_UNMOUNT, err );
}
/*************************************
@@ -1805,19 +1805,19 @@ static void appendACLAtoms( const TQCString & path, UDSEntry& entry, mode_t type
if ( acl || defaultAcl ) {
kdDebug(7101) << path.data() << " has extended ACL entries " << endl;
- atom.m_uds = KIO::UDS_EXTENDED_ACL;
+ atom.m_uds = TDEIO::UDS_EXTENDED_ACL;
atom.m_long = 1;
entry.append( atom );
}
if ( withACL ) {
if ( acl ) {
- atom.m_uds = KIO::UDS_ACL_STRING;
+ atom.m_uds = TDEIO::UDS_ACL_STRING;
atom.m_str = aclAsString( acl );
entry.append( atom );
kdDebug(7101) << path.data() << "ACL: " << atom.m_str << endl;
}
if ( defaultAcl ) {
- atom.m_uds = KIO::UDS_DEFAULT_ACL_STRING;
+ atom.m_uds = TDEIO::UDS_DEFAULT_ACL_STRING;
atom.m_str = aclAsString( defaultAcl );
entry.append( atom );
kdDebug(7101) << path.data() << "DEFAULT ACL: " << atom.m_str << endl;
diff --git a/kioslave/file/file.h b/kioslave/file/file.h
index 350703da5..9f9d98995 100644
--- a/kioslave/file/file.h
+++ b/kioslave/file/file.h
@@ -40,7 +40,7 @@
// Note that this header file is installed, so think twice
// before breaking binary compatibility (read: it is forbidden :)
-class FileProtocol : public TQObject, public KIO::SlaveBase
+class FileProtocol : public TQObject, public TDEIO::SlaveBase
{
Q_OBJECT
public:
@@ -76,12 +76,12 @@ public:
bool pmount( const TQString &dev );
protected slots:
- void slotProcessedSize( KIO::filesize_t _bytes );
+ void slotProcessedSize( TDEIO::filesize_t _bytes );
void slotInfoMessage( const TQString & msg );
protected:
- bool createUDSEntry( const TQString & filename, const TQCString & path, KIO::UDSEntry & entry,
+ bool createUDSEntry( const TQString & filename, const TQCString & path, TDEIO::UDSEntry & entry,
short int details, bool withACL );
int setACL( const char *path, mode_t perm, bool _directoryDefault );
diff --git a/kioslave/ftp/ftp.cc b/kioslave/ftp/ftp.cc
index 62ff5c59c..3d29e2b65 100644
--- a/kioslave/ftp/ftp.cc
+++ b/kioslave/ftp/ftp.cc
@@ -83,7 +83,7 @@
// JPF: somebody should find a better solution for this or move this to KIO
// JPF: anyhow, in KDE 3.2.0 I found diffent MAX_IPC_SIZE definitions!
-namespace KIO {
+namespace TDEIO {
enum buffersizes
{ /**
* largest buffer size that should be used to transfer data between
@@ -131,9 +131,9 @@ namespace KIO {
}
}
-KIO::filesize_t Ftp::UnknownSize = (KIO::filesize_t)-1;
+TDEIO::filesize_t Ftp::UnknownSize = (TDEIO::filesize_t)-1;
-using namespace KIO;
+using namespace TDEIO;
extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
@@ -849,7 +849,7 @@ int Ftp::ftpOpenPASVDataConnection()
assert(m_data == NULL); // ... but no data connection
// Check that we can do PASV
- const KSocketAddress *sa = m_control->peerAddress();
+ const TDESocketAddress *sa = m_control->peerAddress();
if (sa != NULL && sa->family() != PF_INET)
return ERR_INTERNAL; // no PASV for non-PF_INET connections
@@ -910,7 +910,7 @@ int Ftp::ftpOpenEPSVDataConnection()
assert(m_control != NULL); // must have control connection socket
assert(m_data == NULL); // ... but no data connection
- const KSocketAddress *sa = m_control->peerAddress();
+ const TDESocketAddress *sa = m_control->peerAddress();
int portnum;
// we are sure sa is a KInetSocketAddress, because we asked for KExtendedSocket::inetSocket
// when we connected
@@ -1127,7 +1127,7 @@ int Ftp::ftpAcceptConnect()
}
bool Ftp::ftpOpenCommand( const char *_command, const TQString & _path, char _mode,
- int errorcode, KIO::fileoffset_t _offset )
+ int errorcode, TDEIO::fileoffset_t _offset )
{
int errCode = 0;
if( !ftpDataMode(_mode) )
@@ -1428,15 +1428,15 @@ void Ftp::ftpShortStatAnswer( const TQString& filename, bool isDir )
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = filename;
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = isDir ? S_IFDIR : S_IFREG;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
@@ -1484,22 +1484,22 @@ void Ftp::stat( const KURL &url)
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = TQString::null;
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
- atom.m_uds = KIO::UDS_USER;
+ atom.m_uds = TDEIO::UDS_USER;
atom.m_str = "root";
entry.append( atom );
- atom.m_uds = KIO::UDS_GROUP;
+ atom.m_uds = TDEIO::UDS_GROUP;
entry.append( atom );
// no size
@@ -1551,15 +1551,15 @@ void Ftp::stat( const KURL &url)
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = filename;
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFDIR;
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH | S_IXOTH;
entry.append( atom );
@@ -1987,7 +1987,7 @@ void Ftp::get( const KURL & url )
ftpCloseCommand(); // must close command!
}
-Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t llOffset)
+Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, TDEIO::fileoffset_t llOffset)
{
// Calls error() by itself!
if( !ftpOpenConnection(loginImplicit) )
@@ -2028,12 +2028,12 @@ Ftp::StatusCode Ftp::ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fi
if (!m_size) m_size = UnknownSize;
}
- KIO::filesize_t bytesLeft = 0;
+ TDEIO::filesize_t bytesLeft = 0;
if ( m_size != UnknownSize )
bytesLeft = m_size - llOffset;
kdDebug(7102) << "ftpGet: starting with offset=" << llOffset << endl;
- KIO::fileoffset_t processed_size = llOffset;
+ TDEIO::fileoffset_t processed_size = llOffset;
TQByteArray array;
bool mimetypeEmitted = false;
@@ -2137,7 +2137,7 @@ void Ftp::mimetype( const KURL& url )
}
char buffer[ 2048 ];
TQByteArray array;
- // Get one chunk of data only and send it, KIO::Job will determine the
+ // Get one chunk of data only and send it, TDEIO::Job will determine the
// mimetype from it using KMimeMagic
int n = m_data->read( buffer, 2048 );
array.setRawData(buffer, n);
@@ -2284,7 +2284,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
} else
dest = dest_orig;
- KIO::fileoffset_t offset = 0;
+ TDEIO::fileoffset_t offset = 0;
// set the mode according to offset
if( resume && m_size > 0 )
@@ -2304,7 +2304,7 @@ Ftp::StatusCode Ftp::ftpPut(int& iError, int iCopyFile, const KURL& dest_url,
return statusServerError;
kdDebug(7102) << "ftpPut: starting with offset=" << offset << endl;
- KIO::fileoffset_t processed_size = offset;
+ TDEIO::fileoffset_t processed_size = offset;
TQByteArray buffer;
int result;
@@ -2621,7 +2621,7 @@ Ftp::StatusCode Ftp::ftpCopyGet(int& iError, int& iCopyFile, const TQString sCop
initialMode = 0666;
// open the output file ...
- KIO::fileoffset_t hCopyOffset = 0;
+ TDEIO::fileoffset_t hCopyOffset = 0;
if(bResume)
{
iCopyFile = KDE_open( sPart.data(), O_RDWR ); // append if resuming
diff --git a/kioslave/ftp/ftp.h b/kioslave/ftp/ftp.h
index 44f0bdc71..8a847e6da 100644
--- a/kioslave/ftp/ftp.h
+++ b/kioslave/ftp/ftp.h
@@ -43,7 +43,7 @@ struct FtpEntry
TQString group;
TQString link;
- KIO::filesize_t size;
+ TDEIO::filesize_t size;
mode_t type;
mode_t access;
time_t date;
@@ -233,7 +233,7 @@ private:
//===============================================================================
// Ftp
//===============================================================================
-class Ftp : public KIO::SlaveBase
+class Ftp : public TDEIO::SlaveBase
{
// Ftp() {}
@@ -369,7 +369,7 @@ private:
* @return true if the command was accepted by the server.
*/
bool ftpOpenCommand( const char *command, const TQString & path, char mode,
- int errorcode, KIO::fileoffset_t offset = 0 );
+ int errorcode, TDEIO::fileoffset_t offset = 0 );
/**
* The counterpart to openCommand.
@@ -436,7 +436,7 @@ private:
/**
* Helper to fill an UDSEntry
*/
- void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, KIO::UDSEntry& entry, bool isDir );
+ void ftpCreateUDSEntry( const TQString & filename, FtpEntry& ftpEnt, TDEIO::UDSEntry& entry, bool isDir );
void ftpShortStatAnswer( const TQString& filename, bool isDir );
@@ -482,7 +482,7 @@ private:
* @param hCopyOffset local file only: non-zero for resume
* @return 0 for success, -1 for server error, -2 for client error
*/
- StatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, KIO::fileoffset_t hCopyOffset);
+ StatusCode ftpGet(int& iError, int iCopyFile, const KURL& url, TDEIO::fileoffset_t hCopyOffset);
/**
* This is the internal implementation of put() - see copy().
@@ -575,8 +575,8 @@ private: // data members
bool m_bPasv;
bool m_bUseProxy;
- KIO::filesize_t m_size;
- static KIO::filesize_t UnknownSize;
+ TDEIO::filesize_t m_size;
+ static TDEIO::filesize_t UnknownSize;
enum
{
diff --git a/kioslave/http/http.cc b/kioslave/http/http.cc
index f6e714988..cbff13fdf 100644
--- a/kioslave/http/http.cc
+++ b/kioslave/http/http.cc
@@ -90,7 +90,7 @@
#include <misc/kntlm/kntlm.h>
-using namespace KIO;
+using namespace TDEIO;
extern "C" {
KDE_EXPORT int kdemain(int argc, char **argv);
@@ -185,7 +185,7 @@ static TQString sanitizeCustomHTTPHeader(const TQString& _header)
}
-#define NO_SIZE ((KIO::filesize_t) -1)
+#define NO_SIZE ((TDEIO::filesize_t) -1)
#ifdef HAVE_STRTOLL
#define STRTOLL strtoll
@@ -465,7 +465,7 @@ bool HTTPProtocol::checkRequestURL( const KURL& u )
if (m_request.hostname.isEmpty())
{
- error( KIO::ERR_UNKNOWN_HOST, i18n("No host specified."));
+ error( TDEIO::ERR_UNKNOWN_HOST, i18n("No host specified."));
return false;
}
@@ -619,15 +619,15 @@ void HTTPProtocol::stat(const KURL& url)
// When downloading we assume it exists
UDSEntry entry;
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName();
entry.append( atom );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = S_IFREG; // a file
entry.append( atom );
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = S_IRUSR | S_IRGRP | S_IROTH; // readable by everybody
entry.append( atom );
@@ -762,7 +762,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
KURL thisURL ( urlStr, encoding );
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
if ( thisURL.isValid() ) {
// don't list the base dir of a listDir()
@@ -811,7 +811,7 @@ void HTTPProtocol::davStatList( const KURL& url, bool stat )
}
}
-void HTTPProtocol::davGeneric( const KURL& url, KIO::HTTP_METHOD method )
+void HTTPProtocol::davGeneric( const KURL& url, TDEIO::HTTP_METHOD method )
{
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::davGeneric " << url.url()
<< endl;
@@ -877,7 +877,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry&
if ( hasMetaData( "davRequestResponse" ) )
{
- atom.m_uds = KIO::UDS_XML_PROPERTIES;
+ atom.m_uds = TDEIO::UDS_XML_PROPERTIES;
TQDomDocument doc;
doc.appendChild(prop);
atom.m_str = doc.toString();
@@ -899,14 +899,14 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry&
if ( property.tagName() == "creationdate" )
{
// Resource creation date. Should be is ISO 8601 format.
- atom.m_uds = KIO::UDS_CREATION_TIME;
+ atom.m_uds = TDEIO::UDS_CREATION_TIME;
atom.m_long = parseDateTime( property.text(), property.attribute("dt") );
entry.append( atom );
}
else if ( property.tagName() == "getcontentlength" )
{
// Content length (file size)
- atom.m_uds = KIO::UDS_SIZE;
+ atom.m_uds = TDEIO::UDS_SIZE;
atom.m_long = property.text().toULong();
entry.append( atom );
}
@@ -952,7 +952,7 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry&
else if ( property.tagName() == "getlastmodified" )
{
// Last modification date
- atom.m_uds = KIO::UDS_MODIFICATION_TIME;
+ atom.m_uds = TDEIO::UDS_MODIFICATION_TIME;
atom.m_long = parseDateTime( property.text(), property.attribute("dt") );
entry.append( atom );
@@ -1009,27 +1009,27 @@ void HTTPProtocol::davParsePropstats( const TQDomNodeList& propstats, UDSEntry&
setMetaData( "davLockCount", TQString("%1").arg(lockCount) );
setMetaData( "davSupportedLockCount", TQString("%1").arg(supportedLockCount) );
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = isDirectory ? S_IFDIR : S_IFREG;
entry.append( atom );
if ( foundExecutable || isDirectory )
{
// File was executable, or is a directory.
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = 0700;
entry.append(atom);
}
else
{
- atom.m_uds = KIO::UDS_ACCESS;
+ atom.m_uds = TDEIO::UDS_ACCESS;
atom.m_long = 0600;
entry.append(atom);
}
if ( !isDirectory && !mimeType.isEmpty() )
{
- atom.m_uds = KIO::UDS_MIME_TYPE;
+ atom.m_uds = TDEIO::UDS_MIME_TYPE;
atom.m_str = mimeType;
entry.append( atom );
}
@@ -1553,7 +1553,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url )
url = m_request.url.url();
TQString action, errorString;
- KIO::Error kError;
+ TDEIO::Error kError;
// for 412 Precondition Failed
TQString ow = i18n( "Otherwise, the request would have succeeded." );
@@ -1742,7 +1742,7 @@ TQString HTTPProtocol::davError( int code /* = -1 */, TQString url )
void HTTPProtocol::httpError()
{
TQString action, errorString;
- KIO::Error kError;
+ TDEIO::Error kError;
switch ( m_request.method ) {
case HTTP_PUT:
@@ -2187,10 +2187,10 @@ bool HTTPProtocol::httpOpen()
{
m_request.fcache = checkCacheEntry( );
- bool bCacheOnly = (m_request.cache == KIO::CC_CacheOnly);
+ bool bCacheOnly = (m_request.cache == TDEIO::CC_CacheOnly);
bool bOffline = isOffline(m_request.doProxy ? m_proxyURL : m_request.url);
- if (bOffline && (m_request.cache != KIO::CC_Reload))
- m_request.cache = KIO::CC_CacheOnly;
+ if (bOffline && (m_request.cache != TDEIO::CC_Reload))
+ m_request.cache = TDEIO::CC_CacheOnly;
if (m_request.cache == CC_Reload && m_request.fcache)
{
@@ -2198,7 +2198,7 @@ bool HTTPProtocol::httpOpen()
fclose(m_request.fcache);
m_request.fcache = 0;
}
- if ((m_request.cache == KIO::CC_CacheOnly) || (m_request.cache == KIO::CC_Cache))
+ if ((m_request.cache == TDEIO::CC_CacheOnly) || (m_request.cache == TDEIO::CC_Cache))
m_request.bMustRevalidate = false;
m_request.bCachedWrite = true;
@@ -2429,8 +2429,8 @@ bool HTTPProtocol::httpOpen()
if ( m_request.offset > 0 )
{
- header += TQString("Range: bytes=%1-\r\n").arg(KIO::number(m_request.offset));
- kdDebug(7103) << "kio_http : Range = " << KIO::number(m_request.offset) << endl;
+ header += TQString("Range: bytes=%1-\r\n").arg(TDEIO::number(m_request.offset));
+ kdDebug(7103) << "kio_http : Range = " << TDEIO::number(m_request.offset) << endl;
}
if ( m_request.cache == CC_Reload )
@@ -4092,7 +4092,7 @@ void HTTPProtocol::special( const TQByteArray &data )
KURL url;
int method;
stream >> url >> method;
- davGeneric( url, (KIO::HTTP_METHOD) method );
+ davGeneric( url, (TDEIO::HTTP_METHOD) method );
break;
}
case 99: // Close Connection
@@ -4343,7 +4343,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
bool useMD5 = !m_sContentMD5.isEmpty();
// Deal with the size of the file.
- KIO::filesize_t sz = m_request.offset;
+ TDEIO::filesize_t sz = m_request.offset;
if ( sz )
m_iSize += sz;
@@ -4354,7 +4354,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
if ( !dataInternal ) {
if ( (m_iSize > 0) && (m_iSize != NO_SIZE)) {
totalSize(m_iSize);
- infoMessage( i18n( "Retrieving %1 from %2...").arg(KIO::convertSize(m_iSize))
+ infoMessage( i18n( "Retrieving %1 from %2...").arg(TDEIO::convertSize(m_iSize))
.arg( m_request.hostname ) );
}
else
@@ -4411,7 +4411,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
m_iBytesLeft = NO_SIZE;
kdDebug(7113) << "(" << m_pid << ") HTTPProtocol::readBody: retrieve data. "
- << KIO::number(m_iBytesLeft) << " left." << endl;
+ << TDEIO::number(m_iBytesLeft) << " left." << endl;
// Main incoming loop... Gather everything while we can...
m_cpMimeBuffer = false;
@@ -4527,7 +4527,7 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
if (m_iBytesLeft == 0)
{
- kdDebug(7113) << "("<<m_pid<<") EOD received! Left = "<< KIO::number(m_iBytesLeft) << endl;
+ kdDebug(7113) << "("<<m_pid<<") EOD received! Left = "<< TDEIO::number(m_iBytesLeft) << endl;
break;
}
}
@@ -4554,13 +4554,13 @@ bool HTTPProtocol::readBody( bool dataInternal /* = false */ )
}
else
{
- kdDebug(7113) << "(" << m_pid << ") still "<< KIO::number(m_iBytesLeft)
+ kdDebug(7113) << "(" << m_pid << ") still "<< TDEIO::number(m_iBytesLeft)
<< " bytes left! can't close cache entry!\n";
}
if (sz <= 1)
{
- /* kdDebug(7113) << "(" << m_pid << ") readBody: sz = " << KIO::number(sz)
+ /* kdDebug(7113) << "(" << m_pid << ") readBody: sz = " << TDEIO::number(sz)
<< ", responseCode =" << m_responseCode << endl; */
if (m_responseCode >= 500 && m_responseCode <= 599)
error(ERR_INTERNAL_SERVER, m_state.hostname);
diff --git a/kioslave/http/http.h b/kioslave/http/http.h
index 2985eb938..ccbb60ce6 100644
--- a/kioslave/http/http.h
+++ b/kioslave/http/http.h
@@ -42,11 +42,11 @@ class DCOPClient;
class TQDomElement;
class TQDomNodeList;
-namespace KIO {
+namespace TDEIO {
class AuthInfo;
}
-class HTTPProtocol : public TQObject, public KIO::TCPSlaveBase
+class HTTPProtocol : public TQObject, public TDEIO::TCPSlaveBase
{
Q_OBJECT
public:
@@ -103,7 +103,7 @@ public:
HTTPRequest ()
{
port = 0;
- method = KIO::HTTP_UNKNOWN;
+ method = TDEIO::HTTP_UNKNOWN;
offset = 0;
doProxy = false;
allowCompressedPage = false;
@@ -128,9 +128,9 @@ public:
TQString passwd;
TQString path;
TQString query;
- KIO::HTTP_METHOD method;
- KIO::CacheControl cache;
- KIO::filesize_t offset;
+ TDEIO::HTTP_METHOD method;
+ TDEIO::CacheControl cache;
+ TDEIO::filesize_t offset;
bool doProxy;
KURL url;
TQString window; // Window Id this request is related to.
@@ -205,7 +205,7 @@ public:
bool davHostOk();
// send generic DAV request
- void davGeneric( const KURL& url, KIO::HTTP_METHOD method );
+ void davGeneric( const KURL& url, TDEIO::HTTP_METHOD method );
// Send requests to lock and unlock resources
void davLock( const KURL& url, const TQString& scope,
@@ -307,7 +307,7 @@ protected:
*/
void davSetRequest( const TQCString& requestXML );
void davStatList( const KURL& url, bool stat = true );
- void davParsePropstats( const TQDomNodeList& propstats, KIO::UDSEntry& entry );
+ void davParsePropstats( const TQDomNodeList& propstats, TDEIO::UDSEntry& entry );
void davParseActiveLocks( const TQDomNodeList& activeLocks,
uint& lockCount );
@@ -463,7 +463,7 @@ protected:
/**
* Creates authorization prompt info.
*/
- void promptInfo( KIO::AuthInfo& info );
+ void promptInfo( TDEIO::AuthInfo& info );
protected:
HTTPState m_state;
@@ -481,9 +481,9 @@ protected:
// Processing related
bool m_bChunked; // Chunked tranfer encoding
- KIO::filesize_t m_iSize; // Expected size of message
- KIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message.
- KIO::filesize_t m_iContentLeft; // # of content bytes left
+ TDEIO::filesize_t m_iSize; // Expected size of message
+ TDEIO::filesize_t m_iBytesLeft; // # of bytes left to receive in this message.
+ TDEIO::filesize_t m_iContentLeft; // # of content bytes left
TQByteArray m_bufReceive; // Receive buffer
bool m_dataInternal; // Data is for internal consumption
char m_lineBuf[1024];
diff --git a/kioslave/http/kcookiejar/kcookiejar.cpp b/kioslave/http/kcookiejar/kcookiejar.cpp
index e70c97e54..f115a6da6 100644
--- a/kioslave/http/kcookiejar/kcookiejar.cpp
+++ b/kioslave/http/kcookiejar/kcookiejar.cpp
@@ -257,7 +257,7 @@ KCookieJar::KCookieJar()
m_configChanged = false;
m_cookiesChanged = false;
- KConfig cfg("khtml/domain_info", true, false, "data");
+ TDEConfig cfg("khtml/domain_info", true, false, "data");
TQStringList countries = cfg.readListEntry("twoLevelTLD");
for(TQStringList::ConstIterator it = countries.begin();
it != countries.end(); ++it)
@@ -1479,7 +1479,7 @@ bool KCookieJar::loadCookies(const TQString &_filename)
// Save the cookie configuration
//
-void KCookieJar::saveConfig(KConfig *_config)
+void KCookieJar::saveConfig(TDEConfig *_config)
{
if (!m_configChanged)
return;
@@ -1515,7 +1515,7 @@ void KCookieJar::saveConfig(KConfig *_config)
// Load the cookie configuration
//
-void KCookieJar::loadConfig(KConfig *_config, bool reparse )
+void KCookieJar::loadConfig(TDEConfig *_config, bool reparse )
{
if ( reparse )
_config->reparseConfiguration();
diff --git a/kioslave/http/kcookiejar/kcookiejar.h b/kioslave/http/kcookiejar/kcookiejar.h
index eb64485ea..bb16d75d3 100644
--- a/kioslave/http/kcookiejar/kcookiejar.h
+++ b/kioslave/http/kcookiejar/kcookiejar.h
@@ -31,7 +31,7 @@
#include <tqptrlist.h>
#include <time.h>
-class KConfig;
+class TDEConfig;
class KCookieJar;
class KHttpCookie;
class KHttpCookieList;
@@ -146,12 +146,12 @@ public:
/**
* Save the cookie configuration
*/
- void saveConfig(KConfig *_config);
+ void saveConfig(TDEConfig *_config);
/**
* Load the cookie configuration
*/
- void loadConfig(KConfig *_config, bool reparse = false);
+ void loadConfig(TDEConfig *_config, bool reparse = false);
/**
* Looks for cookies in the cookie jar which are appropriate for _url.
diff --git a/kioslave/http/kcookiejar/kcookieserver.cpp b/kioslave/http/kcookiejar/kcookieserver.cpp
index da9c16ce7..94df40b63 100644
--- a/kioslave/http/kcookiejar/kcookieserver.cpp
+++ b/kioslave/http/kcookiejar/kcookieserver.cpp
@@ -88,7 +88,7 @@ KCookieServer::KCookieServer(const TQCString &name)
mAdvicePending = false;
mTimer = new TQTimer();
connect( mTimer, TQT_SIGNAL( timeout()), TQT_SLOT( slotSave()));
- mConfig = new KConfig("kcookiejarrc");
+ mConfig = new TDEConfig("kcookiejarrc");
mCookieJar->loadConfig( mConfig );
TQString filename = locateLocal("data", "kcookiejar/cookies");
diff --git a/kioslave/http/kcookiejar/kcookieserver.h b/kioslave/http/kcookiejar/kcookieserver.h
index 0c36f10b1..2cbb9ccf1 100644
--- a/kioslave/http/kcookiejar/kcookieserver.h
+++ b/kioslave/http/kcookiejar/kcookieserver.h
@@ -34,7 +34,7 @@ class KHttpCookie;
class TQTimer;
class RequestList;
class DCOPClient;
-class KConfig;
+class TDEConfig;
class KCookieServer : public KDEDModule
{
@@ -86,7 +86,7 @@ protected:
TQTimer *mTimer;
bool mAdvicePending;
DCOPClient *mOldCookieServer;
- KConfig *mConfig;
+ TDEConfig *mConfig;
private:
virtual int newInstance(TQValueList<TQCString>) { return 0; }
diff --git a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
index 05f0ac0ea..236e2406b 100644
--- a/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
+++ b/kioslave/http/kcookiejar/tests/kcookiejartest.cpp
@@ -36,7 +36,7 @@ static const char *description = "KCookiejar regression test";
static KCookieJar *jar;
static TQCString *lastYear;
static TQCString *nextYear;
-static KConfig *config = 0;
+static TDEConfig *config = 0;
static KCmdLineOptions options[] =
@@ -87,7 +87,7 @@ static void clearConfig()
delete config;
TQString file = locateLocal("config", "kcookiejar-testconfig");
TQFile::remove(file);
- config = new KConfig(file);
+ config = new TDEConfig(file);
config->setGroup("Cookie Policy");
config->writeEntry("RejectCrossDomainCookies", false);
config->writeEntry("AcceptSessionCookies", false);
diff --git a/kioslave/iso/iso.cpp b/kioslave/iso/iso.cpp
index f5f7f8757..59f5f781e 100644
--- a/kioslave/iso/iso.cpp
+++ b/kioslave/iso/iso.cpp
@@ -54,7 +54,7 @@ static const unsigned char zisofs_magic[8] = {
0x37, 0xE4, 0x53, 0x96, 0xC9, 0xDB, 0xD6, 0x07
};
-using namespace KIO;
+using namespace TDEIO;
extern "C" { KDE_EXPORT int kdemain(int argc, char **argv); }
@@ -241,7 +241,7 @@ void kio_isoProtocol::listDir( const KURL & url )
kdDebug() << "Checking (stat) on " << _path << endl;
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
// It's a real dir -> redirect
@@ -278,12 +278,12 @@ void kio_isoProtocol::listDir( const KURL & url )
const KArchiveEntry* e = root->entry( path );
if ( !e )
{
- error( KIO::ERR_DOES_NOT_EXIST, path );
+ error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
if ( ! e->isDirectory() )
{
- error( KIO::ERR_IS_FILE, path );
+ error( TDEIO::ERR_IS_FILE, path );
return;
}
dir = (KArchiveDirectory*)e;
@@ -328,17 +328,17 @@ void kio_isoProtocol::stat( const KURL & url )
struct stat buff;
if ( ::stat( _path.data(), &buff ) == -1 || !S_ISDIR( buff.st_mode ) ) {
kdDebug() << "isdir=" << S_ISDIR( buff.st_mode ) << " errno=" << strerror(errno) << endl;
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
// Real directory. Return just enough information for KRun to work
UDSAtom atom;
- atom.m_uds = KIO::UDS_NAME;
+ atom.m_uds = TDEIO::UDS_NAME;
atom.m_str = url.fileName();
entry.append( atom );
kdDebug() << "kio_isoProtocol::stat returning name=" << url.fileName() << endl;
- atom.m_uds = KIO::UDS_FILE_TYPE;
+ atom.m_uds = TDEIO::UDS_FILE_TYPE;
atom.m_long = buff.st_mode & S_IFMT;
entry.append( atom );
@@ -363,7 +363,7 @@ void kio_isoProtocol::stat( const KURL & url )
}
if ( !isoEntry )
{
- error( KIO::ERR_DOES_NOT_EXIST, path );
+ error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
createUDSEntry( isoEntry, entry );
@@ -412,7 +412,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
pptr = pointer_block.data();
} else {
- error(KIO::ERR_COULD_NOT_READ, path);
+ error(TDEIO::ERR_COULD_NOT_READ, path);
return;
}
} else {
@@ -474,7 +474,7 @@ void kio_isoProtocol::getFile( const KIsoFile *isoFileEntry, const TQString &pat
}
if (pos!=size) {
- error(KIO::ERR_COULD_NOT_READ, path);
+ error(TDEIO::ERR_COULD_NOT_READ, path);
return;
}
@@ -492,7 +492,7 @@ void kio_isoProtocol::get( const KURL & url )
TQString path;
if ( !checkNewFile( url.path(), path, url.hasRef() ? url.htmlRef().toInt() : -1 ) )
{
- error( KIO::ERR_DOES_NOT_EXIST, url.path() );
+ error( TDEIO::ERR_DOES_NOT_EXIST, url.path() );
return;
}
@@ -501,12 +501,12 @@ void kio_isoProtocol::get( const KURL & url )
if ( !isoEntry )
{
- error( KIO::ERR_DOES_NOT_EXIST, path );
+ error( TDEIO::ERR_DOES_NOT_EXIST, path );
return;
}
if ( isoEntry->isDirectory() )
{
- error( KIO::ERR_IS_DIRECTORY, path );
+ error( TDEIO::ERR_IS_DIRECTORY, path );
return;
}
diff --git a/kioslave/iso/iso.h b/kioslave/iso/iso.h
index 2a488bd9d..136c32736 100644
--- a/kioslave/iso/iso.h
+++ b/kioslave/iso/iso.h
@@ -28,7 +28,7 @@
class KIso;
-class kio_isoProtocol : public KIO::SlaveBase
+class kio_isoProtocol : public TDEIO::SlaveBase
{
public:
kio_isoProtocol( const TQCString &pool, const TQCString &app );
@@ -40,7 +40,7 @@ public:
protected:
void getFile( const KIsoFile *isoFileEntry, const TQString &path );
- void createUDSEntry( const KArchiveEntry * isoEntry, KIO::UDSEntry & entry );
+ void createUDSEntry( const KArchiveEntry * isoEntry, TDEIO::UDSEntry & entry );
bool checkNewFile( TQString fullPath, TQString & path, int startsec );
KIso * m_isoFile;
diff --git a/kioslave/iso/kiso.cpp b/kioslave/iso/kiso.cpp
index 9ec1f1c3e..b19ec589b 100644
--- a/kioslave/iso/kiso.cpp
+++ b/kioslave/iso/kiso.cpp
@@ -324,9 +324,9 @@ void KIso::addBoot(struct el_torito_boot_descriptor* bootdesc) {
void KIso::readParams()
{
- KConfig *config;
+ TDEConfig *config;
- config = new KConfig("kio_isorc");
+ config = new TDEConfig("kio_isorc");
showhidden=config->readBoolEntry("showhidden",false);
showrr=config->readBoolEntry("showrr",true);
diff --git a/kioslave/metainfo/metainfo.cpp b/kioslave/metainfo/metainfo.cpp
index 9bc99981f..66e5357f9 100644
--- a/kioslave/metainfo/metainfo.cpp
+++ b/kioslave/metainfo/metainfo.cpp
@@ -33,7 +33,7 @@
// mimeType - the mime type of the file, so we need not extra determine it
// what - what to load
-using namespace KIO;
+using namespace TDEIO;
extern "C"
{
diff --git a/kioslave/metainfo/metainfo.h b/kioslave/metainfo/metainfo.h
index 491da62eb..a77647180 100644
--- a/kioslave/metainfo/metainfo.h
+++ b/kioslave/metainfo/metainfo.h
@@ -23,7 +23,7 @@
#include <kio/slavebase.h>
-class MetaInfoProtocol : public KIO::SlaveBase
+class MetaInfoProtocol : public TDEIO::SlaveBase
{
public:
MetaInfoProtocol(const TQCString &pool, const TQCString &app);