transmit.h
Go to the documentation of this file.
/*
*
*
* Inter Asterisk Exchange 2
*
* Class definition for describing the entity that sends all packets
* for all calls
*
* Open Phone Abstraction Library (OPAL)
*
* Copyright (c) 2005 Indranet Technologies Ltd.
*
* 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 Indranet Technologies Ltd.
*
* The author of this code is Derek J Smithies
*
* $Revision: 24606 $
* $Author: dereksmithies $
* $Date: 2010-07-28 22:51:05 -0500 (Wed, 28 Jul 2010) $
*/
#ifndef OPAL_IAX2_TRANSMIT_H
#define OPAL_IAX2_TRANSMIT_H
#ifndef _PTLIB_H
#include <ptlib.h>
#endif
#include <opal/buildopts.h>
#if OPAL_IAX2
#include <ptlib/sockets.h>
#include <iax2/frame.h>
#include <iax2/iax2ep.h>
#ifdef P_USE_PRAGMA
#pragma interface
#endif
class IAX2Transmit : public PThread
{
PCLASSINFO(IAX2Transmit, PThread);
public:
IAX2Transmit(IAX2EndPoint & _newEndpoint, PUDPSocket & _newSocket);
~IAX2Transmit();
virtual void Terminate();
void SendFrame(IAX2Frame *newFrame);
void ProcessLists() { activate.Signal(); }
void AckReceived();
virtual void Main();
void PurgeMatchingFullFrames(IAX2Frame *frame);
void SendVnakRequestedFrames(IAX2FullFrameProtocol &src);
void ReportLists(PString & answer, bool getFullReport=false);
protected:
void ProcessAckingList();
void ProcessSendList();
IAX2EndPoint &ep;
PUDPSocket & sock;
PSyncPoint activate;
IAX2ActiveFrameList ackingFrames;
IAX2ActiveFrameList sendNowFrames;
PBoolean keepGoing;
};
#endif // OPAL_IAX2
#endif // OPAL_IAX2_TRANSMIT_H
/* The comment below is magic for those who use emacs to edit this file.
* With the comment below, the tab key does auto indent to 2 spaces.
*
* Local Variables:
* mode:c
* c-basic-offset:2
* End:
*/
IAX2EndPoint
Definition: iax2ep.h:104
buildopts.h
IAX2Transmit::AckReceived
void AckReceived()
IAX2Transmit::sendNowFrames
IAX2ActiveFrameList sendNowFrames
Definition: transmit.h:145
IAX2Transmit::PurgeMatchingFullFrames
void PurgeMatchingFullFrames(IAX2Frame *frame)
IAX2Transmit
Definition: transmit.h:63
IAX2Transmit::ProcessLists
void ProcessLists()
Definition: transmit.h:94
IAX2Transmit::Main
virtual void Main()
IAX2Transmit::Terminate
virtual void Terminate()
IAX2Transmit::ackingFrames
IAX2ActiveFrameList ackingFrames
Definition: transmit.h:142
IAX2Transmit::keepGoing
PBoolean keepGoing
Definition: transmit.h:148
IAX2FullFrameProtocol
Definition: frame.h:885
frame.h
IAX2Transmit::activate
PSyncPoint activate
Definition: transmit.h:136
iax2ep.h
IAX2Transmit::ep
IAX2EndPoint & ep
Definition: transmit.h:130
IAX2Transmit::SendFrame
void SendFrame(IAX2Frame *newFrame)
IAX2Transmit::sock
PUDPSocket & sock
Definition: transmit.h:133
IAX2ActiveFrameList
Definition: frame.h:1223
IAX2Transmit::ProcessAckingList
void ProcessAckingList()
IAX2Transmit::~IAX2Transmit
~IAX2Transmit()
IAX2Transmit::SendVnakRequestedFrames
void SendVnakRequestedFrames(IAX2FullFrameProtocol &src)
IAX2Frame
Definition: frame.h:75
IAX2Transmit::ReportLists
void ReportLists(PString &answer, bool getFullReport=false)
IAX2Transmit::IAX2Transmit
IAX2Transmit(IAX2EndPoint &_newEndpoint, PUDPSocket &_newSocket)
IAX2Transmit::ProcessSendList
void ProcessSendList()