OPAL  Version 3.10.4
iax2medstrm.h
Go to the documentation of this file.
1 /*
2  *
3  * Inter Asterisk Exchange 2
4  *
5  * Open Phone Abstraction Library (OPAL)
6  *
7  * Extension of the Opal Media stream, where the media from the IAX2 side is
8  * linked to the OPAL
9  *
10  * Copyright (c) 2005 Indranet Technologies Ltd.
11  *
12  * The contents of this file are subject to the Mozilla Public License
13  * Version 1.0 (the "License"); you may not use this file except in
14  * compliance with the License. You may obtain a copy of the License at
15  * http://www.mozilla.org/MPL/
16  *
17  * Software distributed under the License is distributed on an "AS IS"
18  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
19  * the License for the specific language governing rights and limitations
20  * under the License.
21  *
22  * The Original Code is Open Phone Abstraction Library.
23  *
24  * The Initial Developer of the Original Code is Indranet Technologies Ltd.
25  *
26  * The author of this code is Derek J Smithies
27  *
28  * $Revision: 24606 $
29  * $Author: dereksmithies $
30  * $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $
31  */
32 
33 #ifndef OPAL_IAX2_MEDIASTRM_H
34 #define OPAL_IAX2_MEDIASTRM_H
35 
36 #ifdef P_USE_PRAGMA
37 #pragma interface
38 #endif
39 
40 #include <opal/buildopts.h>
41 
42 #if OPAL_IAX2
43 
44 #include <opal/mediafmt.h>
45 #include <iax2/iax2con.h>
46 
47 class RTP_Session;
48 class OpalMediaPatch;
49 class OpalLine;
50 
51 
56 {
64  IAX2Connection &con,
66  unsigned sessionID,
67  PBoolean isSource
68  );
73 
74 
75 
76  public:
83  virtual PBoolean Open();
84 
90  virtual PBoolean Start();
91 
96  virtual PBoolean Close();
97 
103  virtual PBoolean ReadPacket(
104  RTP_DataFrame & packet
105  );
106 
110  virtual PBoolean WriteData(
111  const BYTE * data,
112  PINDEX length,
113  PINDEX & written
114  );
115 
120  virtual PBoolean IsSynchronous() const;
121 
123 
124  protected:
127 
131  PBYTEArray pendingData;
132 };
133 
134 
135 #endif // OPAL_IAX2
136 
137 #endif // OPAL_IAX2_MEDIASTRM_H
138 
139 /* The comment below is magic for those who use emacs to edit this file.
140  * With the comment below, the tab key does auto indent to 2 spaces.
141  *
142  * Local Variables:
143  * mode:c
144  * c-basic-offset:2
145  * End:
146  */