diff options
Diffstat (limited to 'src/appinfo.cpp')
-rw-r--r-- | src/appinfo.cpp | 54 |
1 files changed, 20 insertions, 34 deletions
diff --git a/src/appinfo.cpp b/src/appinfo.cpp index 6cc34f8..0748529 100644 --- a/src/appinfo.cpp +++ b/src/appinfo.cpp @@ -43,34 +43,34 @@ extern "C" } TDEInstance instance("tdeio_appinfo"); - tdeio_appInfoProtocol slave(argv[2], argv[3]); + TDEIO_AppInfo slave(argv[2], argv[3]); slave.dispatchLoop(); return 0; } } -tdeio_appInfoProtocol::tdeio_appInfoProtocol(const TQCString &pool_socket, - const TQCString &app_socket) : SlaveBase("tdeio_appinfo", pool_socket, app_socket) +TDEIO_AppInfo::TDEIO_AppInfo(const TQCString &pool_socket, const TQCString &app_socket) + : SlaveBase("tdeio_appinfo", pool_socket, app_socket), m_impl(this) { - kdDebug() << "tdeio_appInfoProtocol::tdeio_appInfoProtocol()" << endl; + kdDebug() << "TDEIO_AppInfo::TDEIO_AppInfo()" << endl; } -tdeio_appInfoProtocol::~tdeio_appInfoProtocol() +TDEIO_AppInfo::~TDEIO_AppInfo() { - kdDebug() << "tdeio_appInfoProtocol::~tdeio_appInfoProtocol()" << endl; + kdDebug() << "TDEIO_AppInfo::~TDEIO_AppInfo()" << endl; } -void tdeio_appInfoProtocol::stat(const KURL &url) +void TDEIO_AppInfo::stat(const KURL &url) { - kdDebug() << "tdeio_appInfoProtocol::stat: " << url << endl; + kdDebug() << "TDEIO_AppInfo::stat: " << url << endl; TQString path = url.path(); if (path.isEmpty() || path == "/") { - kdDebug() << "tdeio_appInfoProtocol::stat: " << "creating top level entry" << endl; + kdDebug() << "TDEIO_AppInfo::stat: " << "creating top level entry" << endl; // The root is "virtual" - it's not a single physical directory TDEIO::UDSEntry entry; m_impl.createTopLevelEntry(entry); @@ -83,14 +83,14 @@ void tdeio_appInfoProtocol::stat(const KURL &url) bool ok = m_impl.parseURL(url, name, path); if (!ok) { - kdDebug() << "tdeio_appInfoProtocol::stat: " << "can't parse url" << endl; + kdDebug() << "TDEIO_AppInfo::stat: " << "can't parse url" << endl; error(TDEIO::ERR_MALFORMED_URL, url.prettyURL()); return; } if (path.isEmpty()) { - kdDebug() << "tdeio_appInfoProtocol::stat: " << "url empty after parsing" << endl; + kdDebug() << "TDEIO_AppInfo::stat: " << "url empty after parsing" << endl; TDEIO::UDSEntry entry; if (m_impl.statByName(name, entry)) @@ -105,18 +105,18 @@ void tdeio_appInfoProtocol::stat(const KURL &url) } else { - kdDebug() << "tdeio_appInfoProtocol::stat: " << "url not empty after parsing: statting" << endl; + kdDebug() << "TDEIO_AppInfo::stat: " << "url not empty after parsing: statting" << endl; SlaveBase::stat(url); } } -void tdeio_appInfoProtocol::listDir(const KURL &url) +void TDEIO_AppInfo::listDir(const KURL &url) { - kdDebug() << "tdeio_appInfoProtocol::listDir: " << url << endl; + kdDebug() << "TDEIO_AppInfo::listDir: " << url << endl; if (url.path().length() <= 1) { - kdDebug() << "tdeio_appInfoProtocol::listDir: " << "url empty: listing root" << endl; + kdDebug() << "TDEIO_AppInfo::listDir: " << "url empty: listing root" << endl; listRoot(); return; } @@ -129,33 +129,19 @@ void tdeio_appInfoProtocol::listDir(const KURL &url) return; } - kdDebug() << "tdeio_appInfoProtocol::listDir: " << "name is " << name << endl; - kdDebug() << "tdeio_appInfoProtocol::listDir: " << "path is " << path << endl; + kdDebug() << "TDEIO_AppInfo::listDir: " << "name is " << name << endl; + kdDebug() << "TDEIO_AppInfo::listDir: " << "path is " << path << endl; // We've been given something like appinfo:/name listAppContents(name); } -void tdeio_appInfoProtocol::listRoot() +void TDEIO_AppInfo::listRoot() { - TDEIO::UDSEntryList system_entries; - bool ok = m_impl.listRoot(system_entries); - if (!ok) - { - error(m_impl.lastErrorCode(), m_impl.lastErrorMessage()); - return; - } - - totalSize(system_entries.count() + 1); - - TDEIO::UDSEntry entry; - m_impl.createTopLevelEntry(entry); - listEntry(entry, false); - listEntries(system_entries); - finished(); + m_impl.listRoot(); } -void tdeio_appInfoProtocol::listAppContents(const TQString &name) +void TDEIO_AppInfo::listAppContents(const TQString &name) { TDEIO::UDSEntryList app_entries; bool ok = m_impl.listAppContents(name, app_entries); |