| 1 | /*************************************************************************** | 
| 2 | nullchan.h | 
| 3 | |
| 4 | Copyright (c) 2002-2003 Vladimir Toncar | 
| 5 | |
| 6 | The contents of this file are subject to the Mozilla Public License | 
| 7 | Version 1.1 (the "License"); you may not use this file except in | 
| 8 | compliance with the License. You may obtain a copy of the License at | 
| 9 | http://www.mozilla.org/MPL/ | 
| 10 | |
| 11 | Software distributed under the License is distributed on an "AS IS" | 
| 12 | basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. | 
| 13 | See the License for the specific language governing rights and | 
| 14 | limitations under the License. | 
| 15 | |
| 16 | The Original Code is oh323tut. | 
| 17 | |
| 18 | The Initial Developer of the Original Code is Vladimir Toncar. | 
| 19 | All Rights Reserved. | 
| 20 | |
| 21 | Contributor(s): ______________________________________. | 
| 22 | |
| 23 | ***************************************************************************/ | 
| 24 | |
| 25 | #ifndef _NULLCHAN_H | 
| 26 | #define _NULLCHAN_H | 
| 27 | |
| 28 | #include <ptlib.h> | 
| 29 | #include <h323.h> | 
| 30 | #include <ptclib/pwavfile.h> | 
| 31 | #include <ptclib/delaychan.h> | 
| 32 | |
| 33 | |
| 34 | // *********************************************************************** | 
| 35 | |
| 36 | class NullChannel: public PIndirectChannel | 
| 37 | { | 
| 38 | PCLASSINFO(NullChannel, PIndirectChannel); | 
| 39 | PAdaptiveDelay writeDelay; | 
| 40 | PAdaptiveDelay readDelay; | 
| 41 | bool isOpen; | 
| 42 | public: | 
| 43 | NullChannel(); | 
| 44 | ~NullChannel(); | 
| 45 | virtual BOOL Close(); | 
| 46 | virtual BOOL IsOpen() const { return isOpen; }; | 
| 47 | virtual BOOL Read(void *buf, PINDEX len); | 
| 48 | virtual BOOL Write(const void *buf, PINDEX len); | 
| 49 | }; | 
| 50 | |
| 51 | |
| 52 | #endif | 
| 53 |