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-2000 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 1.10  2002/09/16 01:14:15  robertj
00028  * Added #define so can select if #pragma interface/implementation is used on
00029  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
00030  *
00031  * Revision 1.9  2002/09/03 06:19:37  robertj
00032  * Normalised the multi-include header prevention ifdef/define symbol.
00033  *
00034  * Revision 1.8  2002/08/05 10:03:47  robertj
00035  * Cosmetic changes to normalise the usage of pragma interface/implementation.
00036  *
00037  * Revision 1.7  2001/02/09 05:16:24  robertj
00038  * Added #pragma interface for GNU C++.
00039  *
00040  * Revision 1.6  2000/05/18 11:53:35  robertj
00041  * Changes to support doc++ documentation generation.
00042  *
00043  * Revision 1.5  2000/05/02 04:32:25  robertj
00044  * Fixed copyright notice comment.
00045  *
00046  * Revision 1.4  1999/08/31 13:30:20  robertj
00047  * Added gatekeeper support.
00048  *
00049  * Revision 1.3  1999/06/09 05:26:20  robertj
00050  * Major restructuring of classes.
00051  *
00052  * Revision 1.2  1999/01/16 11:31:47  robertj
00053  * Fixed name in header comment.
00054  *
00055  * Revision 1.1  1998/12/14 09:13:51  robertj
00056  * Initial revision
00057  *
00058  */
00059 
00060 #ifndef __OPAL_X224_H
00061 #define __OPAL_X224_H
00062 
00063 #ifdef P_USE_PRAGMA
00064 #pragma interface
00065 #endif
00066 
00067 
00068 #include <ptlib/sockets.h>
00069 
00070 
00071 
00073 
00076 class X224 : public PObject
00077 {
00078   PCLASSINFO(X224, PObject)
00079 
00080   public:
00081     enum Codes {
00082       ConnectRequest = 0xe0,
00083       ConnectConfirm = 0xd0,
00084       DataPDU = 0xf0
00085     };
00086 
00087     X224();
00088 
00089     void BuildConnectRequest();
00090     void BuildConnectConfirm();
00091     void BuildData(const PBYTEArray & data);
00092 
00093     void PrintOn(ostream & strm) const;
00094     BOOL Decode(const PBYTEArray & rawData);
00095     BOOL Encode(PBYTEArray & rawData) const;
00096 
00097     int GetCode() const { return header[0]; }
00098     const PBYTEArray & GetData() const { return data; }
00099 
00100   private:
00101     PBYTEArray header;
00102     PBYTEArray data;
00103 };
00104 
00105 
00106 #endif // __OPAL_X224_H
00107 
00108 

Generated on Sat Sep 23 04:15:28 2006 for OpenH323 by  doxygen 1.4.7