OSDN Git Service

Add MS7619SE
[uclinux-h8/uClinux-dist.git] / lib / libopenh323 / include / x224.h
1 /*
2  * x224.h
3  *
4  * X.224 protocol handler
5  *
6  * Open H323 Library
7  *
8  * Copyright (c) 1998-2000 Equivalence Pty. Ltd.
9  *
10  * The contents of this file are subject to the Mozilla Public License
11  * Version 1.0 (the "License"); you may not use this file except in
12  * compliance with the License. You may obtain a copy of the License at
13  * http://www.mozilla.org/MPL/
14  *
15  * Software distributed under the License is distributed on an "AS IS"
16  * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
17  * the License for the specific language governing rights and limitations
18  * under the License.
19  *
20  * The Original Code is Open H323 Library.
21  *
22  * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
23  *
24  * Contributor(s): ______________________________________.
25  *
26  * $Log: x224.h,v $
27  * Revision 1.10  2002/09/16 01:14:15  robertj
28  * Added #define so can select if #pragma interface/implementation is used on
29  *   platform basis (eg MacOS) rather than compiler, thanks Robert Monaghan.
30  *
31  * Revision 1.9  2002/09/03 06:19:37  robertj
32  * Normalised the multi-include header prevention ifdef/define symbol.
33  *
34  * Revision 1.8  2002/08/05 10:03:47  robertj
35  * Cosmetic changes to normalise the usage of pragma interface/implementation.
36  *
37  * Revision 1.7  2001/02/09 05:16:24  robertj
38  * Added #pragma interface for GNU C++.
39  *
40  * Revision 1.6  2000/05/18 11:53:35  robertj
41  * Changes to support doc++ documentation generation.
42  *
43  * Revision 1.5  2000/05/02 04:32:25  robertj
44  * Fixed copyright notice comment.
45  *
46  * Revision 1.4  1999/08/31 13:30:20  robertj
47  * Added gatekeeper support.
48  *
49  * Revision 1.3  1999/06/09 05:26:20  robertj
50  * Major restructuring of classes.
51  *
52  * Revision 1.2  1999/01/16 11:31:47  robertj
53  * Fixed name in header comment.
54  *
55  * Revision 1.1  1998/12/14 09:13:51  robertj
56  * Initial revision
57  *
58  */
59
60 #ifndef __OPAL_X224_H
61 #define __OPAL_X224_H
62
63 #ifdef P_USE_PRAGMA
64 #pragma interface
65 #endif
66
67
68 #include <ptlib/sockets.h>
69
70
71
72 ///////////////////////////////////////////////////////////////////////////////
73
74 /**This class embodies X.224 Class Zero Protocol Data Unit.
75   */
76 class X224 : public PObject
77 {
78   PCLASSINFO(X224, PObject)
79
80   public:
81     enum Codes {
82       ConnectRequest = 0xe0,
83       ConnectConfirm = 0xd0,
84       DataPDU = 0xf0
85     };
86
87     X224();
88
89     void BuildConnectRequest();
90     void BuildConnectConfirm();
91     void BuildData(const PBYTEArray & data);
92
93     void PrintOn(ostream & strm) const;
94     BOOL Decode(const PBYTEArray & rawData);
95     BOOL Encode(PBYTEArray & rawData) const;
96
97     int GetCode() const { return header[0]; }
98     const PBYTEArray & GetData() const { return data; }
99
100   private:
101     PBYTEArray header;
102     PBYTEArray data;
103 };
104
105
106 #endif // __OPAL_X224_H
107
108
109 /////////////////////////////////////////////////////////////////////////////