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 #ifndef OPAL_IM_IM_H
00032 #define OPAL_IM_IM_H
00033
00034 #include <ptlib.h>
00035 #include <opal/buildopts.h>
00036
00037 #if OPAL_HAS_IM
00038
00039 #include <opal/mediastrm.h>
00040
00041 #include <im/rfc4103.h>
00042
00043 class OpalIMMediaType : public OpalMediaTypeDefinition
00044 {
00045 public:
00046 OpalIMMediaType(
00047 const char * mediaType,
00048 const char * sdpType,
00049 unsigned preferredSessionId
00050 )
00051 : OpalMediaTypeDefinition(mediaType, sdpType, preferredSessionId, OpalMediaType::DontOffer)
00052 { }
00053
00054 PString GetRTPEncoding() const { return PString::Empty(); }
00055 RTP_UDP * CreateRTPSession(OpalRTPConnection & , unsigned , bool ) { return NULL; }
00056 virtual bool UsesRTP() const { return false; }
00057 };
00058
00059
00060 class OpalIMMediaStream : public OpalMediaStream
00061 {
00062 public:
00063 OpalIMMediaStream(
00064 OpalConnection & conn,
00065 const OpalMediaFormat & mediaFormat,
00066 unsigned sessionID,
00067 bool isSource
00068 );
00069
00070 virtual PBoolean IsSynchronous() const { return false; }
00071 virtual PBoolean RequiresPatchThread() const { return false; }
00072
00073
00074
00075
00076 virtual bool PushIM(const T140String & text);
00077 virtual bool PushIM(RTP_DataFrame & frame);
00078
00079 protected:
00080 RFC4103Context rfc4103;
00081 };
00082
00083
00084 #endif // OPAL_HAS_IM
00085
00086 #endif // OPAL_IM_IM_H