rtpep.h
Go to the documentation of this file.
/*
* Endpoint abstraction
*
* Open Phone Abstraction Library (OPAL)
*
* Copyright (C) 2007 Post Increment
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
* the License for the specific language governing rights and limitations
* under the License.
*
* The Original Code is Open Phone Abstraction Library.
*
* The Initial Developer of the Original Code is Post Increment
*
* Contributor(s): ______________________________________.
*
* $Revision: 25108 $
* $Author: rjongbloed $
* $Date: 2011-02-12 20:32:21 -0600 (Sat, 12 Feb 2011) $
*/
#ifndef OPAL_OPAL_RTPEP_H
#define OPAL_OPAL_RTPEP_H
#ifdef P_USE_PRAGMA
#pragma interface
#endif
#include <opal/buildopts.h>
#include <opal/endpoint.h>
class OpalRTPEndPoint : public OpalEndPoint
{
PCLASSINFO(OpalRTPEndPoint, OpalEndPoint);
OpalRTPEndPoint(
OpalManager & manager,
const PCaselessString & prefix,
unsigned attributes
);
~OpalRTPEndPoint();
virtual OpalMediaFormatList GetMediaFormats() const;
virtual void OnClosedMediaStream(
const OpalMediaStream & stream
);
virtual PBoolean IsRTPNATEnabled(
OpalConnection & connection,
const PIPSocket::Address & localAddr,
const PIPSocket::Address & peerAddr,
const PIPSocket::Address & signalAddr,
PBoolean incoming
);
#ifdef OPAL_ZRTP
virtual bool GetZRTPEnabled() const;
#endif
virtual bool OnLocalRTP(
OpalConnection & connection1,
OpalConnection & connection2,
unsigned sessionID,
bool opened
) const;
// Check for local RTP connection. Internal function.
bool CheckForLocalRTP(const OpalRTPMediaStream & stream);
// Check for local RTP connection. Internal function.
void CheckEndLocalRTP(OpalConnection & connection, RTP_UDP * rtp);
void SetConnectionByRtpLocalPort(RTP_Session * rtp, OpalConnection * connection);
protected:
#ifdef OPAL_ZRTP
bool zrtpEnabled;
#endif
struct LocalRtpInfo {
LocalRtpInfo(OpalConnection & connection) : m_connection(connection), m_previousResult(-1) { }
OpalConnection & m_connection;
int m_previousResult;
};
typedef std::map<WORD, LocalRtpInfo> LocalRtpInfoMap;
LocalRtpInfoMap m_connectionsByRtpLocalPort;
};
#endif // OPAL_OPAL_RTPEP_H
OpalManager
Definition: manager.h:74
OpalEndPoint
Definition: endpoint.h:67
RTP_Session
Definition: rtp.h:502
buildopts.h
OpalRTPEndPoint::LocalRtpInfo::m_previousResult
int m_previousResult
Definition: rtpep.h:154
OpalRTPEndPoint::LocalRtpInfoMap
std::map< WORD, LocalRtpInfo > LocalRtpInfoMap
Definition: rtpep.h:156
OpalRTPMediaStream
Definition: mediastrm.h:548
OpalMediaFormatList
Definition: mediafmt.h:72
OpalRTPEndPoint::m_connectionsByRtpLocalPort
LocalRtpInfoMap m_connectionsByRtpLocalPort
Definition: rtpep.h:157
OpalRTPEndPoint::LocalRtpInfo::m_connection
OpalConnection & m_connection
Definition: rtpep.h:153
OpalEndPoint::manager
OpalManager & manager
Definition: endpoint.h:807
OpalRTPEndPoint::LocalRtpInfo::LocalRtpInfo
LocalRtpInfo(OpalConnection &connection)
Definition: rtpep.h:151
OpalMediaStream
Definition: mediastrm.h:111
OpalConnection
Definition: connection.h:353
endpoint.h
OpalRTPEndPoint
Definition: rtpep.h:44
RTP_UDP
Definition: rtp.h:1098
OpalRTPEndPoint::LocalRtpInfo
Definition: rtpep.h:150