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  * $Revision: 19279 $
00022  * $Author: rjongbloed $
00023  * $Date: 2008-01-17 04:08:34 +0000 (Thu, 17 Jan 2008) $
00024  */
00025 
00026 #ifndef __OPAL_H224_H
00027 #define __OPAL_H224_H
00028 
00029 #ifdef P_USE_PRAGMA
00030 #pragma interface
00031 #endif
00032 
00033 #ifndef _PTLIB_H
00034 #include <ptlib.h>
00035 #endif
00036 
00037 #include <h224/q922.h>
00038 
00039 #define H224_HEADER_SIZE 6
00040 
00041 #define H224_BROADCAST 0x0000
00042 
00043 class H224_Frame : public Q922_Frame
00044 {
00045   PCLASSINFO(H224_Frame, Q922_Frame);
00046         
00047 public:
00048         
00049   H224_Frame(PINDEX clientDataSize = 254);
00050   ~H224_Frame();
00051         
00052   PBoolean IsHighPriority() const { return (GetLowOrderAddressOctet() == 0x71); }
00053   void SetHighPriority(PBoolean flag);
00054         
00055   WORD GetDestinationTerminalAddress() const;
00056   void SetDestinationTerminalAddress(WORD destination);
00057         
00058   WORD GetSourceTerminalAddress() const;
00059   void SetSourceTerminalAddress(WORD source);
00060         
00061   // Only standard client IDs are supported at the moment
00062   BYTE GetClientID() const;
00063   void SetClientID(BYTE clientID);
00064         
00065   PBoolean GetBS() const;
00066   void SetBS(PBoolean bs);
00067         
00068   PBoolean GetES() const;
00069   void SetES(PBoolean es);
00070         
00071   PBoolean GetC1() const;
00072   void SetC1(PBoolean c1);
00073         
00074   PBoolean GetC0() const;
00075   void SetC0(PBoolean c0);
00076         
00077   BYTE GetSegmentNumber() const;
00078   void SetSegmentNumber(BYTE segmentNumber);
00079         
00080   BYTE *GetClientDataPtr() const { return (GetInformationFieldPtr() + H224_HEADER_SIZE); }
00081         
00082   PINDEX GetClientDataSize() const { return (GetInformationFieldSize() - H224_HEADER_SIZE); }
00083   void SetClientDataSize(PINDEX size) { SetInformationFieldSize(size + H224_HEADER_SIZE); }
00084         
00085   PBoolean Decode(const BYTE *data, PINDEX size);
00086 };
00087 
00088 #endif // __OPAL_H224_H
00089 

Generated on Fri Mar 7 07:36:10 2008 for OPAL by  doxygen 1.5.1