OPAL  Version 3.12.9
rtpep.h
Go to the documentation of this file.
1 /*
2  * Endpoint abstraction
3  *
4  * Open Phone Abstraction Library (OPAL)
5  *
6  * Copyright (C) 2007 Post Increment
7  *
8  * The contents of this file are subject to the Mozilla Public License
9  * Version 1.0 (the "License"); you may not use this file except in
10  * compliance with the License. You may obtain a copy of the License at
11  * http://www.mozilla.org/MPL/
12  *
13  * Software distributed under the License is distributed on an "AS IS"
14  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
15  * the License for the specific language governing rights and limitations
16  * under the License.
17  *
18  * The Original Code is Open Phone Abstraction Library.
19  *
20  * The Initial Developer of the Original Code is Post Increment
21  *
22  * Contributor(s): ______________________________________.
23  *
24  * $Revision: 28481 $
25  * $Author: rjongbloed $
26  * $Date: 2012-10-05 18:13:17 +1000 (Fri, 05 Oct 2012) $
27  */
28 
29 #ifndef OPAL_OPAL_RTPEP_H
30 #define OPAL_OPAL_RTPEP_H
31 
32 #ifdef P_USE_PRAGMA
33 #pragma interface
34 #endif
35 
36 #include <opal/buildopts.h>
37 
38 #include <opal/endpoint.h>
39 
40 
45 {
46  PCLASSINFO(OpalRTPEndPoint, OpalEndPoint);
47 
54  const PCaselessString & prefix,
55  unsigned attributes
56  );
57 
60  ~OpalRTPEndPoint();
62 
74  virtual OpalMediaFormatList GetMediaFormats() const;
75 
81  virtual void OnClosedMediaStream(
82  const OpalMediaStream & stream
83  );
85 
105  virtual PBoolean IsRTPNATEnabled(
106  OpalConnection & connection,
107  const PIPSocket::Address & localAddr,
108  const PIPSocket::Address & peerAddr,
109  const PIPSocket::Address & signalAddr,
110  PBoolean incoming
111  );
112 
125  virtual bool OnLocalRTP(
126  OpalConnection & connection1,
127  OpalConnection & connection2,
128  unsigned sessionID,
129  bool opened
130  ) const;
131 
132  // Check for local RTP connection. Internal function.
133  bool CheckForLocalRTP(const OpalRTPMediaStream & stream);
134 
135  // Check for local RTP connection. Internal function.
136  void CheckEndLocalRTP(OpalConnection & connection, OpalRTPSession * rtp);
137 
138  void SetConnectionByRtpLocalPort(OpalRTPSession * rtp, OpalConnection * connection);
140 
141  protected:
142  struct LocalRtpInfo {
143  LocalRtpInfo(OpalConnection & connection) : m_connection(connection), m_previousResult(-1) { }
144 
147  };
148  typedef std::map<OpalTransportAddress, LocalRtpInfo> LocalRtpInfoMap;
151 };
152 
153 
154 #endif // OPAL_OPAL_RTPEP_H