1 |
/***************************************************************************
|
2 |
wavchan.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 _WAVCHAN_H
|
26 |
#define _WAVCHAN_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 WavChannel: public PIndirectChannel
|
37 |
{
|
38 |
PCLASSINFO(WavChannel, PIndirectChannel);
|
39 |
H323Connection &myConnection;
|
40 |
PWAVFile wavFile;
|
41 |
PAdaptiveDelay writeDelay;
|
42 |
PAdaptiveDelay readDelay;
|
43 |
public:
|
44 |
WavChannel(const PString & aFileName, H323Connection & aConnection);
|
45 |
~WavChannel();
|
46 |
virtual BOOL Close();
|
47 |
virtual BOOL IsOpen() const;
|
48 |
virtual BOOL Read(void *buf, PINDEX len);
|
49 |
virtual BOOL Write(const void *buf, PINDEX len);
|
50 |
};
|
51 |
|
52 |
|
53 |
#endif
|
54 |
|