diff options
Diffstat (limited to 'ucb/source/ucp/ftp/ftploaderthread.hxx')
-rw-r--r-- | ucb/source/ucp/ftp/ftploaderthread.hxx | 52 |
1 files changed, 11 insertions, 41 deletions
diff --git a/ucb/source/ucp/ftp/ftploaderthread.hxx b/ucb/source/ucp/ftp/ftploaderthread.hxx index 464016809cad..464c31fd2a35 100644 --- a/ucb/source/ucp/ftp/ftploaderthread.hxx +++ b/ucb/source/ucp/ftp/ftploaderthread.hxx @@ -1,72 +1,42 @@ #ifndef _FTP_FTPLOADERTHREAD_HXX_ #define _FTP_FTPLOADERTHREAD_HXX_ -#ifndef _OSL_MUTEX_HXX_ -#include <osl/mutex.hxx> -#endif #ifndef _OSL_THREAD_H_ #include <osl/thread.h> #endif #ifndef __CURL_TYPES_H #include <curl/types.h> #endif -#ifndef _STL_HASH_SET_INCLUDED_ -#include <hash_set> -#define _STL_HASH_SET_INCLUDED_ -#endif namespace ftp { - - /*forward*/ class FtpLoaderThread; - - class FtpLoaderThreadHash - { - public: - - inline size_t operator()(const FtpLoaderThread& p) const; - - }; // end class FtpLoaderThreadHash - - - - /** - * Purpose of FtpThread - * + /** A loaderthread acts as factory for CURL-handles. + * Owner is a FtpContentProvider-instance */ class FtpLoaderThread { - typedef std::hash_set<FtpLoaderThread,FtpLoaderThreadHash> FtpLoaderThreadSet; - public: - static CURL* curlHandle(); - static void remove(oslThreadIdentifier thread); - FtpLoaderThread(); - FtpLoaderThread(oslThreadIdentifier thread); - FtpLoaderThread(const FtpLoaderThread&); - FtpLoaderThread& operator=(const FtpLoaderThread&); ~FtpLoaderThread(); - /*inline*/ void init() const; - /*inline*/ bool operator==(const FtpLoaderThread& r) const; - /*inline*/ oslThreadIdentifier threadId() const; + CURL* handle(); + private: - /** - * Don't enable assignment and copyconstruction. + /** Don't enable assignment and copyconstruction. + * Not defined: */ - oslThreadIdentifier m_nThreadId; - mutable CURL* m_pHandle; + FtpLoaderThread(const FtpLoaderThread&); + FtpLoaderThread& operator=(const FtpLoaderThread&); + + oslThreadKey m_threadKey; - static osl::Mutex ftploader_mutex; - static FtpLoaderThreadSet ftploaderthread_set; - }; + }; // end class FtpLoaderThread } |