home *** CD-ROM | disk | FTP | other *** search
/ ftp.muug.mb.ca / 2014.06.ftp.muug.mb.ca.tar / ftp.muug.mb.ca / pub / openh323.tar.gz / openh323.tar / openh323 / include / h501pdu.h < prev    next >
C/C++ Source or Header  |  2003-04-09  |  6KB  |  142 lines

  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.  * $Log: h501pdu.h,v $
  27.  * Revision 1.10  2003/04/10 01:03:39  craigs
  28.  * Changed to allow reply address to be a list
  29.  *
  30.  * Revision 1.9  2003/03/28 05:08:16  robertj
  31.  * Added delay parameter to BuildRequestInProgress
  32.  *
  33.  * Revision 1.8  2003/03/25 04:56:17  robertj
  34.  * Fixed issues to do with multiple inheritence in transaction reply cache.
  35.  *
  36.  * Revision 1.7  2003/03/20 01:51:07  robertj
  37.  * More abstraction of H.225 RAS and H.501 protocols transaction handling.
  38.  *
  39.  * Revision 1.6  2003/03/18 13:58:16  craigs
  40.  * More H.501 implementation
  41.  *
  42.  * Revision 1.5  2003/03/17 13:19:49  craigs
  43.  * More H501 implementation
  44.  *
  45.  * Revision 1.4  2003/03/14 06:00:42  craigs
  46.  * More updates
  47.  *
  48.  * Revision 1.3  2003/03/01 00:23:42  craigs
  49.  * New PeerElement implementation
  50.  *
  51.  * Revision 1.2  2003/02/25 06:48:15  robertj
  52.  * More work on PDU transaction abstraction.
  53.  *
  54.  * Revision 1.1  2003/02/21 05:28:39  craigs
  55.  * Factored out code for user with peer elements
  56.  *
  57.  */
  58.  
  59. #ifndef __OPAL_H501PDU_H
  60. #define __OPAL_H501PDU_H
  61.  
  62. #ifdef P_USE_PRAGMA
  63. #pragma interface
  64. #endif
  65.  
  66.  
  67. #include <ptlib/sockets.h>
  68.  
  69. #include "transports.h"
  70. #include "h323trans.h"
  71. #include "h501.h"
  72.  
  73. class H323_AnnexG;
  74.  
  75. /**Wrapper class for the H501 Annex G channel.
  76.  */
  77. class H501PDU : public H501_Message, public H323TransactionPDU
  78. {
  79.   PCLASSINFO(H501PDU, H501_Message);
  80.  
  81.   public:
  82.     H501PDU();
  83.  
  84.     // overrides from PObject
  85.     virtual PObject * Clone() const;
  86.  
  87.     // overrides from H323TransactionPDU
  88.     virtual PASN_Object & GetPDU();
  89.     virtual PASN_Choice & GetChoice();
  90.     virtual const PASN_Object & GetPDU() const;
  91.     virtual const PASN_Choice & GetChoice() const;
  92.     virtual unsigned GetSequenceNumber() const;
  93.     virtual unsigned GetRequestInProgressDelay() const;
  94. #if PTRACING
  95.     virtual const char * GetProtocolName() const;
  96. #endif
  97.     virtual H323TransactionPDU * ClonePDU() const;
  98.     virtual void DeletePDU();
  99.  
  100.     // new functions
  101.     H501_ServiceRequest               & BuildServiceRequest              (unsigned seqnum, const H323TransportAddressArray & reply);
  102.     H501_ServiceConfirmation          & BuildServiceConfirmation         (unsigned seqnum);
  103.     H501_ServiceRejection             & BuildServiceRejection            (unsigned seqnum, unsigned reason);
  104.     H501_ServiceRelease               & BuildServiceRelease              (unsigned seqnum);
  105.     H501_DescriptorRequest            & BuildDescriptorRequest           (unsigned seqnum, const H323TransportAddressArray & reply);
  106.     H501_DescriptorConfirmation       & BuildDescriptorConfirmation      (unsigned seqnum);
  107.     H501_DescriptorRejection          & BuildDescriptorRejection         (unsigned seqnum, unsigned reason);
  108.     H501_DescriptorIDRequest          & BuildDescriptorIDRequest         (unsigned seqnum, const H323TransportAddressArray & reply);
  109.     H501_DescriptorIDConfirmation     & BuildDescriptorIDConfirmation    (unsigned seqnum);
  110.     H501_DescriptorIDRejection        & BuildDescriptorIDRejection       (unsigned seqnum, unsigned reason);
  111.     H501_DescriptorUpdate             & BuildDescriptorUpdate            (unsigned seqnum, const H323TransportAddressArray & reply);
  112.     H501_DescriptorUpdateAck          & BuildDescriptorUpdateAck         (unsigned seqnum);
  113.     H501_AccessRequest                & BuildAccessRequest               (unsigned seqnum, const H323TransportAddressArray & reply);
  114.     H501_AccessConfirmation           & BuildAccessConfirmation          (unsigned seqnum);
  115.     H501_AccessRejection              & BuildAccessRejection             (unsigned seqnum, int reason);
  116.     H501_RequestInProgress            & BuildRequestInProgress           (unsigned seqnum, unsigned delay);
  117.     H501_NonStandardRequest           & BuildNonStandardRequest          (unsigned seqnum, const H323TransportAddressArray & reply);
  118.     H501_NonStandardConfirmation      & BuildNonStandardConfirmation     (unsigned seqnum);
  119.     H501_NonStandardRejection         & BuildNonStandardRejection        (unsigned seqnum, unsigned reason);
  120.     H501_UnknownMessageResponse       & BuildUnknownMessageResponse      (unsigned seqnum);
  121.     H501_UsageRequest                 & BuildUsageRequest                (unsigned seqnum, const H323TransportAddressArray & reply);
  122.     H501_UsageConfirmation            & BuildUsageConfirmation           (unsigned seqnum);
  123.     H501_UsageIndicationConfirmation  & BuildUsageIndicationConfirmation (unsigned seqnum);
  124.     H501_UsageIndicationRejection     & BuildUsageIndicationRejection    (unsigned seqnum, unsigned reason);
  125.     H501_UsageRejection               & BuildUsageRejection              (unsigned seqnum);
  126.     H501_ValidationRequest            & BuildValidationRequest           (unsigned seqnum, const H323TransportAddressArray & reply);
  127.     H501_ValidationConfirmation       & BuildValidationConfirmation      (unsigned seqnum);
  128.     H501_ValidationRejection          & BuildValidationRejection         (unsigned seqnum, unsigned reason);
  129.     H501_AuthenticationRequest        & BuildAuthenticationRequest       (unsigned seqnum, const H323TransportAddressArray & reply);
  130.     H501_AuthenticationConfirmation   & BuildAuthenticationConfirmation  (unsigned seqnum);
  131.     H501_AuthenticationRejection      & BuildAuthenticationRejection     (unsigned seqnum, unsigned reason);
  132.  
  133.   protected:
  134.     void BuildRequest(unsigned tag, unsigned seqnum, const H323TransportAddressArray & replyAddr);
  135.     void BuildPDU(unsigned tag, unsigned seqnum);
  136. };
  137.  
  138. #endif  // __OPAL_H501PDU_H
  139.  
  140.  
  141. /////////////////////////////////////////////////////////////////////////////
  142.