diff options
Diffstat (limited to 'kioslave/smb')
-rw-r--r-- | kioslave/smb/kio_smb.h | 4 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_auth.cpp | 4 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_browse.cpp | 36 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_config.cpp | 2 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_dir.cpp | 58 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_file.cpp | 26 | ||||
-rw-r--r-- | kioslave/smb/kio_smb_mount.cpp | 12 |
7 files changed, 71 insertions, 71 deletions
diff --git a/kioslave/smb/kio_smb.h b/kioslave/smb/kio_smb.h index c7c316478..d111c7646 100644 --- a/kioslave/smb/kio_smb.h +++ b/kioslave/smb/kio_smb.h @@ -86,13 +86,13 @@ extern "C" #define MAX_XFER_BUF_SIZE 16348 #define KIO_SMB 7106 -using namespace KIO; +using namespace TDEIO; class TDEProcess; //=========================================================================== -class SMBSlave : public TQObject, public KIO::SlaveBase +class SMBSlave : public TQObject, public TDEIO::SlaveBase { Q_OBJECT diff --git a/kioslave/smb/kio_smb_auth.cpp b/kioslave/smb/kio_smb_auth.cpp index d4a48239f..b03e77420 100644 --- a/kioslave/smb/kio_smb_auth.cpp +++ b/kioslave/smb/kio_smb_auth.cpp @@ -76,7 +76,7 @@ void SMBSlave::auth_smbc_get_data(const char *server,const char *share, password[pwmaxlen - 1] = 0; TQString s_password = TQString::fromUtf8(password); - KIO::AuthInfo info; + TDEIO::AuthInfo info; info.url = KURL("smb:///"); info.url.setHost(s_server); info.url.setPath("/" + s_share); @@ -113,7 +113,7 @@ bool SMBSlave::checkPassword(SMBUrl &url) { kdDebug(KIO_SMB) << "checkPassword for " << url << endl; - KIO::AuthInfo info; + TDEIO::AuthInfo info; info.url = KURL("smb:///"); info.url.setHost(url.host()); diff --git a/kioslave/smb/kio_smb_browse.cpp b/kioslave/smb/kio_smb_browse.cpp index e9a216fd3..b8f237653 100644 --- a/kioslave/smb/kio_smb_browse.cpp +++ b/kioslave/smb/kio_smb_browse.cpp @@ -41,13 +41,13 @@ #include "kio_smb.h" #include "kio_smb_internal.h" -using namespace KIO; +using namespace TDEIO; int SMBSlave::cache_stat(const SMBUrl &url, struct stat* st ) { int result = smbc_stat( url.toSmbcUrl(), st); kdDebug(KIO_SMB) << "smbc_stat " << url << " " << errno << " " << result << endl; - kdDebug(KIO_SMB) << "size " << (KIO::filesize_t)st->st_size << endl; + kdDebug(KIO_SMB) << "size " << (TDEIO::filesize_t)st->st_size << endl; return result; } @@ -69,15 +69,15 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign return false; } - udsatom.m_uds = KIO::UDS_FILE_TYPE; + udsatom.m_uds = TDEIO::UDS_FILE_TYPE; udsatom.m_long = st.st_mode & S_IFMT; udsentry.append(udsatom); - udsatom.m_uds = KIO::UDS_SIZE; + udsatom.m_uds = TDEIO::UDS_SIZE; udsatom.m_long = st.st_size; udsentry.append(udsatom); - udsatom.m_uds = KIO::UDS_USER; + udsatom.m_uds = TDEIO::UDS_USER; uid_t uid = st.st_uid; struct passwd *user = getpwuid( uid ); if ( user ) @@ -86,7 +86,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign udsatom.m_str = TQString::number( uid ); udsentry.append(udsatom); - udsatom.m_uds = KIO::UDS_GROUP; + udsatom.m_uds = TDEIO::UDS_GROUP; gid_t gid = st.st_gid; struct group *grp = getgrgid( gid ); if ( grp ) @@ -95,7 +95,7 @@ bool SMBSlave::browse_stat_path(const SMBUrl& _url, UDSEntry& udsentry, bool ign udsatom.m_str = TQString::number( gid ); udsentry.append(udsatom); - udsatom.m_uds = KIO::UDS_ACCESS; + udsatom.m_uds = TDEIO::UDS_ACCESS; udsatom.m_long = st.st_mode & 07777; udsentry.append(udsatom); @@ -153,7 +153,7 @@ void SMBSlave::stat( const KURL& kurl ) UDSAtom udsatom; UDSEntry udsentry; // Set name - udsatom.m_uds = KIO::UDS_NAME; + udsatom.m_uds = TDEIO::UDS_NAME; udsatom.m_str = kurl.fileName(); udsentry.append( udsatom ); @@ -166,7 +166,7 @@ void SMBSlave::stat( const KURL& kurl ) case SMBURLTYPE_ENTIRE_NETWORK: case SMBURLTYPE_WORKGROUP_OR_SERVER: - udsatom.m_uds = KIO::UDS_FILE_TYPE; + udsatom.m_uds = TDEIO::UDS_FILE_TYPE; udsatom.m_long = S_IFDIR; udsentry.append(udsatom); break; @@ -342,7 +342,7 @@ void SMBSlave::listDir( const KURL& kurl ) break; // Set name - atom.m_uds = KIO::UDS_NAME; + atom.m_uds = TDEIO::UDS_NAME; TQString dirpName = TQString::fromUtf8( dirp->name ); // We cannot trust dirp->commentlen has it might be with or without the NUL character // See KDE bug #111430 and Samba bug #3030 @@ -387,17 +387,17 @@ void SMBSlave::listDir( const KURL& kurl ) dirp->smbc_type == SMBC_FILE_SHARE) { // Set type - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFDIR; udsentry.append( atom ); // Set permissions - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = (S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH); udsentry.append(atom); if (dirp->smbc_type == SMBC_SERVER) { - atom.m_uds = KIO::UDS_URL; + atom.m_uds = TDEIO::UDS_URL; // TQString workgroup = m_current_url.host().upper(); KURL u("smb:/"); u.setHost(dirpName); @@ -408,7 +408,7 @@ void SMBSlave::listDir( const KURL& kurl ) kdDebug(KIO_SMB) << "list item " << atom.m_str << endl; udsentry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; + atom.m_uds = TDEIO::UDS_MIME_TYPE; atom.m_str = TQString::fromLatin1("application/x-smb-server"); udsentry.append(atom); } @@ -419,20 +419,20 @@ void SMBSlave::listDir( const KURL& kurl ) else if(dirp->smbc_type == SMBC_WORKGROUP) { // Set type - atom.m_uds = KIO::UDS_FILE_TYPE; + atom.m_uds = TDEIO::UDS_FILE_TYPE; atom.m_long = S_IFDIR; udsentry.append( atom ); // Set permissions - atom.m_uds = KIO::UDS_ACCESS; + atom.m_uds = TDEIO::UDS_ACCESS; atom.m_long = (S_IRUSR | S_IRGRP | S_IROTH | S_IXUSR | S_IXGRP | S_IXOTH); udsentry.append(atom); - atom.m_uds = KIO::UDS_MIME_TYPE; + atom.m_uds = TDEIO::UDS_MIME_TYPE; atom.m_str = TQString::fromLatin1("application/x-smb-workgroup"); udsentry.append(atom); - atom.m_uds = KIO::UDS_URL; + atom.m_uds = TDEIO::UDS_URL; // TQString workgroup = m_current_url.host().upper(); KURL u("smb:/"); u.setHost(dirpName); diff --git a/kioslave/smb/kio_smb_config.cpp b/kioslave/smb/kio_smb_config.cpp index 101ba160d..123462772 100644 --- a/kioslave/smb/kio_smb_config.cpp +++ b/kioslave/smb/kio_smb_config.cpp @@ -37,7 +37,7 @@ //=========================================================================== void SMBSlave::reparseConfiguration() { - KConfig *cfg = new KConfig("kioslaverc", true); + TDEConfig *cfg = new TDEConfig("kioslaverc", true); cfg->setGroup("Browser Settings/SMBro"); m_default_user=cfg->readEntry("User"); // m_default_workgroup=cfg->readEntry("Workgroup"); diff --git a/kioslave/smb/kio_smb_dir.cpp b/kioslave/smb/kio_smb_dir.cpp index 936ec15af..54c3b6cfb 100644 --- a/kioslave/smb/kio_smb_dir.cpp +++ b/kioslave/smb/kio_smb_dir.cpp @@ -48,7 +48,7 @@ void SMBSlave::copy( const KURL& ksrc, int dstflags; int srcfd = -1; int dstfd = -1; - KIO::filesize_t processed_size = 0; + TDEIO::filesize_t processed_size = 0; unsigned char buf[MAX_XFER_BUF_SIZE]; kdDebug(KIO_SMB) << "SMBSlave::copy with src = " << ksrc << "and dest = " << kdst << endl; @@ -62,17 +62,17 @@ void SMBSlave::copy( const KURL& ksrc, { if ( errno == EACCES ) { - error( KIO::ERR_ACCESS_DENIED, src.prettyURL()); + error( TDEIO::ERR_ACCESS_DENIED, src.prettyURL()); } else { - error( KIO::ERR_DOES_NOT_EXIST, src.prettyURL()); + error( TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL()); } return; } if ( S_ISDIR( st.st_mode ) ) { - error( KIO::ERR_IS_DIRECTORY, src.prettyURL() ); + error( TDEIO::ERR_IS_DIRECTORY, src.prettyURL() ); return; } totalSize(st.st_size); @@ -82,12 +82,12 @@ void SMBSlave::copy( const KURL& ksrc, { if(S_ISDIR(st.st_mode)) { - error( KIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL()); + error( TDEIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL()); return; } if(!overwrite) { - error( KIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL()); + error( TDEIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL()); return; } } @@ -98,11 +98,11 @@ void SMBSlave::copy( const KURL& ksrc, { if(errno == EACCES) { - error( KIO::ERR_ACCESS_DENIED, src.prettyURL() ); + error( TDEIO::ERR_ACCESS_DENIED, src.prettyURL() ); } else { - error( KIO::ERR_DOES_NOT_EXIST, src.prettyURL() ); + error( TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL() ); } return; } @@ -129,11 +129,11 @@ void SMBSlave::copy( const KURL& ksrc, { if(errno == EACCES) { - error(KIO::ERR_WRITE_ACCESS_DENIED, dst.prettyURL()); + error(TDEIO::ERR_WRITE_ACCESS_DENIED, dst.prettyURL()); } else { - error(KIO::ERR_CANNOT_OPEN_FOR_READING, dst.prettyURL()); + error(TDEIO::ERR_CANNOT_OPEN_FOR_READING, dst.prettyURL()); } if(srcfd >= 0 ) { @@ -152,8 +152,8 @@ void SMBSlave::copy( const KURL& ksrc, n = smbc_write(dstfd, buf, n); if(n == -1) { - kdDebug(KIO_SMB) << "SMBSlave::copy copy now KIO::ERR_COULD_NOT_WRITE" << endl; - error( KIO::ERR_COULD_NOT_WRITE, dst.prettyURL()); + kdDebug(KIO_SMB) << "SMBSlave::copy copy now TDEIO::ERR_COULD_NOT_WRITE" << endl; + error( TDEIO::ERR_COULD_NOT_WRITE, dst.prettyURL()); break; } @@ -166,7 +166,7 @@ void SMBSlave::copy( const KURL& ksrc, } else { - error( KIO::ERR_COULD_NOT_READ, src.prettyURL()); + error( TDEIO::ERR_COULD_NOT_READ, src.prettyURL()); break; } } @@ -188,7 +188,7 @@ void SMBSlave::copy( const KURL& ksrc, } else { - error( KIO::ERR_COULD_NOT_WRITE, dst.prettyURL()); + error( TDEIO::ERR_COULD_NOT_WRITE, dst.prettyURL()); return; } } @@ -211,7 +211,7 @@ void SMBSlave::del( const KURL &kurl, bool isfile) switch(errno) { case EISDIR: - error( KIO::ERR_IS_DIRECTORY, m_current_url.prettyURL()); + error( TDEIO::ERR_IS_DIRECTORY, m_current_url.prettyURL()); break; default: reportError(kurl); @@ -244,12 +244,12 @@ void SMBSlave::mkdir( const KURL &kurl, int permissions ) { if(S_ISDIR(st.st_mode )) { - error( KIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL()); + error( TDEIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL()); } } else { - error( KIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL()); + error( TDEIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL()); } } else reportError(kurl); @@ -287,15 +287,15 @@ void SMBSlave::rename( const KURL& ksrc, const KURL& kdest, bool overwrite ) { if(S_ISDIR(st.st_mode)) { - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_DIR_ALREADY_EXIST" << endl; - error( KIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL()); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_DIR_ALREADY_EXIST" << endl; + error( TDEIO::ERR_DIR_ALREADY_EXIST, dst.prettyURL()); finished(); return; } if(!overwrite) { - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_FILE_ALREADY_EXIST" << endl; - error( KIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL()); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_FILE_ALREADY_EXIST" << endl; + error( TDEIO::ERR_FILE_ALREADY_EXIST, dst.prettyURL()); finished(); return; } @@ -311,26 +311,26 @@ void SMBSlave::rename( const KURL& ksrc, const KURL& kdest, bool overwrite ) { if(errno == EACCES) { - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_ACCESS_DENIED" << endl; - error(KIO::ERR_ACCESS_DENIED, src.prettyURL()); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_ACCESS_DENIED" << endl; + error(TDEIO::ERR_ACCESS_DENIED, src.prettyURL()); } else { - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_DOES_NOT_EXIST" << endl; - error(KIO::ERR_DOES_NOT_EXIST, src.prettyURL()); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_DOES_NOT_EXIST" << endl; + error(TDEIO::ERR_DOES_NOT_EXIST, src.prettyURL()); } } break; case EACCES: case EPERM: - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_ACCESS_DENIED" << endl; - error( KIO::ERR_ACCESS_DENIED, dst.prettyURL() ); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_ACCESS_DENIED" << endl; + error( TDEIO::ERR_ACCESS_DENIED, dst.prettyURL() ); break; default: - kdDebug(KIO_SMB) << "SMBSlave::rename KIO::ERR_CANNOT_RENAME" << endl; - error( KIO::ERR_CANNOT_RENAME, src.prettyURL() ); + kdDebug(KIO_SMB) << "SMBSlave::rename TDEIO::ERR_CANNOT_RENAME" << endl; + error( TDEIO::ERR_CANNOT_RENAME, src.prettyURL() ); } diff --git a/kioslave/smb/kio_smb_file.cpp b/kioslave/smb/kio_smb_file.cpp index 8c7867722..25137c8ce 100644 --- a/kioslave/smb/kio_smb_file.cpp +++ b/kioslave/smb/kio_smb_file.cpp @@ -44,7 +44,7 @@ void SMBSlave::get( const KURL& kurl ) // time_t curtime = 0; time_t lasttime = 0; time_t starttime = 0; - KIO::filesize_t totalbytesread = 0; + TDEIO::filesize_t totalbytesread = 0; TQByteArray filedata; SMBUrl url; @@ -68,13 +68,13 @@ void SMBSlave::get( const KURL& kurl ) if(cache_stat(url,&st) == -1 ) { if ( errno == EACCES ) - error( KIO::ERR_ACCESS_DENIED, url.prettyURL()); + error( TDEIO::ERR_ACCESS_DENIED, url.prettyURL()); else - error( KIO::ERR_DOES_NOT_EXIST, url.prettyURL()); + error( TDEIO::ERR_DOES_NOT_EXIST, url.prettyURL()); return; } if ( S_ISDIR( st.st_mode ) ) { - error( KIO::ERR_IS_DIRECTORY, url.prettyURL()); + error( TDEIO::ERR_IS_DIRECTORY, url.prettyURL()); return; } @@ -99,7 +99,7 @@ void SMBSlave::get( const KURL& kurl ) } else if(bytesread < 0) { - error( KIO::ERR_COULD_NOT_READ, url.prettyURL()); + error( TDEIO::ERR_COULD_NOT_READ, url.prettyURL()); return; } @@ -133,12 +133,12 @@ void SMBSlave::get( const KURL& kurl ) smbc_close(filefd); data( TQByteArray() ); - processedSize(static_cast<KIO::filesize_t>(st.st_size)); + processedSize(static_cast<TDEIO::filesize_t>(st.st_size)); } else { - error( KIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL()); + error( TDEIO::ERR_CANNOT_OPEN_FOR_READING, url.prettyURL()); return; } @@ -172,12 +172,12 @@ void SMBSlave::put( const KURL& kurl, if (S_ISDIR(st.st_mode)) { kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" already isdir !!"<< endl; - error( KIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL()); + error( TDEIO::ERR_DIR_ALREADY_EXIST, m_current_url.prettyURL()); } else { kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" already exist !!"<< endl; - error( KIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL()); + error( TDEIO::ERR_FILE_ALREADY_EXIST, m_current_url.prettyURL()); } return; } @@ -216,12 +216,12 @@ void SMBSlave::put( const KURL& kurl, if ( errno == EACCES ) { kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" access denied !!"<< endl; - error( KIO::ERR_WRITE_ACCESS_DENIED, m_current_url.prettyURL()); + error( TDEIO::ERR_WRITE_ACCESS_DENIED, m_current_url.prettyURL()); } else { kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" can not open for writing !!"<< endl; - error( KIO::ERR_CANNOT_OPEN_FOR_WRITING, m_current_url.prettyURL()); + error( TDEIO::ERR_CANNOT_OPEN_FOR_WRITING, m_current_url.prettyURL()); } finished(); return; @@ -246,7 +246,7 @@ void SMBSlave::put( const KURL& kurl, if ( size < 0) { kdDebug(KIO_SMB) << "SMBSlave::put error " << kurl <<" could not write !!"<< endl; - error( KIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL()); + error( TDEIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL()); finished(); return; } @@ -257,7 +257,7 @@ void SMBSlave::put( const KURL& kurl, if(smbc_close(filefd)) { kdDebug(KIO_SMB) << "SMBSlave::put on " << kurl <<" could not write !!"<< endl; - error( KIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL()); + error( TDEIO::ERR_COULD_NOT_WRITE, m_current_url.prettyURL()); finished(); return; } diff --git a/kioslave/smb/kio_smb_mount.cpp b/kioslave/smb/kio_smb_mount.cpp index 5466ee06a..ad421f631 100644 --- a/kioslave/smb/kio_smb_mount.cpp +++ b/kioslave/smb/kio_smb_mount.cpp @@ -65,7 +65,7 @@ void SMBSlave::special( const TQByteArray & data) if (tmp==3) { if (!KStandardDirs::makeDir(mountPoint)) { - error(KIO::ERR_COULD_NOT_MKDIR, mountPoint); + error(TDEIO::ERR_COULD_NOT_MKDIR, mountPoint); return; } } @@ -121,7 +121,7 @@ void SMBSlave::special( const TQByteArray & data) if (!proc.start( TDEProcess::Block, TDEProcess::AllOutput )) { - error(KIO::ERR_CANNOT_LAUNCH_PROCESS, + error(TDEIO::ERR_CANNOT_LAUNCH_PROCESS, "smbmount"+i18n("\nMake sure that the samba package is installed properly on your system.")); return; } @@ -131,7 +131,7 @@ void SMBSlave::special( const TQByteArray & data) if (proc.exitStatus() != 0) { - error( KIO::ERR_COULD_NOT_MOUNT, + error( TDEIO::ERR_COULD_NOT_MOUNT, i18n("Mounting of share \"%1\" from host \"%2\" by user \"%3\" failed.\n%4") .arg(share).arg(host).arg(user).arg(mybuf + "\n" + mystderr)); return; @@ -162,7 +162,7 @@ void SMBSlave::special( const TQByteArray & data) if ( !proc.start( TDEProcess::Block, TDEProcess::AllOutput ) ) { - error(KIO::ERR_CANNOT_LAUNCH_PROCESS, + error(TDEIO::ERR_CANNOT_LAUNCH_PROCESS, "smbumount"+i18n("\nMake sure that the samba package is installed properly on your system.")); return; } @@ -172,7 +172,7 @@ void SMBSlave::special( const TQByteArray & data) if (proc.exitStatus() != 0) { - error(KIO::ERR_COULD_NOT_UNMOUNT, + error(TDEIO::ERR_COULD_NOT_UNMOUNT, i18n("Unmounting of mountpoint \"%1\" failed.\n%2") .arg(mountPoint).arg(mybuf + "\n" + mystderr)); return; @@ -194,7 +194,7 @@ void SMBSlave::special( const TQByteArray & data) if ( !ok ) { - error(KIO::ERR_COULD_NOT_RMDIR, mountPoint); + error(TDEIO::ERR_COULD_NOT_RMDIR, mountPoint); return; } } |