D:/Storage/CVS_Head/h323plus/include/x224.h

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

Generated on Thu Oct 25 13:42:37 2007 for h323plus by  doxygen 1.5.2