From e72624ab203439ffea88cd55c145cdbbc57286e4 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Nov 2011 17:00:03 -0800 Subject: Adding a potential event to cancel a forced read/write, such as a timeout. --- includes/Handle.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'includes/Handle.h') diff --git a/includes/Handle.h b/includes/Handle.h index cfb004d..0eea93c 100644 --- a/includes/Handle.h +++ b/includes/Handle.h @@ -20,6 +20,12 @@ class IOBase; template class IO; +namespace Events { + +class BaseEvent; + +}; + class Handle { public: virtual ~Handle() { Assert(m_refCount == 0); } @@ -42,8 +48,8 @@ class Handle { virtual off_t wtell() throw (GeneralException); virtual off_t getSize(); virtual time_t getMTime(); - ssize_t forceRead(void * buf, size_t count) throw (GeneralException); - ssize_t forceWrite(const void * buf, size_t count) throw (GeneralException); + ssize_t forceRead(void * buf, size_t count, Events::BaseEvent * evt = NULL) throw (GeneralException); + ssize_t forceWrite(const void * buf, size_t count, Events::BaseEvent * evt = NULL) throw (GeneralException); protected: Handle() : m_refCount(0) { } private: -- cgit v1.2.3