diff options
Diffstat (limited to 'kmobile/kioslave/kio_mobile.cpp')
-rw-r--r-- | kmobile/kioslave/kio_mobile.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/kmobile/kioslave/kio_mobile.cpp b/kmobile/kioslave/kio_mobile.cpp index 8c4e3853f..e8cff4fa1 100644 --- a/kmobile/kioslave/kio_mobile.cpp +++ b/kmobile/kioslave/kio_mobile.cpp @@ -35,7 +35,7 @@ #include <tdepimmacros.h> -using namespace KIO; +using namespace TDEIO; #define KIO_MOBILE_DEBUG_AREA 7126 #define PRINT_DEBUG kdDebug(KIO_MOBILE_DEBUG_AREA) << "kio_mobile: " @@ -115,14 +115,14 @@ int KMobileProtocol::getDeviceAndRessource(const TQString &_path, return 0; } - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; } static -void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) +void addAtom(TDEIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = TQString()) { - KIO::UDSAtom atom; + TDEIO::UDSAtom atom; atom.m_uds = ID; atom.m_long = l; atom.m_str = s; @@ -130,35 +130,35 @@ void addAtom(KIO::UDSEntry& entry, unsigned int ID, long l, const TQString& s = } static -void createDirEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) +void createDirEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime) { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFDIR); - addAtom(entry, KIO::UDS_ACCESS, 0500); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - addAtom(entry, KIO::UDS_URL, 0, url); - addAtom(entry, KIO::UDS_USER, 0, getenv("USER")); - addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFDIR); + addAtom(entry, TDEIO::UDS_ACCESS, 0500); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_USER, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_GROUP, 0, getenv("USER")); PRINT_DEBUG << TQString("createDirEntry: File: %1 MIME: %2 URL: %3\n").arg(name).arg(mime).arg(url); -// addAtom(entry, KIO::UDS_SIZE, 0); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); +// addAtom(entry, TDEIO::UDS_SIZE, 0); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); } static -void createFileEntry(KIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, +void createFileEntry(TDEIO::UDSEntry& entry, const TQString& name, const TQString& url, const TQString& mime, const unsigned long size = 0) { entry.clear(); - addAtom(entry, KIO::UDS_NAME, 0, name); - addAtom(entry, KIO::UDS_FILE_TYPE, S_IFREG); - addAtom(entry, KIO::UDS_URL, 0, url); - addAtom(entry, KIO::UDS_ACCESS, 0400); - addAtom(entry, KIO::UDS_USER, 0, getenv("USER")); - addAtom(entry, KIO::UDS_GROUP, 0, getenv("USER")); - addAtom(entry, KIO::UDS_MIME_TYPE, 0, mime); - if (size) addAtom(entry, KIO::UDS_SIZE, size); - addAtom(entry, KIO::UDS_GUESSED_MIME_TYPE, 0, mime); + addAtom(entry, TDEIO::UDS_NAME, 0, name); + addAtom(entry, TDEIO::UDS_FILE_TYPE, S_IFREG); + addAtom(entry, TDEIO::UDS_URL, 0, url); + addAtom(entry, TDEIO::UDS_ACCESS, 0400); + addAtom(entry, TDEIO::UDS_USER, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_GROUP, 0, getenv("USER")); + addAtom(entry, TDEIO::UDS_MIME_TYPE, 0, mime); + if (size) addAtom(entry, TDEIO::UDS_SIZE, size); + addAtom(entry, TDEIO::UDS_GUESSED_MIME_TYPE, 0, mime); PRINT_DEBUG << TQString("createFileEntry: File: %1, Size: %2, MIME: %3\n").arg(name).arg(size).arg(mime); } @@ -181,7 +181,7 @@ void KMobileProtocol::get(const KURL &url) } if (devName.isEmpty() || resource.isEmpty()) { - error(KIO::ERR_DOES_NOT_EXIST, url.path()); + error(TDEIO::ERR_DOES_NOT_EXIST, url.path()); return; } @@ -197,7 +197,7 @@ void KMobileProtocol::get(const KURL &url) break; case KMobileDevice::hasFileStorage: err = getFileStorage(devName, result, mime, devPath); break; - default: err = KIO::ERR_CANNOT_ENTER_DIRECTORY; /* TODO */ + default: err = TDEIO::ERR_CANNOT_ENTER_DIRECTORY; /* TODO */ } if (err) { @@ -209,7 +209,7 @@ void KMobileProtocol::get(const KURL &url) mimeType(mime); // tell the length - KIO::filesize_t processed_size = result.length(); + TDEIO::filesize_t processed_size = result.length(); totalSize(processed_size); // tell the contents of the URL @@ -233,7 +233,7 @@ void KMobileProtocol::listRoot(const KURL& url) { PRINT_DEBUG << TQString("########## listRoot(%1) for %2:/\n").arg(url.path()).arg(url.protocol()); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; TQStringList deviceNames = m_dev.deviceNames(); unsigned int dirs = deviceNames.count(); @@ -314,7 +314,7 @@ void KMobileProtocol::listTopDeviceDir(const TQString &devName) { PRINT_DEBUG << TQString("listTopDeviceDir(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; unsigned int caps = m_dev.capabilities(devName); for (int i=0; i<31; i++) { @@ -362,7 +362,7 @@ void KMobileProtocol::listAddressBook(const TQString &devName, const TQString &r { PRINT_DEBUG << TQString("listAddressBook(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int fieldwidth; int entries = m_dev.numAddresses(devName); @@ -409,11 +409,11 @@ int KMobileProtocol::getVCard( const TQString &devName, TQCString &result, TQStr if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numAddresses(devName)) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; TQString str = m_dev.readAddress(devName, index); if (str.isEmpty()) - return KIO::ERR_INTERNAL; + return TDEIO::ERR_INTERNAL; result = str.utf8(); mime = entryMimeType(KMobileDevice::hasAddressBook); // setMetaData("plugin", "const TQString &key, const TQString &value); @@ -427,7 +427,7 @@ void KMobileProtocol::listCalendar( const TQString &devName, const TQString &res { PRINT_DEBUG << TQString("listCalendar(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int entries = m_dev.numCalendarEntries(devName); totalSize(entries); @@ -455,7 +455,7 @@ int KMobileProtocol::getCalendar( const TQString &devName, TQCString &result, TQ /* TODO */ Q_UNUSED(result); Q_UNUSED(mime); - return KIO::ERR_CANNOT_ENTER_DIRECTORY; + return TDEIO::ERR_CANNOT_ENTER_DIRECTORY; } @@ -466,7 +466,7 @@ void KMobileProtocol::listNotes( const TQString &devName, const TQString &resour { PRINT_DEBUG << TQString("listNotes(%1)\n").arg(devName); - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; int entries = m_dev.numNotes(devName); totalSize(entries); @@ -498,11 +498,11 @@ int KMobileProtocol::getNote( const TQString &devName, TQCString &result, TQStri if (index>0) index = path.left(index).toInt(); if (index<0 || index>=m_dev.numNotes(devName)) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; TQString note = m_dev.readNote(devName, index); if (note.isEmpty()) - return KIO::ERR_DOES_NOT_EXIST; + return TDEIO::ERR_DOES_NOT_EXIST; result = note.utf8(); mime = entryMimeType(KMobileDevice::hasNotes); @@ -517,7 +517,7 @@ void KMobileProtocol::listFileStorage(const TQString &devName, const TQString &r PRINT_DEBUG << TQString("listFileStorage(%1,%2)\n").arg(devName).arg(devPath); /* TODO */ - error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) ); + error( TDEIO::ERR_DOES_NOT_EXIST, TQString("/%1/%2/%3").arg(devName).arg(resource).arg(devPath) ); } /* @@ -531,7 +531,7 @@ int KMobileProtocol::getFileStorage(const TQString &devName, TQCString &result, Q_UNUSED(devName); Q_UNUSED(result); Q_UNUSED(mime); - return KIO::ERR_CANNOT_ENTER_DIRECTORY; + return TDEIO::ERR_CANNOT_ENTER_DIRECTORY; } @@ -602,7 +602,7 @@ void KMobileProtocol::listDir(const KURL &url) PRINT_DEBUG << TQString("listDir(%1)\n").arg(url.path()); if (!m_dev.isKMobileAvailable()) { - error( KIO::ERR_CONNECTION_BROKEN, i18n("TDE Mobile Device Manager") ); + error( TDEIO::ERR_CONNECTION_BROKEN, i18n("TDE Mobile Device Manager") ); return; } @@ -622,7 +622,7 @@ void KMobileProtocol::listDir(const KURL &url) #if 0 if (!dev) { - error( KIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) ); + error( TDEIO::ERR_DOES_NOT_EXIST, TQString("/%1").arg(devName) ); return; } #endif |