OPAL  Version 3.14.3
h501pdu.h
Go to the documentation of this file.
1 /*
2  * h501pdu.h
3  *
4  * H.501 protocol handler
5  *
6  * Open H323 Library
7  *
8  * Copyright (c) 2003 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_H323_H501PDU_H
32 #define OPAL_H323_H501PDU_H
33 
34 #ifdef P_USE_PRAGMA
35 #pragma interface
36 #endif
37 
38 #include <opal_config.h>
39 
40 #if OPAL_H501
41 
42 #include <ptlib/sockets.h>
43 
44 #include <h323/transaddr.h>
45 #include <h323/h323trans.h>
46 #include <asn/h501.h>
47 
48 
49 class H323_AnnexG;
50 
51 
54 class H501PDU : public H501_Message, public H323TransactionPDU
55 {
56  PCLASSINFO(H501PDU, H501_Message);
57 
58  public:
59  H501PDU();
60 
61  // overrides from PObject
62  virtual PObject * Clone() const;
63 
64  // overrides from H323TransactionPDU
65  virtual PASN_Object & GetPDU();
66  virtual PASN_Choice & GetChoice();
67  virtual const PASN_Object & GetPDU() const;
68  virtual const PASN_Choice & GetChoice() const;
69  virtual unsigned GetSequenceNumber() const;
70  virtual unsigned GetRequestInProgressDelay() const;
71 #if PTRACING
72  virtual const char * GetProtocolName() const;
73 #endif
74  virtual H323TransactionPDU * ClonePDU() const;
75  virtual void DeletePDU();
76 
77  // new functions
78  H501_ServiceRequest & BuildServiceRequest (unsigned seqnum, const H323TransportAddressArray & reply);
79  H501_ServiceConfirmation & BuildServiceConfirmation (unsigned seqnum);
80  H501_ServiceRejection & BuildServiceRejection (unsigned seqnum, unsigned reason);
81  H501_ServiceRelease & BuildServiceRelease (unsigned seqnum);
82  H501_DescriptorRequest & BuildDescriptorRequest (unsigned seqnum, const H323TransportAddressArray & reply);
83  H501_DescriptorConfirmation & BuildDescriptorConfirmation (unsigned seqnum);
84  H501_DescriptorRejection & BuildDescriptorRejection (unsigned seqnum, unsigned reason);
85  H501_DescriptorIDRequest & BuildDescriptorIDRequest (unsigned seqnum, const H323TransportAddressArray & reply);
86  H501_DescriptorIDConfirmation & BuildDescriptorIDConfirmation (unsigned seqnum);
87  H501_DescriptorIDRejection & BuildDescriptorIDRejection (unsigned seqnum, unsigned reason);
88  H501_DescriptorUpdate & BuildDescriptorUpdate (unsigned seqnum, const H323TransportAddressArray & reply);
89  H501_DescriptorUpdateAck & BuildDescriptorUpdateAck (unsigned seqnum);
90  H501_AccessRequest & BuildAccessRequest (unsigned seqnum, const H323TransportAddressArray & reply);
91  H501_AccessConfirmation & BuildAccessConfirmation (unsigned seqnum);
92  H501_AccessRejection & BuildAccessRejection (unsigned seqnum, int reason);
93  H501_RequestInProgress & BuildRequestInProgress (unsigned seqnum, unsigned delay);
94  H501_NonStandardRequest & BuildNonStandardRequest (unsigned seqnum, const H323TransportAddressArray & reply);
95  H501_NonStandardConfirmation & BuildNonStandardConfirmation (unsigned seqnum);
96  H501_NonStandardRejection & BuildNonStandardRejection (unsigned seqnum, unsigned reason);
97  H501_UnknownMessageResponse & BuildUnknownMessageResponse (unsigned seqnum);
98  H501_UsageRequest & BuildUsageRequest (unsigned seqnum, const H323TransportAddressArray & reply);
99  H501_UsageConfirmation & BuildUsageConfirmation (unsigned seqnum);
100  H501_UsageIndicationConfirmation & BuildUsageIndicationConfirmation (unsigned seqnum);
101  H501_UsageIndicationRejection & BuildUsageIndicationRejection (unsigned seqnum, unsigned reason);
102  H501_UsageRejection & BuildUsageRejection (unsigned seqnum);
103  H501_ValidationRequest & BuildValidationRequest (unsigned seqnum, const H323TransportAddressArray & reply);
104  H501_ValidationConfirmation & BuildValidationConfirmation (unsigned seqnum);
105  H501_ValidationRejection & BuildValidationRejection (unsigned seqnum, unsigned reason);
106  H501_AuthenticationRequest & BuildAuthenticationRequest (unsigned seqnum, const H323TransportAddressArray & reply);
107  H501_AuthenticationConfirmation & BuildAuthenticationConfirmation (unsigned seqnum);
108  H501_AuthenticationRejection & BuildAuthenticationRejection (unsigned seqnum, unsigned reason);
109 
110  protected:
111  void BuildRequest(unsigned tag, unsigned seqnum, const H323TransportAddressArray & replyAddr);
112  void BuildPDU(unsigned tag, unsigned seqnum);
113 };
114 
115 
116 #endif // OPAL_H501
117 
118 #endif // OPAL_H323_H501PDU_H
119 
120