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 #ifndef OPAL_IAX2_RECEIVER_H
00034 #define OPAL_IAX2_RECEIVER_H
00035
00036 #ifndef _PTLIB_H
00037 #include <ptlib.h>
00038 #endif
00039
00040 #include <opal/buildopts.h>
00041
00042 #if OPAL_IAX2
00043
00044 #include <ptlib/sockets.h>
00045
00046 #ifdef P_USE_PRAGMA
00047 #pragma interface
00048 #endif
00049
00050 class IAX2EndPoint;
00051 class IAX2Frame;
00052 class IAX2FrameList;
00053 class IAX2PacketIdList;
00054
00055 #include <iax2/frame.h>
00056
00060 class IAX2Receiver : public PThread
00061 {
00062 PCLASSINFO(IAX2Receiver, PThread);
00063 public:
00067 IAX2Receiver(IAX2EndPoint & _newEndpoint, PUDPSocket & _newSocket);
00068
00070 ~IAX2Receiver();
00072
00075
00076 virtual void Main();
00077
00082 virtual void Terminate();
00083
00085 PBoolean ReadNetworkSocket();
00086
00095 void AddNewReceivedFrame(IAX2Frame *newFrame);
00096
00098 PINDEX GetSize() { return fromNetworkFrames.GetSize(); }
00099
00101 protected:
00103 IAX2EndPoint &endpoint;
00104
00106 PUDPSocket & sock;
00107
00110 IAX2FrameList fromNetworkFrames;
00111
00113 PBoolean keepGoing;
00114 };
00115
00116
00117 #endif // OPAL_IAX2
00118
00119 #endif // OPAL_IAX2_RECEIVER_H
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129