x224.h

Go to the documentation of this file.
00001 /*
00002  * x224.h
00003  *
00004  * X.224 protocol handler
00005  *
00006  * Open H323 Library
00007  *
00008  * Copyright (c) 1998-2001 Equivalence Pty. Ltd.
00009  *
00010  * The contents of this file are subject to the Mozilla Public License
00011  * Version 1.0 (the "License"); you may not use this file except in
00012  * compliance with the License. You may obtain a copy of the License at
00013  * http://www.mozilla.org/MPL/
00014  *
00015  * Software distributed under the License is distributed on an "AS IS"
00016  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
00017  * the License for the specific language governing rights and limitations
00018  * under the License.
00019  *
00020  * The Original Code is Open H323 Library.
00021  *
00022  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
00023  *
00024  * Contributor(s): ______________________________________.
00025  *
00026  * $Log: x224.h,v $
00027  * Revision 2.3  2002/11/10 11:33:17  robertj
00028  * Updated to OpenH323 v1.10.3
00029  *
00030  * Revision 2.2  2002/09/16 02:52:35  robertj
00031  * Added #define so can select if #pragma interface/implementation is used on
00032  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00033  *
00034  * Revision 2.1  2002/09/04 06:01:47  robertj
00035  * Updated to OpenH323 v1.9.6
00036  *
00037  * Revision 2.0  2001/07/27 15:48:24  robertj
00038  * Conversion of OpenH323 to Open Phone Abstraction Library (OPAL)
00039  *
00040  * Revision 1.10  2002/09/16 01:14:15  robertj
00041  * Added #define so can select if #pragma interface/implementation is used on
00042  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00043  *
00044  * Revision 1.9  2002/09/03 06:19:37  robertj
00045  * Normalised the multi-include header prevention ifdef/define symbol.
00046  *
00047  * Revision 1.8  2002/08/05 10:03:47  robertj
00048  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00049  *
00050  * Revision 1.7  2001/02/09 05:16:24  robertj
00051  * Added #pragma interface for GNU C++.
00052  *
00053  * Revision 1.6  2000/05/18 11:53:35  robertj
00054  * Changes to support doc++ documentation generation.
00055  *
00056  * Revision 1.5  2000/05/02 04:32:25  robertj
00057  * Fixed copyright notice comment.
00058  *
00059  * Revision 1.4  1999/08/31 13:30:20  robertj
00060  * Added gatekeeper support.
00061  *
00062  * Revision 1.3  1999/06/09 05:26:20  robertj
00063  * Major restructuring of classes.
00064  *
00065  * Revision 1.2  1999/01/16 11:31:47  robertj
00066  * Fixed name in header comment.
00067  *
00068  * Revision 1.1  1998/12/14 09:13:51  robertj
00069  * Initial revision
00070  *
00071  */
00072 
00073 #ifndef __OPAL_X224_H
00074 #define __OPAL_X224_H
00075 
00076 #ifdef P_USE_PRAGMA
00077 #pragma interface
00078 #endif
00079 
00080 
00081 #include <ptlib/sockets.h>
00082 
00083 
00084 
00086 
00089 class X224 : public PObject
00090 {
00091   PCLASSINFO(X224, PObject)
00092 
00093   public:
00094     enum Codes {
00095       ConnectRequest = 0xe0,
00096       ConnectConfirm = 0xd0,
00097       DataPDU = 0xf0
00098     };
00099 
00100     X224();
00101 
00102     void BuildConnectRequest();
00103     void BuildConnectConfirm();
00104     void BuildData(const PBYTEArray & data);
00105 
00106     void PrintOn(ostream & strm) const;
00107     BOOL Decode(const PBYTEArray & rawData);
00108     BOOL Encode(PBYTEArray & rawData) const;
00109 
00110     int GetCode() const { return header[0]; }
00111     const PBYTEArray & GetData() const { return data; }
00112 
00113   private:
00114     PBYTEArray header;
00115     PBYTEArray data;
00116 };
00117 
00118 
00119 #endif // __OPAL_X224_H
00120 
00121 

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