Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IOCPIoTimeoutManager.h

Go to the documentation of this file.
00001 /*  IoTimeoutManager.h - IO timeout manager using IOCP
00002     Copyright (C) 2001-2004 Mark Weaver
00003     Written by Mark Weaver <mark@npsl.co.uk>
00004 
00005     Part of the Open-Win32 library.
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public
00017     License along with this library; if not, write to the
00018     Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA  02111-1307, USA.
00020 */
00021 
00026 #ifndef OW32_IOCPIoTimeoutManager_h
00027 #define OW32_IOCPIoTimeoutManager_h
00028 
00029 #include <OW32/IoTimeoutManager.h>
00030 
00031 #if _WIN32_WINNT < 0x0400
00032 #error This class requires waitable timer objects
00033 #endif
00034 
00035 namespace OW32
00036 {
00037 
00038 #ifdef _MSC_VER
00039 #pragma warning(disable: 4251)
00040 #endif
00041 
00045 class CAsyncIoCompletionSocket;
00046 
00050 class OW32_LIB_EXPORT CIOCPIoTimeoutManager : public CIoTimeoutManager
00051 {
00052 public:
00056     CIOCPIoTimeoutManager();
00057 
00061     ~CIOCPIoTimeoutManager();
00062 
00078     virtual bool addTimeout(CIoTimeoutCallback *pCallback, LPVOID key, __int64 after, bool *fUpdated = NULL);
00079 
00090     virtual bool updateTimeout(CIoTimeoutCallback *pCallback, LPVOID key, __int64 after, bool *fUpdated = NULL);
00091 
00099     virtual bool removeTimeout(LPVOID key);
00100 
00111     virtual void drainTimeouts(CIoTimeoutDrainCallback *pCallback);
00112 
00118     bool addTimeout(CAsyncIoCompletionSocket *pSocket);
00119 
00125     bool updateTimeout(CAsyncIoCompletionSocket *pSocket);
00126 
00132     void removeTimeout(CAsyncIoCompletionSocket *pSocket);
00133 
00139     virtual bool shutdown();
00140 
00147     bool initialise(HANDLE hCompletionPort);
00148 
00149 private:
00151     CIOCPIoTimeoutManager(const CIOCPIoTimeoutManager &other);
00152     CIOCPIoTimeoutManager &operator=(const CIOCPIoTimeoutManager &other);
00153 
00155     class   Impl;
00156     Impl    *m_impl;
00157 };
00158 
00159 #ifdef _MSC_VER
00160 #pragma warning(default: 4251)
00161 #endif
00162 
00163 } // namespace OW32
00164 
00165 #endif // OW32_IOCPIoTimeoutManager_h

Generated on Sun Jun 5 01:29:17 2005 for OW32 by  doxygen 1.3.9.1