# h501pdu.h

Go to the documentation of this file.

    00001 /*
    00002  * h501pdu.h
    00003  *
    00004  * H.501 protocol handler
    00005  *
    00006  * Open H323 Library
    00007  *
    00008  * Copyright (c) 2003 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_H323_H501PDU_H
    00032 #define OPAL_H323_H501PDU_H
    00033
    00034 #ifdef P_USE_PRAGMA
    00035 #pragma interface
    00036 #endif
    00037
    00038 #include <opal/buildopts.h>
    00039
    00040 #if OPAL_H501
    00041
    00042 #include <ptlib/sockets.h>
    00043
    00044 #include <h323/transaddr.h>
    00045 #include <h323/h323trans.h>
    00046 #include <asn/h501.h>
    00047
    00048
    00049 class H323_AnnexG;
    00050
    00051
    00054 class H501PDU : public H501_Message, public H323TransactionPDU
    00055 {
    00056   PCLASSINFO(H501PDU, H501_Message);
    00057
    00058   public:
    00059     H501PDU();
    00060
    00061     // overrides from PObject
    00062     virtual PObject * Clone() const;
    00063
    00064     // overrides from H323TransactionPDU
    00065     virtual PASN_Object & GetPDU();
    00066     virtual PASN_Choice & GetChoice();
    00067     virtual const PASN_Object & GetPDU() const;
    00068     virtual const PASN_Choice & GetChoice() const;
    00069     virtual unsigned GetSequenceNumber() const;
    00070     virtual unsigned GetRequestInProgressDelay() const;
    00071 #if PTRACING
    00072     virtual const char * GetProtocolName() const;
    00073 #endif
    00074     virtual H323TransactionPDU * ClonePDU() const;
    00075     virtual void DeletePDU();
    00076
    00077     // new functions
    00078     H501_ServiceRequest               & BuildServiceRequest              (unsigned seqnum, const H323TransportAddressArray & reply);
    00079     H501_ServiceConfirmation          & BuildServiceConfirmation         (unsigned seqnum);
    00080     H501_ServiceRejection             & BuildServiceRejection            (unsigned seqnum, unsigned reason);
    00081     H501_ServiceRelease               & BuildServiceRelease              (unsigned seqnum);
    00082     H501_DescriptorRequest            & BuildDescriptorRequest           (unsigned seqnum, const H323TransportAddressArray & reply);
    00083     H501_DescriptorConfirmation       & BuildDescriptorConfirmation      (unsigned seqnum);
    00084     H501_DescriptorRejection          & BuildDescriptorRejection         (unsigned seqnum, unsigned reason);
    00085     H501_DescriptorIDRequest          & BuildDescriptorIDRequest         (unsigned seqnum, const H323TransportAddressArray & reply);
    00086     H501_DescriptorIDConfirmation     & BuildDescriptorIDConfirmation    (unsigned seqnum);
    00087     H501_DescriptorIDRejection        & BuildDescriptorIDRejection       (unsigned seqnum, unsigned reason);
    00088     H501_DescriptorUpdate             & BuildDescriptorUpdate            (unsigned seqnum, const H323TransportAddressArray & reply);
    00089     H501_DescriptorUpdateAck          & BuildDescriptorUpdateAck         (unsigned seqnum);
    00090     H501_AccessRequest                & BuildAccessRequest               (unsigned seqnum, const H323TransportAddressArray & reply);
    00091     H501_AccessConfirmation           & BuildAccessConfirmation          (unsigned seqnum);
    00092     H501_AccessRejection              & BuildAccessRejection             (unsigned seqnum, int reason);
    00093     H501_RequestInProgress            & BuildRequestInProgress           (unsigned seqnum, unsigned delay);
    00094     H501_NonStandardRequest           & BuildNonStandardRequest          (unsigned seqnum, const H323TransportAddressArray & reply);
    00095     H501_NonStandardConfirmation      & BuildNonStandardConfirmation     (unsigned seqnum);
    00096     H501_NonStandardRejection         & BuildNonStandardRejection        (unsigned seqnum, unsigned reason);
    00097     H501_UnknownMessageResponse       & BuildUnknownMessageResponse      (unsigned seqnum);
    00098     H501_UsageRequest                 & BuildUsageRequest                (unsigned seqnum, const H323TransportAddressArray & reply);
    00099     H501_UsageConfirmation            & BuildUsageConfirmation           (unsigned seqnum);
    00100     H501_UsageIndicationConfirmation  & BuildUsageIndicationConfirmation (unsigned seqnum);
    00101     H501_UsageIndicationRejection     & BuildUsageIndicationRejection    (unsigned seqnum, unsigned reason);
    00102     H501_UsageRejection               & BuildUsageRejection              (unsigned seqnum);
    00103     H501_ValidationRequest            & BuildValidationRequest           (unsigned seqnum, const H323TransportAddressArray & reply);
    00104     H501_ValidationConfirmation       & BuildValidationConfirmation      (unsigned seqnum);
    00105     H501_ValidationRejection          & BuildValidationRejection         (unsigned seqnum, unsigned reason);
    00106     H501_AuthenticationRequest        & BuildAuthenticationRequest       (unsigned seqnum, const H323TransportAddressArray & reply);
    00107     H501_AuthenticationConfirmation   & BuildAuthenticationConfirmation  (unsigned seqnum);
    00108     H501_AuthenticationRejection      & BuildAuthenticationRejection     (unsigned seqnum, unsigned reason);
    00109
    00110   protected:
    00111     void BuildRequest(unsigned tag, unsigned seqnum, const H323TransportAddressArray & replyAddr);
    00112     void BuildPDU(unsigned tag, unsigned seqnum);
    00113 };
    00114
    00115
    00116 #endif // OPAL_H501
    00117
    00118 #endif  // OPAL_H323_H501PDU_H
    00119
    00120