OPAL  Version 3.14.3
x224.h
Go to the documentation of this file.
1 /*
2  * x224.h
3  *
4  * X.224 protocol handler
5  *
6  * Open H323 Library
7  *
8  * Copyright (c) 1998-2001 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  * $Revision: 29536 $
27  * $Author: rjongbloed $
28  * $Date: 2013-04-19 18:55:15 +1000 (Fri, 19 Apr 2013) $
29  */
30 
31 #ifndef OPAL_T120_X224_H
32 #define OPAL_T120_X224_H
33 
34 #ifdef P_USE_PRAGMA
35 #pragma interface
36 #endif
37 
38 #include <opal_config.h>
39 
40 #include <ptlib/sockets.h>
41 
42 
43 
45 
48 class X224 : public PObject
49 {
50  PCLASSINFO(X224, PObject)
51 
52  public:
53  enum Codes {
56  DataPDU = 0xf0
57  };
58 
59  X224();
60 
61  void BuildConnectRequest();
62  void BuildConnectConfirm();
63  void BuildData(const PBYTEArray & data);
64 
65  void PrintOn(ostream & strm) const;
66  PBoolean Decode(const PBYTEArray & rawData);
67  PBoolean Encode(PBYTEArray & rawData) const;
68 
69  int GetCode() const { return header[0]; }
70  const PBYTEArray & GetData() const { return data; }
71 
72  private:
73  PBYTEArray header;
74  PBYTEArray data;
75 };
76 
77 
78 #endif // OPAL_T120_X224_H
79 
80