diff options
-rw-r--r-- | comm/Channel.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/comm/Channel.h b/comm/Channel.h index 24ea7e3..1e1e538 100644 --- a/comm/Channel.h +++ b/comm/Channel.h @@ -68,16 +68,16 @@ inline int Write (byte* b, int n) { return write (Fd, (const char*) b, n); } // class UchChannel; typedef void (* CH_HANDLER) (UchChannel *); -class UchMultiplexer; class UchChannel : public CcuSmartData { -friend class UchMultiplexer; +friend class UchBaseMultiplexer; protected: UchFilDes Fd; IOMODE Mode; + UchBaseMultiplexer* Mpx; -virtual void AddNotify (UchMultiplexer&); -virtual void RemoveNotify (UchMultiplexer&); +virtual void Added (UchBaseMultiplexer&); +virtual void Removed (UchBaseMultiplexer&); public: UchChannel (); @@ -102,6 +102,7 @@ inline int FilDes () const { return Fd; } inline int Read (byte* b, int n) { return read (FilDes (), (char*) b, n); } inline int Write (byte* b, int n) { return write (FilDes (), (const char*) b, n); } inline operator int () { return Fd; } +inline UchBaseMultiplexer* GetMultiplexer () const { return Mpx; } inline char* StrRepr (char* s = StrReprBuf) { return Fd.StrRepr (s); } static CH_HANDLER ReadHandler; |