diff options
Diffstat (limited to 'src/kiosvn')
-rw-r--r-- | src/kiosvn/kiobytestream.h | 6 | ||||
-rw-r--r-- | src/kiosvn/kiolistener.cpp | 6 | ||||
-rw-r--r-- | src/kiosvn/kiolistener.h | 6 | ||||
-rw-r--r-- | src/kiosvn/kiosvn.cpp | 70 | ||||
-rw-r--r-- | src/kiosvn/kiosvn.h | 8 |
5 files changed, 48 insertions, 48 deletions
diff --git a/src/kiosvn/kiobytestream.h b/src/kiosvn/kiobytestream.h index 808277c..ce22af5 100644 --- a/src/kiosvn/kiobytestream.h +++ b/src/kiosvn/kiobytestream.h @@ -33,7 +33,7 @@ class StreamWrittenCb public: StreamWrittenCb(){} virtual ~StreamWrittenCb(){} - virtual void streamWritten(const KIO::filesize_t current) = 0; + virtual void streamWritten(const TDEIO::filesize_t current) = 0; virtual void streamPushData(TQByteArray)=0; virtual void streamSendMime(KMimeMagicResult*mt)=0; virtual void streamTotalSizeNull()=0; @@ -52,11 +52,11 @@ public: virtual bool isOk() const; virtual long write(const char* data, const unsigned long max); - KIO::filesize_t written(){return m_Written;} + TDEIO::filesize_t written(){return m_Written;} protected: StreamWrittenCb*m_Cb; - KIO::filesize_t m_Written; + TDEIO::filesize_t m_Written; bool m_mimeSend; TQString m_Filename; TQByteArray array; diff --git a/src/kiosvn/kiolistener.cpp b/src/kiosvn/kiolistener.cpp index 16ff6e4..e270c21 100644 --- a/src/kiosvn/kiolistener.cpp +++ b/src/kiosvn/kiolistener.cpp @@ -24,9 +24,9 @@ #include <klocale.h> #include <dcopclient.h> -namespace KIO { +namespace TDEIO { -KioListener::KioListener(KIO::kio_svnProtocol*_par) +KioListener::KioListener(TDEIO::kio_svnProtocol*_par) : svn::ContextListener(),m_notifyCounter(0),m_External(false),m_HasChanges(false),m_FirstTxDelta(false),m_Canceld(false) { par = _par; @@ -405,4 +405,4 @@ void KioListener::contextProgress(long long int cur, long long int max) } } -} // namespace KIO +} // namespace TDEIO diff --git a/src/kiosvn/kiolistener.h b/src/kiosvn/kiolistener.h index ffb2b04..8156b43 100644 --- a/src/kiosvn/kiolistener.h +++ b/src/kiosvn/kiolistener.h @@ -23,7 +23,7 @@ #include "context_listener.hpp" #include "pwstorage.h" -namespace KIO { +namespace TDEIO { class SlaveBase; class kio_svnProtocol; @@ -33,7 +33,7 @@ namespace KIO { class KioListener : public svn::ContextListener { public: - KioListener(KIO::kio_svnProtocol*_par); + KioListener(TDEIO::kio_svnProtocol*_par); virtual ~KioListener(); /* context-listener methods */ @@ -69,7 +69,7 @@ public: void setCancel(bool value){m_Canceld=value;} private: - KIO::kio_svnProtocol *par; + TDEIO::kio_svnProtocol *par; protected: unsigned int m_notifyCounter; diff --git a/src/kiosvn/kiosvn.cpp b/src/kiosvn/kiosvn.cpp index 45c2c0d..dfae81b 100644 --- a/src/kiosvn/kiosvn.cpp +++ b/src/kiosvn/kiosvn.cpp @@ -62,7 +62,7 @@ #include <netinet/in.h> #include <netdb.h> -namespace KIO +namespace TDEIO { class KioSvnData @@ -173,14 +173,14 @@ int kdemain(int argc, char **argv) exit(-1); } - KIO::kio_svnProtocol slave(argv[2], argv[3]); + TDEIO::kio_svnProtocol slave(argv[2], argv[3]); slave.dispatchLoop(); kdDebug(7101) << "*** kio_ksvn Done" << endl; return 0; } -namespace KIO +namespace TDEIO { /*! \fn kio_svnProtocol::listDir (const KURL&url) @@ -199,10 +199,10 @@ void kio_svnProtocol::listDir(const KURL&url) } catch (const svn::ClientException&e) { TQString ex = e.msg(); kdDebug()<<ex<<endl; - error(KIO::ERR_CANNOT_ENTER_DIRECTORY,ex); + error(TDEIO::ERR_CANNOT_ENTER_DIRECTORY,ex); return; } - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; totalSize(dlist.size()); for (unsigned int i=0; i < dlist.size();++i) { if (!dlist[i] || dlist[i]->name().isEmpty()) { @@ -238,7 +238,7 @@ void kio_svnProtocol::stat(const KURL& url) } catch (const svn::ClientException&e) { TQString ex = e.msg(); kdDebug()<<ex<<endl; - error( KIO::ERR_SLAVE_DEFINED,ex); + error( TDEIO::ERR_SLAVE_DEFINED,ex); return; } @@ -248,7 +248,7 @@ void kio_svnProtocol::stat(const KURL& url) return;*/ } - KIO::UDSEntry entry; + TDEIO::UDSEntry entry; TQDateTime dt; if (dummy) { createUDSEntry(url.filename(),"",0,true,dt.toTime_t(),entry); @@ -281,7 +281,7 @@ void kio_svnProtocol::get(const KURL& url) } catch (const svn::ClientException&e) { TQString ex = e.msg(); kdDebug()<<ex<<endl; - error( KIO::ERR_SLAVE_DEFINED,"Subversion error "+ex); + error( TDEIO::ERR_SLAVE_DEFINED,"Subversion error "+ex); finished(); return; } @@ -301,7 +301,7 @@ void kio_svnProtocol::mkdir(const KURL &url, int) svn::Path p(makeSvnUrl(url)); m_pData->m_Svnclient->mkdir(p,getDefaultLog()); }catch (const svn::ClientException&e) { - error( KIO::ERR_SLAVE_DEFINED,e.msg()); + error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } kdDebug()<<"kio_svn::mkdir finished " << url << endl; finished(); @@ -316,7 +316,7 @@ void kio_svnProtocol::mkdir(const KURL::List &urls, int) try { m_pData->m_Svnclient->mkdir(svn::Targets(p),getDefaultLog()); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } finished(); @@ -330,7 +330,7 @@ void kio_svnProtocol::rename(const KURL&src,const KURL&target,bool force) try { m_pData->m_Svnclient->move(makeSvnUrl(src),makeSvnUrl(target),force); }catch (const svn::ClientException&e) { - error( KIO::ERR_SLAVE_DEFINED,e.msg()); + error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } kdDebug()<<"kio_svn::rename finished" << endl; finished(); @@ -350,7 +350,7 @@ void kio_svnProtocol::copy(const KURL&src,const KURL&dest,int permissions,bool o try { m_pData->m_Svnclient->copy(makeSvnUrl(src),rev,makeSvnUrl(dest)); }catch (const svn::ClientException&e) { - error( KIO::ERR_SLAVE_DEFINED,e.msg()); + error( TDEIO::ERR_SLAVE_DEFINED,e.msg()); } m_pData->dispProgress=false; kdDebug()<<"kio_svn::copy finished" << endl; @@ -373,7 +373,7 @@ void kio_svnProtocol::del(const KURL&src,bool isfile) } catch (const svn::ClientException&e) { TQString ex = e.msg(); kdDebug()<<ex<<endl; - error( KIO::ERR_SLAVE_DEFINED,ex); + error( TDEIO::ERR_SLAVE_DEFINED,ex); } kdDebug()<<"kio_svn::del finished" << endl; finished(); @@ -430,7 +430,7 @@ TQString kio_svnProtocol::makeSvnUrl(const KURL&url,bool check_Wc) return res; } -bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry) +bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, TDEIO::UDSEntry& entry) { #if 0 kdDebug() << "MTime : " << ( long )mtime << endl; @@ -438,29 +438,29 @@ bool kio_svnProtocol::createUDSEntry( const TQString& filename, const TQString& kdDebug()<< "UDS Size: " << size << endl; kdDebug()<< "UDS Dir: " << isdir << endl; #endif - KIO::UDSAtom atom; - atom.m_uds = KIO::UDS_NAME; + TDEIO::UDSAtom atom; + 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 = isdir?0777:0666; entry.append(atom); - atom.m_uds = KIO::UDS_SIZE; + atom.m_uds = TDEIO::UDS_SIZE; atom.m_long = size; entry.append( atom ); - atom.m_uds = KIO::UDS_MODIFICATION_TIME; + atom.m_uds = TDEIO::UDS_MODIFICATION_TIME; atom.m_long = mtime; entry.append( atom ); - atom.m_uds = KIO::UDS_USER; + atom.m_uds = TDEIO::UDS_USER; atom.m_str = user; entry.append( atom ); @@ -649,7 +649,7 @@ void kio_svnProtocol::update(const KURL&url,int revnumber,const TQString&revkind // sticky depth (last parameter) m_pData->m_Svnclient->update(pathes, where,svn::DepthInfinity,false,false,true); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); } } @@ -661,7 +661,7 @@ void kio_svnProtocol::status(const KURL&wc,bool cR,bool rec) // rec all up noign dlist = m_pData->m_Svnclient->status(wc.path(),rec?svn::DepthInfinity:svn::DepthEmpty,false,cR,false,where); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } kdDebug()<<"Status got " << dlist.count() << " entries." << endl; @@ -719,7 +719,7 @@ void kio_svnProtocol::commit(const KURL::List&url) try { nnum = m_pData->m_Svnclient->commit(svn::Targets(targets),msg,svn::DepthInfinity,false); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); } for (unsigned j=0;j<url.count();++j) { TQString userstring; @@ -749,7 +749,7 @@ void kio_svnProtocol::checkout(const KURL&src,const KURL&target,const int rev, c KURL _src = makeSvnUrl(src); m_pData->m_Svnclient->checkout(_src.url(),_target,where,peg,svn::DepthInfinity,false,false); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); } } @@ -764,7 +764,7 @@ void kio_svnProtocol::svnlog(int revstart,const TQString&revstringstart,int reve try { logs = m_pData->m_Svnclient->log(makeSvnUrl(urls[j]),start,end,svn::Revision::UNDEFINED,true,true,0); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); break; } if (!logs) { @@ -811,7 +811,7 @@ void kio_svnProtocol::revert(const KURL::List&l) try { m_pData->m_Svnclient->revert(target,svn::DepthEmpty); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); } } @@ -822,7 +822,7 @@ void kio_svnProtocol::wc_switch(const KURL&wc,const KURL&target,bool rec,int rev try { m_pData->m_Svnclient->doSwitch(wc_path,makeSvnUrl(target.url()),where,rec?svn::DepthInfinity:svn::DepthFiles); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); } } @@ -844,7 +844,7 @@ void kio_svnProtocol::diff(const KURL&uri1,const KURL&uri2,int rnum1,const TQStr ex = m_pData->m_Svnclient->diff(svn::Path(tdir.name()), u1,u2,svn::Path(),r1, r2,rec?svn::DepthInfinity:svn::DepthEmpty,false,false,false); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } TQString out = TQString::FROMUTF8(ex); @@ -862,7 +862,7 @@ void kio_svnProtocol::import(const KURL& repos, const KURL& wc) TQString path = wc.path(); m_pData->m_Svnclient->import(svn::Path(path),target,TQString(),svn::DepthInfinity,false,false); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } finished(); @@ -875,7 +875,7 @@ void kio_svnProtocol::add(const KURL& wc) /* rec */ m_pData->m_Svnclient->add(svn::Path(path),svn::DepthInfinity); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } finished(); @@ -890,7 +890,7 @@ void kio_svnProtocol::wc_delete(const KURL::List&l) try { m_pData->m_Svnclient->remove(svn::Targets(p),false); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } finished(); @@ -902,13 +902,13 @@ void kio_svnProtocol::wc_resolve(const KURL&url,bool recurse) svn::Depth depth=recurse?svn::DepthInfinity:svn::DepthEmpty; m_pData->m_Svnclient->resolve(url.path(),depth); } catch (const svn::ClientException&e) { - error(KIO::ERR_SLAVE_DEFINED,e.msg()); + error(TDEIO::ERR_SLAVE_DEFINED,e.msg()); return; } finished(); } -void kio_svnProtocol::streamWritten(const KIO::filesize_t current) +void kio_svnProtocol::streamWritten(const TDEIO::filesize_t current) { processedSize(current); } @@ -951,4 +951,4 @@ TQString kio_svnProtocol::getDefaultLog() return res; } -} // namespace KIO +} // namespace TDEIO diff --git a/src/kiosvn/kiosvn.h b/src/kiosvn/kiosvn.h index 5132a4e..413a6a5 100644 --- a/src/kiosvn/kiosvn.h +++ b/src/kiosvn/kiosvn.h @@ -33,7 +33,7 @@ #include <sys/stat.h> #include <tqvaluelist.h> -namespace KIO +namespace TDEIO { class KioSvnData; @@ -41,7 +41,7 @@ class KioSvnData; /** @author Rajko Albrecht */ -class kio_svnProtocol : public KIO::SlaveBase,public StreamWrittenCb +class kio_svnProtocol : public TDEIO::SlaveBase,public StreamWrittenCb { public: kio_svnProtocol(const TQCString &pool_socket, const TQCString &app_socket); @@ -95,7 +95,7 @@ public: }; void contextProgress(long long int current, long long int max); - virtual void streamWritten(const KIO::filesize_t current); + virtual void streamWritten(const TDEIO::filesize_t current); virtual void streamPushData(TQByteArray); virtual void streamSendMime(KMimeMagicResult*mt); virtual void streamTotalSizeNull(); @@ -107,7 +107,7 @@ protected: private: KioSvnData*m_pData; - bool createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, KIO::UDSEntry& entry); + bool createUDSEntry( const TQString& filename, const TQString& user, long long int size, bool isdir, time_t mtime, TDEIO::UDSEntry& entry); TQString makeSvnUrl(const KURL&url,bool check_wc=true); bool checkWc(const KURL&url); bool getLogMsg(TQString&); |