From: Christian P. <cp...@us...> - 2005-04-23 17:47:17
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3585/src/System Modified Files: FdListener.h FdListener.posix.cpp Log Message: - Minor fix Index: FdListener.posix.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/FdListener.posix.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- FdListener.posix.cpp 17 Feb 2005 14:16:29 -0000 1.4 +++ FdListener.posix.cpp 23 Apr 2005 17:47:07 -0000 1.5 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005 by Christian Prochnow * + * Copyright (C) 2005 by Christian Prochnow, SecuLogiX GmbH * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * @@ -251,8 +251,10 @@ l->onError(); } + /* seems a bad idea to reset the flags ... we leave it to the + FdListener for now ... if(flags != l->flags()) - l->setFlags(flags); + l->setFlags(flags);*/ } } } Index: FdListener.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/FdListener.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- FdListener.h 10 Feb 2005 19:13:42 -0000 1.2 +++ FdListener.h 23 Apr 2005 17:47:07 -0000 1.3 @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2005 by Christian Prochnow * + * Copyright (C) 2005 by Christian Prochnow, SecuLogiX GmbH * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * @@ -30,14 +30,19 @@ namespace System { +//! Internal file-descriptor listener for POSIX-systems +/*! + This class is used to listen for asynchronous notifications + on file descriptors. +*/ class PSYSTEM_EXPORT FdListener { public: friend class FdListenerList; enum Flags { - Read = 0x01, - Write = 0x02, - Error = 0x04 + Read = 0x01, /*!< Listen for read notifications */ + Write = 0x02, /*!< Listen for write notifications */ + Error = 0x04 /*!< Listen for error notifications */ }; FdListener(int fd, int flags); @@ -49,8 +54,13 @@ void setFlags(int flags) throw(); protected: + //! Called when data is available for reading virtual void onRead(); + + //! Called when ready for writing virtual void onWrite(); + + //! Called on failure notification virtual void onError(); private: |