00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 #ifndef OPAL_IAX2_TRANSMIT_H
00035 #define OPAL_IAX2_TRANSMIT_H
00036
00037 #ifndef _PTLIB_H
00038 #include <ptlib.h>
00039 #endif
00040
00041 #include <opal/buildopts.h>
00042
00043 #if OPAL_IAX2
00044
00045 #include <ptlib/sockets.h>
00046
00047 #include <iax2/frame.h>
00048 #include <iax2/iax2ep.h>
00049
00050 #ifdef P_USE_PRAGMA
00051 #pragma interface
00052 #endif
00053
00063 class IAX2Transmit : public PThread
00064 {
00065 PCLASSINFO(IAX2Transmit, PThread);
00066 public:
00069
00073 IAX2Transmit(IAX2EndPoint & _newEndpoint, PUDPSocket & _newSocket);
00074
00078 ~IAX2Transmit();
00080
00083
00085 virtual void Terminate();
00086
00090 void SendFrame(IAX2Frame *newFrame);
00091
00094 void ProcessLists() { activate.Signal(); }
00095
00099 void AckReceived();
00100
00103 virtual void Main();
00104
00109 void PurgeMatchingFullFrames(IAX2Frame *frame);
00110
00114 void SendVnakRequestedFrames(IAX2FullFrameProtocol &src);
00115
00117 void ReportLists(PString & answer, bool getFullReport=false);
00119
00120 protected:
00121
00124 void ProcessAckingList();
00125
00127 void ProcessSendList();
00128
00130 IAX2EndPoint &ep;
00131
00133 PUDPSocket & sock;
00134
00136 PSyncPoint activate;
00137
00142 IAX2ActiveFrameList ackingFrames;
00143
00145 IAX2ActiveFrameList sendNowFrames;
00146
00148 PBoolean keepGoing;
00149 };
00150
00151
00152 #endif // OPAL_IAX2
00153
00154 #endif // OPAL_IAX2_TRANSMIT_H
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164