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.3  2007/04/19 06:17:20  csoutheren
00023  * Fixes for precompiled headers with gcc
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 #ifndef _PTLIB_H
00041 #include <ptlib.h>
00042 #endif
00043 
00044 #include <h224/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   // Only standard client IDs are supported at the moment
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 // __OPAL_H224_H
00096 

Generated on Fri Mar 7 06:33:12 2008 for OPAL by  doxygen 1.5.1