h224.h

Go to the documentation of this file.
00001 /*
00002  * h224.h
00003  *
00004  * H.224 PDU implementation for the OpenH323 Project.
00005  *
00006  * Copyright (c) 2006 Network for Educational Technology, ETH Zurich.
00007  * Written by Hannes Friederich.
00008  *
00009  * The contents of this file are subject to the Mozilla Public License
00010  * Version 1.0 (the "License"); you may not use this file except in
00011  * compliance with the License. You may obtain a copy of the License at
00012  * http://www.mozilla.org/MPL/
00013  *
00014  * Software distributed under the License is distributed on an "AS IS"
00015  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00016  * the License for the specific language governing rights and limitations
00017  * under the License.
00018  *
00019  * Contributor(s): ______________________________________.
00020  *
00021  * $Log: h224.h,v $
00022  * Revision 1.1  2006/06/22 11:07:22  shorne
00023  * Backport of FECC (H.224) from Opal
00024  *
00025  * Revision 1.2  2006/04/23 18:52:19  dsandras
00026  * Removed warnings when compiling with gcc on Linux.
00027  *
00028  * Revision 1.1  2006/04/20 16:48:17  hfriederich
00029  * Initial version of H.224/H.281 implementation.
00030  *
00031  */
00032 
00033 #ifndef __OPAL_H224_H
00034 #define __OPAL_H224_H
00035 
00036 #ifdef P_USE_PRAGMA
00037 #pragma interface
00038 #endif
00039 
00040 #include <ptlib.h>
00041 #include <q922.h>
00042 
00043 #define H224_HEADER_SIZE 6
00044 
00045 #define H224_BROADCAST 0x0000
00046 
00047 class H224_Frame : public Q922_Frame
00048 {
00049   PCLASSINFO(H224_Frame, Q922_Frame);
00050         
00051 public:
00052         
00053   H224_Frame(PINDEX clientDataSize = 254);
00054   ~H224_Frame();
00055         
00056   BOOL IsHighPriority() const { return (GetLowOrderAddressOctet() == 0x71); }
00057   void SetHighPriority(BOOL flag);
00058         
00059   WORD GetDestinationTerminalAddress() const;
00060   void SetDestinationTerminalAddress(WORD destination);
00061         
00062   WORD GetSourceTerminalAddress() const;
00063   void SetSourceTerminalAddress(WORD source);
00064         
00065   // Only standard client IDs are supported at the moment
00066   BYTE GetClientID() const;
00067   void SetClientID(BYTE clientID);
00068         
00069   BOOL GetBS() const;
00070   void SetBS(BOOL bs);
00071         
00072   BOOL GetES() const;
00073   void SetES(BOOL es);
00074         
00075   BOOL GetC1() const;
00076   void SetC1(BOOL c1);
00077         
00078   BOOL GetC0() const;
00079   void SetC0(BOOL c0);
00080         
00081   BYTE GetSegmentNumber() const;
00082   void SetSegmentNumber(BYTE segmentNumber);
00083         
00084   BYTE *GetClientDataPtr() const { return (GetInformationFieldPtr() + H224_HEADER_SIZE); }
00085         
00086   PINDEX GetClientDataSize() const { return (GetInformationFieldSize() - H224_HEADER_SIZE); }
00087   void SetClientDataSize(PINDEX size) { SetInformationFieldSize(size + H224_HEADER_SIZE); }
00088         
00089   BOOL Decode(const BYTE *data, PINDEX size);
00090 };
00091 
00092 #endif // __OPAL_H224_H
00093 

Generated on Wed Feb 6 09:02:21 2008 for OpenH323 by  doxygen 1.5.4