OPAL
Version 3.10.4
|
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 * $Revision: 21293 $ 00027 * $Author: rjongbloed $ 00028 * $Date: 2008-10-12 18:24:41 -0500 (Sun, 12 Oct 2008) $ 00029 */ 00030 00031 #ifndef OPAL_T120_X224_H 00032 #define OPAL_T120_X224_H 00033 00034 #ifdef P_USE_PRAGMA 00035 #pragma interface 00036 #endif 00037 00038 #include <opal/buildopts.h> 00039 00040 #include <ptlib/sockets.h> 00041 00042 00043 00045 00048 class X224 : public PObject 00049 { 00050 PCLASSINFO(X224, PObject) 00051 00052 public: 00053 enum Codes { 00054 ConnectRequest = 0xe0, 00055 ConnectConfirm = 0xd0, 00056 DataPDU = 0xf0 00057 }; 00058 00059 X224(); 00060 00061 void BuildConnectRequest(); 00062 void BuildConnectConfirm(); 00063 void BuildData(const PBYTEArray & data); 00064 00065 void PrintOn(ostream & strm) const; 00066 PBoolean Decode(const PBYTEArray & rawData); 00067 PBoolean Encode(PBYTEArray & rawData) const; 00068 00069 int GetCode() const { return header[0]; } 00070 const PBYTEArray & GetData() const { return data; } 00071 00072 private: 00073 PBYTEArray header; 00074 PBYTEArray data; 00075 }; 00076 00077 00078 #endif // OPAL_T120_X224_H 00079 00080