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
00035
00036 #ifndef __H323_H224_H
00037 #define __H323_H224_H
00038
00039 #ifdef P_USE_PRAGMA
00040 #pragma interface
00041 #endif
00042
00043 #include <ptlib.h>
00044 #include <q922.h>
00045
00046 #define H224_HEADER_SIZE 6
00047
00048 #define H224_BROADCAST 0x0000
00049
00050 class H224_Frame : public Q922_Frame
00051 {
00052 PCLASSINFO(H224_Frame, Q922_Frame);
00053
00054 public:
00055
00056 H224_Frame(PINDEX clientDataSize = 254);
00057 ~H224_Frame();
00058
00059 BOOL IsHighPriority() const { return (GetLowOrderAddressOctet() == 0x71); }
00060 void SetHighPriority(BOOL flag);
00061
00062 WORD GetDestinationTerminalAddress() const;
00063 void SetDestinationTerminalAddress(WORD destination);
00064
00065 WORD GetSourceTerminalAddress() const;
00066 void SetSourceTerminalAddress(WORD source);
00067
00068
00069 BYTE GetClientID() const;
00070 void SetClientID(BYTE clientID);
00071
00072 BOOL GetBS() const;
00073 void SetBS(BOOL bs);
00074
00075 BOOL GetES() const;
00076 void SetES(BOOL es);
00077
00078 BOOL GetC1() const;
00079 void SetC1(BOOL c1);
00080
00081 BOOL GetC0() const;
00082 void SetC0(BOOL c0);
00083
00084 BYTE GetSegmentNumber() const;
00085 void SetSegmentNumber(BYTE segmentNumber);
00086
00087 BYTE *GetClientDataPtr() const { return (GetInformationFieldPtr() + H224_HEADER_SIZE); }
00088
00089 PINDEX GetClientDataSize() const { return (GetInformationFieldSize() - H224_HEADER_SIZE); }
00090 void SetClientDataSize(PINDEX size) { SetInformationFieldSize(size + H224_HEADER_SIZE); }
00091
00092 BOOL Decode(const BYTE *data, PINDEX size);
00093 };
00094
00095 #endif // __H323_H224_H
00096