h225types.h
资源名称:h323.zip [点击查看]
上传用户:hnnddl
上传日期:2007-01-06
资源大小:3580k
文件大小:40k
源码类别:
IP电话/视频会议
开发平台:
WINDOWS
- /*
- * $Revision: 1.14 $
- * $Date: 1999/03/30 21:55:43 $
- */
- ////////////////////////////////////////////////////////////////
- // Copyright (c) 1996 Lucent Technologies //
- // All Rights Reserved //
- // //
- // THIS IS UNPUBLISHED //
- // PROPRIETARY SOURCE //
- // CODE OF Lucent Technologies //
- // AND elemedia //
- // //
- // The copyright notice above does not evidence any //
- // actual or intended publication of such source code//
- ////////////////////////////////////////////////////////////////
- ////////////////////////////////////////////////////////////////
- // File : h225types.h //
- // //
- // This file defines the types used in H.225(0) signalling. //
- // //
- // //
- // History: //
- // 03_Mar_1997 Created //
- // 06_Mar_1997 operator = added //
- // 16_Apr_1997 Code review Pass1 //
- // 17_Apr_1997 Code review Pass2 //
- // 19_May_1997 Incorporated Profile 1b changes //
- // 02_Jul_1997 Added Facility UUIE. //
- // 26_Aug_1997 Changed wchar_t to unsigned short //
- // (ISO/IEC 10646-1) //
- // Added methods in H225EndpointType class for //
- // setting GK,GW, TERM, MCU without supplying //
- // NSP. //
- // SetConfID and GetConfID take length arg //
- // 11_Nov_1997 Added methods to get/set user-data field //
- // of H323-UserInformation. //
- // Added methods to get/set nonStandardData field//
- // of H323-UserInformation::H323-UU-PDU //
- // 03_Apr_1998 Addition of H225CSCallID class //
- // Addition of UUIEItemCallID class //
- // H225CSxxxUUIE derive from UUIEItemCallID //
- // 06_Apr_1998 Populate method in all UUIEs. //
- // UUIEItemConfID constructor prototype changed //
- // 08_Apr_1998 Addition of new get and set protocolid fns. //
- // 30_Apr_1998 Fixed typo in H225CSReleaseCompleteReason enum//
- // list. //
- // RCR_RELEASECOMPLETEREASON_INVALID_REVISION //
- // changed to RCR_INVALID_REVISION. //
- // 30_Apr_1998 Added new enum values in //
- // H225CSReleaseCompleteReason & //
- // H225CSFacilityReason, //
- // H225CSAliasAddressType //
- // H225CSSupportedProtocols //
- // Changed H225CSAliasAddress for H225V2. //
- // 01_May_1998 Modified H225CSGatewayInfo for H225V2. //
- // 05_May_1998 New overloaded methods in H225CSUUIE to set //
- // and get protocol id using integers. //
- // 07_May_1998 Changed enum H225CSSupportedProtocols to //
- // H225CSSupportedProtocolsEnum //
- // 08_May_1998 Added H225CSUUIEType enum. //
- // 03_Aug_1998 Added two new enum H225CSConferenceGoal //
- // values for general support of V2 and //
- // Supplemenatry Service features (acg) //
- // 18_Aug_1998 Added methods in class H225CSUUIE //
- // for H4501 Supplementary services //
- // AddH450SupplementaryService() & //
- // Get[Num]H450SupplementaryServices() (ajs) //
- // 02_Oct_1998 Added class UUIEItemFastStartList. Also //
- // changed classes H225CSSetupUUIE, //
- // H225CSAlertingUUIE, H225CSCallProceedingUUIE //
- // and H225CSConnectUUIE to derive from it //
- // 08_Oct_1998 Added H245 Transport address to FacilityUUIE //
- // 13_Oct_1998 Added ProgressUUIE. //
- // 10_Mar_1999 Added RCR_ABSENT for stack internal use //
- // 11_Mar_1999 Added H225CSInformationUUIE //
- // //
- ////////////////////////////////////////////////////////////////
- #if (!defined(__H225TYPES_H__))
- #define __H225TYPES_H__
- #include "util/platform.h"
- #include "api/h225csperr.h"
- #include "q931/q931event.h"
- #include "q931/q931ie.h"
- //
- // Forward declarations.
- //
- class H225EndpointType;
- class H225VendorIdentifier;
- class H225GatewayInfo;
- class H225AliasAddress;
- class H225QseriesOptions;
- class H225MessageBody;
- class H225CSProtocol;
- class H225NonStandardParameter;
- class H225TransportAddress;
- class H225ConferenceIdentifier;
- class H225ProtocolIdentifier;
- class H225DataRate;
- class H225SupportedPrefix;
- class H225SupportedProtocols;
- class H4501SuppService;
- class H245SigOpenLogicalChannel;
- class ListManager;
- struct _H225VendorIdentifier;
- struct _H225AliasAddress;
- struct _H225QseriesOptions;
- struct _H225H323_MESSAGES_NonStandardParameter;
- struct _H225CallIdentifier;
- struct _H4501SuppServiceList;
- class H225CSSupportedProtocols;
- //
- // Enumeration types.
- //
- enum H225VersionNumber
- {
- H225_VERSION_INVALID = 0,
- H225_VERSION_1 = 1,
- H225_VERSION_2 = 2
- };
- // The various reasons for dropping a Q.931 call.
- // Used in the ReleaseCompleteReason field of the Release Complete message's
- // user to user information element.
- // All values other than RCR_ABSENT are legal.
- // Note that RCR_ABSENT alone is used internally in the stack, and can be
- // changed without notice.
- enum H225CSReleaseCompleteReason
- {
- RCR_ABSENT = 0, // For stack internal use only.
- RCR_NO_BANDWIDTH = 1,
- RCR_GATEKEEPER_RESOURCES,
- RCR_UNREACHABLE_DESTINATION,
- RCR_DESTINATION_REJECTION,
- RCR_INVALID_REVISION,
- RCR_NO_PERMISSION,
- RCR_UNREACHABLE_GATEKEEPER,
- RCR_GATEWAY_RESOURCES,
- RCR_BADFORMAT_ADDRESS,
- RCR_ADAPTIVE_BUSY,
- RCR_INCONF,
- RCR_UNDEFINED,
- RCR_FACILITY_CALL_DEFLECTION,
- RCR_SECURITY_DENIED,
- RCR_CALLED_PARTY_NOT_REGISTERED,
- RCR_CALLER_NOT_REGISTERED
- };
- // The various reasons for sending a facility message.
- enum H225CSFacilityReason
- {
- FYR_INVALID = 0,
- FYR_ROUTE_CALL_TO_GATEKEEPER = 1,
- FYR_CALL_FORWARDED,
- FYR_ROUTE_CALL_TO_MC,
- FYR_UNDEFINED,
- FYR_CONFERENCE_LIST_CHOICE,
- FYR_START_H245
- };
- // The conference goal for a Q.931 call.
- // Used in the conferenceGoal field of the Setup message's user to user
- // information element.
- enum H225CSConferenceGoal
- {
- CG_CREATE = 1,
- CG_JOIN,
- CG_INVITE,
- CG_CAPABILITY, // capability-negotiation
- CG_SUPP_SERVICE // callIndependentSupplemenatryService
- };
- // The type of Q.931 call.
- // Used in the callType field of the Setup message's user to user
- // information element.
- enum H225CSCallType
- {
- CT_POINT_TO_POINT = 1,
- CT_ONE_TO_N,
- CT_N_TO_ONE,
- CT_N_TO_N
- };
- // The type of calling to be done for a Q.931 call, whether
- // direct or gatekeeper routed. Used in ARQ RAS message.
- enum H225CSCallModel
- {
- CM_DIRECT = 1,
- CM_GATEKEEPER_ROUTED
- };
- // Used in the H225CSGatewayInfo class.
- enum H225CSSupportedProtocolsEnum
- {
- PROT_NONSTANDARD_DATA = 1,
- PROT_H310,
- PROT_H320,
- PROT_H321,
- PROT_H322,
- PROT_H323,
- PROT_H324,
- PROT_VOICE,
- PROT_T120_ONLY,
- PROT_NONSTANDARD_PROTOCOL
- };
- // Types of non standard identifiers.
- enum H225CSNonStdIDType
- {
- H225NS_IDT_INVALID,
- H225NS_IDT_OBJECT,
- H225NS_IDT_H221NS
- };
- // Types of alias addresses.
- enum H225CSAliasAddressType
- {
- AAT_INVALID,
- AAT_E164,
- AAT_H323_ID,
- AAT_URL_ID,
- AAT_TRANSPORT_ID,
- AAT_EMAIL_ID,
- AAT_PARTY_NUMBER
- };
- // Types of uuie.
- enum H225CSUUIEType
- {
- UUIET_INVALID = 0,
- UUIET_SETUP,
- UUIET_CALL_PROCEEDING,
- UUIET_CONNECT,
- UUIET_ALERTING,
- UUIET_INFORMATION,
- UUIET_RELEASE_COMPLETE,
- UUIET_FACILITY,
- UUIET_PROGRESS,
- UUIET_EMPTY
- };
- //
- // Classes.
- //
- // The abstraction for the H.225 NonStandardParameter.
- class DLLEXPORT H225CSNonStdParameter
- {
- public:
- // Constructors and destructors.
- H225CSNonStdParameter();
- ~H225CSNonStdParameter();
- // Returns the type of the non standard identifier.
- // See enum H225CSNonStdIDType
- //
- // if type is NSIDT_OBJECT then call
- // GetObjectIdentifier to get the id.
- // if type is NSIDT_H221_NON_STD call
- // GetH221NonStd to get the ID.
- // PASS1.
- int GetIDType();
- ProtReturnCode GetH221NonStd(unsigned short &t35_cc,
- unsigned short &t35_ext, unsigned short &manufacturer_code);
- ProtReturnCode SetH221NonStd(unsigned short t35_cc,
- unsigned short t35_ext, unsigned short manufacturer_code);
- ProtReturnCode GetObjectIdentifier(unsigned long *&data,
- unsigned short &len);
- ProtReturnCode SetObjectIdentifier(unsigned long *data,
- unsigned short len);
- ProtReturnCode SetNonStdData(unsigned char *data,
- unsigned int len);
- ProtReturnCode GetNonStdData(unsigned char *&data,
- unsigned int &len);
- H225CSNonStdParameter & operator=(H225CSNonStdParameter &);
- // For protocol internal use.
- H225NonStandardParameter * GetPriv();
- ProtReturnCode SetPriv(H225NonStandardParameter *);
- private:
- // The pointer to the internal representation..
- H225NonStandardParameter *nsp_cp;
- _H225H323_MESSAGES_NonStandardParameter *nsp_sp;
- };
- // The abstraction for the H.225 VendorIdentifier
- class DLLEXPORT H225CSVendorID
- {
- public:
- // constructors and destructors.
- H225CSVendorID();
- ~H225CSVendorID();
- ProtReturnCode SetProductID(unsigned char *prod_id,
- unsigned short len);
- ProtReturnCode GetProductID(unsigned char *&prod_id,
- unsigned short &len);
- ProtReturnCode SetVersionID(unsigned char *vers_id,
- unsigned short len);
- ProtReturnCode GetVersionID(unsigned char *&vers_id,
- unsigned short &len);
- ProtReturnCode SetH221NonStd(unsigned short t35_country_code,
- unsigned short t35_extension,
- unsigned short manufaturer_code);
- ProtReturnCode GetH221NonStd(unsigned short &t35_country_code,
- unsigned short &t35_extension,
- unsigned short &manufaturer_code);
- H225CSVendorID & operator=(H225CSVendorID &);
- // For protocol internal use.
- H225VendorIdentifier * GetPriv();
- ProtReturnCode SetPriv(H225VendorIdentifier *);
- private:
- // The pointer to the internal representation..
- H225VendorIdentifier *vid_cp;
- _H225VendorIdentifier *vid_sp;
- };
- class DLLEXPORT ItemNonStdParam
- {
- public:
- ItemNonStdParam(int is_mandatory);
- virtual ~ItemNonStdParam();
- // Set and get the non standard data of a ras message.
- // Note that this optional parameter is present in all
- // ras messages.
- virtual ProtReturnCode SetNonStdData(H225CSNonStdParameter &);
- virtual ProtReturnCode GetNonStdData(H225CSNonStdParameter &);
- protected:
- H225NonStandardParameter *nsp;
- };
- // The abstraction for the H.225 GatewayInfo
- class DLLEXPORT H225CSGatewayInfo : public ItemNonStdParam
- {
- public:
- // constructors and destructors.
- H225CSGatewayInfo();
- ~H225CSGatewayInfo();
- // Returns the number of SupportedProtocol items present.
- ProtReturnCode GetNumProtocols(int& count);
- // Retrieve the list of supported protocols. input is a pointer
- // to an array, of atleast the size returned by the previous call,
- // namely, GetNumProtocols. On return the array will be initialized
- // with the protocols that are supported by the gateway. The array
- // elements would be from H225CSSUpportedProtocolsEnum. count specifies
- // the size of the array.
- ProtReturnCode GetProtocolTypes(int types_array[], int& count);
- // Retrieve the capability information associated with a protocol.
- // index is the index(starting from 0) of the protocol, in the array
- // returned by the GetTypes call, for which the capability
- // information is requested.
- // supp_prot should be instantiated as the appropriate derived
- // class based on the type.
- ProtReturnCode GetProtocols(int index,
- H225CSSupportedProtocols& supp_prot);
- ProtReturnCode AddProtocols(H225CSSupportedProtocols&);
- H225CSGatewayInfo & operator=(H225CSGatewayInfo&);
- // For protocol internal use.
- H225GatewayInfo * GetPriv();
- ProtReturnCode SetPriv(H225GatewayInfo *);
- private:
- // The pointer to the internal representation..
- H225GatewayInfo *gw_cp;
- void *protocol_list;
- };
- // The abstraction for the H.225 GatewayInfo
- class DLLEXPORT H225CSEndpointType
- {
- public:
- // constructors and destructors.
- H225CSEndpointType();
- ~H225CSEndpointType();
- ProtReturnCode SetNonStd(H225CSNonStdParameter &);
- ProtReturnCode GetNonStd(H225CSNonStdParameter &);
- ProtReturnCode SetVendor(H225CSVendorID &);
- ProtReturnCode GetVendor(H225CSVendorID &);
- ProtReturnCode SetGatekeeper(H225CSNonStdParameter &);
- ProtReturnCode SetGatekeeper(H225CSNonStdParameter *);
- // Method returns if Gatekeeper is set.
- ProtReturnCode IsGatekeeperSet();
- ProtReturnCode GetGatekeeper(H225CSNonStdParameter &);
- ProtReturnCode SetGateway(H225CSGatewayInfo &);
- ProtReturnCode SetGateway(H225CSGatewayInfo *);
- ProtReturnCode IsGatewaySet();
- ProtReturnCode GetGateway(H225CSGatewayInfo &);
- ProtReturnCode SetTerminal(H225CSNonStdParameter &);
- ProtReturnCode SetTerminal(H225CSNonStdParameter *);
- ProtReturnCode IsTerminalSet();
- ProtReturnCode GetTerminal(H225CSNonStdParameter &);
- ProtReturnCode SetMCU(H225CSNonStdParameter &);
- ProtReturnCode SetMCU(H225CSNonStdParameter *);
- ProtReturnCode IsMCUSet();
- ProtReturnCode GetMCU(H225CSNonStdParameter &);
- void SetMC(boolean);
- ProtReturnCode GetMC(boolean &);
- void SetUndefinedNode(boolean);
- ProtReturnCode GetUndefinedNode(boolean &);
- H225CSEndpointType & operator=(H225CSEndpointType &);
- // For protocol internal use.
- H225EndpointType * GetPriv();
- ProtReturnCode SetPriv(H225EndpointType *);
- private:
- // The pointers to the internal representation..
- H225NonStandardParameter *_non_standard_data;
- H225VendorIdentifier *_vendor;
- int gk_flag;
- H225NonStandardParameter *_gatekeeper;
- int gw_flag;
- H225GatewayInfo *_gateway;
- int mcu_flag;
- H225NonStandardParameter *_mcu;
- int term_flag;
- H225NonStandardParameter *_terminal;
- boolean _undefined_node;
- boolean _mc;
- H225EndpointType *ep_cp;
- };
- // The abstraction for the H.225 AliasAddress.
- class DLLEXPORT H225CSAliasAddress
- {
- public:
- // constructors and destructors.
- H225CSAliasAddress();
- ~H225CSAliasAddress();
- // Returns values from enum H225CSAliasAddressType.
- // Invoke the appropriate GetXXX method based on the
- // type.
- int GetType();
- // Here len is in number of wide characters (not bytes..)
- ProtReturnCode SetH323ID(unsigned short *id, unsigned short len);
- ProtReturnCode GetH323ID(unsigned short *&id, unsigned short &len);
- // len is the number of bytes without the null termination char.
- ProtReturnCode SetE164(char * num, unsigned short len);
- ProtReturnCode GetE164(char *& num, unsigned short &len);
- // len is the number of bytes without the null termination char.
- ProtReturnCode SetURLID(char * url, unsigned short len);
- ProtReturnCode GetURLID(char *& url, unsigned short &len);
- // len is the number of bytes without the null termination char.
- ProtReturnCode SetEMailID(char * email, unsigned short len);
- ProtReturnCode GetEMailID(char *& email, unsigned short &len);
- // Set/Get TransportID
- ProtReturnCode SetTransportID(sockaddr *trans_id);
- ProtReturnCode GetTransportID(sockaddr *trans_id);
- H225CSAliasAddress & operator=(H225CSAliasAddress &);
- // For protocol internal use.
- H225AliasAddress * GetPriv();
- ProtReturnCode SetPriv(H225AliasAddress *);
- private:
- // The pointer to the internal representation..
- H225AliasAddress *aa_p;
- };
- // V2 Feature.
- class DLLEXPORT H225CSCallID
- {
- public:
- H225CSCallID();
- ~H225CSCallID();
- ProtReturnCode SetCallID(unsigned char *, int length);
- ProtReturnCode GetCallID(unsigned char *&, int &length);
- H225CSCallID & operator=(H225CSCallID &);
- boolean Valid();
- // For protocol internal use.
- struct _H225CallIdentifier *GetPriv();
- ProtReturnCode SetPriv(struct _H225CallIdentifier *);
- private:
- struct _H225CallIdentifier *cid;
- int is_valid;
- };
- // The abstraction for the H.225 QSeriesOptions.
- class DLLEXPORT H225CSQSeriesOptions
- {
- public:
- // constructors and destructors.
- H225CSQSeriesOptions();
- ~H225CSQSeriesOptions();
- void SetQ932(boolean full);
- ProtReturnCode GetQ932(boolean &full);
- void SetQ951(boolean full);
- ProtReturnCode GetQ951(boolean &full);
- void SetQ952(boolean full);
- ProtReturnCode GetQ952(boolean &full);
- void SetQ953(boolean full);
- ProtReturnCode GetQ953(boolean &full);
- void SetQ955(boolean full);
- ProtReturnCode GetQ955(boolean &full);
- void SetQ956(boolean full);
- ProtReturnCode GetQ956(boolean &full);
- void SetQ957(boolean full);
- ProtReturnCode GetQ957(boolean &full);
- void SetQ954(boolean conf_calling, boolean three_party);
- ProtReturnCode GetQ954(boolean &conf_calling, boolean &three_party);
- H225CSQSeriesOptions & operator=(H225CSQSeriesOptions &);
- // For protocol internal use.
- H225QseriesOptions * GetPriv();
- ProtReturnCode SetPriv(H225QseriesOptions *);
- private:
- // The pointer to the internal representation..
- H225QseriesOptions *qs_cp;
- _H225QseriesOptions *qs_sp;
- };
- //
- // The Q.931 User to User information elements abstraction.
- //
- //
- // The basic user to user information element class.
- // Note: This class can be instatianted only from its friends.
- // However, The GetType function is to be used to figure
- // the message type and then the class can be casted to
- // an appropriate type (for e.g., H225CSAlertingUUIE etc.)
- // A pointer to this class is passed back as an argument in the
- // H225CSProtocol callback functions. (see file H225csp.h)
- //
- class DLLEXPORT H225CSUUIE
- {
- public:
- // Get the message type of which this user to user information
- // element is a part of. See enum H225CSUUIEType.
- int GetType();
- // Methods to set and get protocol identifier.
- // Note: buf must be long aligned, and must be read as a seq of ulong.
- // length is the number of chars pointed to by buf.
- ProtReturnCode SetProtocolID(unsigned char *buf, int length);
- ProtReturnCode GetProtocolID(unsigned char *&buf, int& length);
- // Methods to get and set the protocol identifier.
- // The parameters are integers that refer to version numbers.
- // version is one of H225VersionNumber
- ProtReturnCode SetProtocolID(int version);
- ProtReturnCode GetProtocolID(int &version);
- // Methods to set and get the user-data field of
- // H323-UserInformation
- ProtReturnCode SetUserData(unsigned short pd,
- unsigned char *data, int length);
- ProtReturnCode GetUserData(unsigned short &pd,
- unsigned char *&data, int &length);
- // Methods to set and get the nonStandardData
- // field of the H323-UU-PDU field of H323-UserInformation
- ProtReturnCode SetNonStd(H225CSNonStdParameter &);
- ProtReturnCode GetNonStd(H225CSNonStdParameter &);
- // Methods to set and get the H4501SupplementaryServices
- // field of the H323-UU-PDU field of H323-UserInformation
- ProtReturnCode AddH450SupplementaryService(H4501SuppService &SuppSvc);
- ProtReturnCode GetNumH450SupplementaryServices(int &count);
- ProtReturnCode GetH450SupplementaryServices(H4501SuppService suppSvcList[], int &count);
- // For protocol internal use..
- virtual H225MessageBody* GetPriv() = 0;
- virtual ProtReturnCode SetPriv(H225MessageBody*) = 0;
- virtual ~H225CSUUIE();
- H225CSUUIE& operator=(H225CSUUIE& uuie);
- void *GetSSPriv();
- ProtReturnCode SetSSPriv(void *soos);
- private:
- // Friendships.
- friend class H225CSProtocol;
- friend class H225CSAlertingUUIE;
- friend class H225CSCallProceedingUUIE;
- friend class H225CSReleaseCompleteUUIE;
- friend class H225CSSetupUUIE;
- friend class H225CSConnectUUIE;
- friend class H225CSFacilityUUIE;
- friend class H225CSProgressUUIE;
- friend class H225CSInformationUUIE;
- friend class H225Q931Client;
- // constructors and destructors.
- H225CSUUIE(H225CSProtocol *proto, H225MessageBody* m, int type);
- void SetType(int type);
- void SetPID(H225ProtocolIdentifier &pid);
- H225ProtocolIdentifier *GetPID();
- virtual ProtReturnCode Populate(H225CSProtocol *proto);
- private:
- // The message type.
- int type;
- // The pointer to the protocol class.
- H225CSProtocol* proto;
- // Other private data.
- H225MessageBody *mb_p;
- H225ProtocolIdentifier *pid;
- // Data for H450 Supplementary Services
- struct _H4501SuppServiceList *h450ss_list_head;
- struct _H4501SuppServiceList *h450ss_list_tail;
- int h450ss_list_length;
- unsigned short ud_pd;
- unsigned char *ud_data;
- int ud_length;
- H225NonStandardParameter *ns;
- };
- // PASS1. New class.
- class DLLEXPORT UUIEItemH245TransportAddress
- {
- public:
- UUIEItemH245TransportAddress(H225CSProtocol* proto);
- virtual ~UUIEItemH245TransportAddress();
- // PASS2 : made these virtual
- virtual ProtReturnCode SetH245Transport(sockaddr*);
- virtual ProtReturnCode GetH245Transport(sockaddr*);
- protected:
- H225TransportAddress* h245_address;
- };
- // PASS1. New class
- class DLLEXPORT UUIEItemDstInfo
- {
- public:
- UUIEItemDstInfo(H225CSProtocol* proto);
- virtual ~UUIEItemDstInfo();
- // PASS2 : made these virtual
- virtual ProtReturnCode SetDstInfo(H225CSEndpointType& dest_info);
- virtual ProtReturnCode GetDstInfo(H225CSEndpointType& dest_info);
- protected:
- H225EndpointType* endpoint_type;
- };
- // PASS1. New class.
- class DLLEXPORT UUIEItemConfID
- {
- public:
- UUIEItemConfID();
- virtual ~UUIEItemConfID();
- // Get and set the 16 byte conference ID.
- // PASS2 : made these virtual
- virtual ProtReturnCode SetConfID(unsigned char *conf_id, int length);
- virtual ProtReturnCode GetConfID(unsigned char*& conf_id, int &length);
- protected:
- ProtReturnCode Populate(H225CSProtocol *proto);
- H225ConferenceIdentifier* conference_id;
- };
- // Version 2 Addition.
- class DLLEXPORT UUIEItemCallID
- {
- public:
- UUIEItemCallID();
- virtual ~UUIEItemCallID();
- ProtReturnCode GetCallID(H225CSCallID &id);
- ProtReturnCode SetCallID(H225CSCallID &id);
- protected:
- ProtReturnCode Populate(H225CSProtocol *proto);
- H225CSCallID callid;
- int is_dummy_callid;
- };
- // The class UUIEItemFastStartList encapsulates the list of OpenLogicalChannel
- // structures that are needed for fast connect signalling, introduced in
- // H.323 version 2.0. The user to user information element classes of the
- // messages that can carry this element, derive from this class.
- // @See:
- // -H225CSAlertingUUIE
- // -H225CSCallProceedingUUIE
- // -H225CSConnectUUIE
- // -H225CSSetupUUIE
- // -H225CSProgressUUIE
- // -H245SigOpenLogicalChannel
- //
- // @Version: PX3230S Version 2.2
- class DLLEXPORT UUIEItemFastStartList
- {
- public:
- UUIEItemFastStartList();
- virtual ~UUIEItemFastStartList();
- // Returns the number of H.245 OpenLogicalChannel structures that were
- // passed in the faststart list.
- ProtReturnCode GetNumOLC(int &count);
- // Retrieves the list of H.245 OpenLogicalChannel structures that were
- // sent by the remote end. olcList is an array of empty
- // H245SigOpenLogicalChannel objects that are filled on return.
- // count is a value-return parameter. During the call it specifies
- // the number of elements in the olcList array and on return
- // specifies how many of those were filled.
- ProtReturnCode GetOLC(H245SigOpenLogicalChannel olcList[], int &count);
- // Use this method to add a H.245 OpenlogicalChannel structure to the
- // list of such structures that need to be sent in a fast connect
- // proposal or reply. olc represents that H.245 OpenLogicalChannel
- // structure that needs to be added to the list.
- ProtReturnCode AddOLC(H245SigOpenLogicalChannel &olc);
- // Use this method to determine if the H.225 user to user information
- // element carried a list of H.245 OpenLogicalChannel structures
- // meant for for fast connect signalling.
- Boolean IsFastStartPresent()
- {
- return m_bFastStart;
- }
- //@DELB
- protected:
- void DelAll();
- void* GetFastStartList();
- ProtReturnCode SetFastStartList(void *pList);
- private:
- //data area
- ListManager *m_pFastStartList;
- Boolean m_bFastStart;
- //@DELE
- };
- // The abstraction for the user to user information element
- // for the Q.931 Alerting message as specified by H.225
- class DLLEXPORT H225CSAlertingUUIE : public H225CSUUIE,
- public UUIEItemDstInfo, public UUIEItemH245TransportAddress,
- public UUIEItemCallID,
- public UUIEItemFastStartList
- {
- public:
- // constructors and destructors.
- H225CSAlertingUUIE(H225CSProtocol &proto);
- ~H225CSAlertingUUIE();
- H225CSAlertingUUIE & operator=(H225CSAlertingUUIE &);
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSAlertingUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_alerting(H225CSProtocol *proto,
- H225MessageBody* m);
- ProtReturnCode Populate(H225CSProtocol *proto);
- };
- // The abstraction for the user to user information element
- // for the Q.931 Call Proceeding message as specified by H.225
- class DLLEXPORT H225CSCallProceedingUUIE : public H225CSUUIE,
- public UUIEItemDstInfo, public UUIEItemH245TransportAddress,
- public UUIEItemCallID,
- public UUIEItemFastStartList
- {
- public:
- // constructors and destructors.
- H225CSCallProceedingUUIE(H225CSProtocol& proto);
- ~H225CSCallProceedingUUIE();
- H225CSCallProceedingUUIE & operator=(H225CSCallProceedingUUIE &);
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSCallProceedingUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_call_proceeding(H225CSProtocol *proto,
- H225MessageBody* m);
- ProtReturnCode Populate(H225CSProtocol *proto);
- };
- // The abstraction for the user to user information element
- // for the Q.931 Connect message as specified by H.225
- class DLLEXPORT H225CSConnectUUIE : public H225CSUUIE,
- public UUIEItemDstInfo, public UUIEItemH245TransportAddress,
- public UUIEItemConfID, public UUIEItemCallID,
- public UUIEItemFastStartList
- {
- public:
- // constructors and destructors.
- H225CSConnectUUIE(H225CSProtocol& proto);
- ~H225CSConnectUUIE();
- H225CSConnectUUIE & operator=(H225CSConnectUUIE &);
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSConnectUUIE(H225CSProtocol *proto,
- H225MessageBody *m);
- void init_connect(H225CSProtocol *proto,
- H225MessageBody* m);
- ProtReturnCode Populate(H225CSProtocol *proto);
- };
- // The abstraction for the user to user information element
- // for the Q.931 Release complete message as specified by H.225
- class DLLEXPORT H225CSReleaseCompleteUUIE : public H225CSUUIE,
- public UUIEItemCallID
- {
- public:
- // constructors and destructors.
- H225CSReleaseCompleteUUIE(H225CSProtocol& proto);
- ~H225CSReleaseCompleteUUIE();
- // reason is one of enum H225CSReleaseCompleteReason.
- ProtReturnCode SetReason(int reason);
- ProtReturnCode GetReason(int& reason);
- H225CSReleaseCompleteUUIE & operator=(H225CSReleaseCompleteUUIE &);
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSReleaseCompleteUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_release_complete(H225CSProtocol *proto,
- H225MessageBody* m);
- ProtReturnCode Populate(H225CSProtocol *proto);
- // private data members
- H225CSReleaseCompleteReason reason;
- };
- // The abstraction for the user to user information element
- // for the Q.931 Setup message as specified by H.225
- class DLLEXPORT H225CSSetupUUIE : public H225CSUUIE,
- public UUIEItemH245TransportAddress, public UUIEItemConfID,
- public UUIEItemCallID,
- public UUIEItemFastStartList
- {
- public:
- // constructors and destructors.
- H225CSSetupUUIE(H225CSProtocol& proto);
- ~H225CSSetupUUIE();
- // Source address. Use GetNumSrcAddrs to get the number
- // of elements in the list and GetSrcAddrs to get the list
- // itself (argument is an array of H225CSAliasAddress enough to
- // hold the list).
- // count contains the number of entries list can hold, upon
- // return count contains the number of entries filled.
- ProtReturnCode GetNumSrcAddrs(int &);
- ProtReturnCode GetSrcAddrs(H225CSAliasAddress list[],
- int& count);
- ProtReturnCode AddSrcAddr(H225CSAliasAddress&);
- // Set and get the source Info.
- ProtReturnCode SetSrcInfo(H225CSEndpointType&);
- ProtReturnCode GetSrcInfo(H225CSEndpointType&);
- // Destination address. Use GetNumDstAddrs to get the number
- // of elements in the list and GetDstAddrs to get the list
- // itself (argument is an array of H225CSAliasAddress enough to
- // hold the list).
- // count contains the number of entries list can hold, upon
- // return count contains the number of entries filled.
- ProtReturnCode GetNumDstAddrs(int &);
- ProtReturnCode GetDstAddrs(H225CSAliasAddress list[],
- int& count);
- ProtReturnCode AddDstAddr(H225CSAliasAddress&);
- // Set and Get the destination call signalling address.
- ProtReturnCode SetDstCallSig(sockaddr*);
- ProtReturnCode GetDstCallSig(sockaddr*);
- // Destination extra call info. Use GetNumDstCallInfo to get the
- // number of elements in the list and GetDstCallInfo to get the list
- // itself (argument is an array of H225CSAliasAddress enough to
- // hold the list).
- // count contains the number of entries list can hold, upon
- // return count contains the number of entries filled.
- ProtReturnCode GetNumDstExtraCallInfo(int &);
- ProtReturnCode GetDstExtraCallInfo(H225CSAliasAddress list[],
- int& count);
- ProtReturnCode AddDstExtraCallInfo(H225CSAliasAddress&);
- // Destination extra crv. Use GetNumDstExtraCRV to get the
- // number of elements in the list and GetDstExtraCRV to get the
- // list itself (argument is an array of H225CSAliasAddress enough
- // to hold the list).
- ProtReturnCode GetNumDstExtraCRV(int &);
- ProtReturnCode GetDstExtraCRV(unsigned short crv[], int& count);
- ProtReturnCode AddDstExtraCRV(unsigned short crv);
- // Get and set the active MC status.
- ProtReturnCode GetActiveMC(boolean&);
- ProtReturnCode SetActiveMC(boolean);
- // Set and get the conference Goal.
- // goal is one of H225CSConferenceGoal
- ProtReturnCode SetConfGoal(int goal) ;
- ProtReturnCode GetConfGoal(int &goal);
- // Set and get the qseries options.
- ProtReturnCode SetCallServices(H225CSQSeriesOptions&);
- ProtReturnCode GetCallServices(H225CSQSeriesOptions&);
- // Set and get the call type.
- ProtReturnCode SetCallType(int);
- ProtReturnCode GetCallType(int&);
- // Set and get the source call signalling address.
- ProtReturnCode SetSrcCallSig(sockaddr*);
- ProtReturnCode GetSrcCallSig(sockaddr*);
- // Set and get the remote extension address
- ProtReturnCode SetRemoteExtension(H225CSAliasAddress&);
- ProtReturnCode GetRemoteExtension(H225CSAliasAddress&);
- // Get and set media wait for connect flag
- ProtReturnCode GetMediaWaitForConnect(boolean&);
- ProtReturnCode SetMediaWaitForConnect(boolean);
- // Get and set the active MC status.
- ProtReturnCode GetCanOverlapSend(boolean&);
- ProtReturnCode SetCanOverlapSend(boolean);
- H225CSSetupUUIE & operator=(H225CSSetupUUIE &);
- public:
- // For protocol internal use..
- ProtReturnCode SetPriv(H225MessageBody*);
- H225MessageBody* GetPriv();
- private:
- friend class H225Q931Client;
- // private functions
- H225CSSetupUUIE(H225CSProtocol *proto, H225MessageBody* m);
- void init_setup(H225CSProtocol *proto, H225MessageBody* m);
- ProtReturnCode Populate(H225CSProtocol *proto);
- // private data members
- H225TransportAddress* dest_call_sig_addr;
- H225TransportAddress* src_call_sig_addr;
- H225EndpointType* endpoint_type;
- void* src_addr_list;
- void* dest_addr_list;
- H225CSConferenceGoal conference_goal;
- H225CSCallType call_type;
- boolean active_mc;
- boolean media_wait_for_connect;
- boolean can_overlap_send;
- H225QseriesOptions *call_services;
- };
- class DLLEXPORT H225CSFacilityUUIE : public H225CSUUIE,
- public UUIEItemConfID, public UUIEItemCallID,
- public UUIEItemH245TransportAddress
- {
- public:
- // constructors and destructors.
- H225CSFacilityUUIE(H225CSProtocol& proto);
- ~H225CSFacilityUUIE();
- // reason is one of enum H225CSFacilityReason.
- ProtReturnCode SetReason(int reason);
- ProtReturnCode GetReason(int& reason);
- ProtReturnCode SetAlternativeAddr(sockaddr*);
- ProtReturnCode GetAlternativeAddr(sockaddr*);
- ProtReturnCode GetNumAlternativeAliasAddr(int &);
- ProtReturnCode GetAlternativeAliasAddr(H225CSAliasAddress[],
- int& count);
- ProtReturnCode AddAlternativeAliasAddr(H225CSAliasAddress&);
- H225CSFacilityUUIE & operator=(H225CSFacilityUUIE &);
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- ProtReturnCode Populate(H225CSProtocol *proto);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSFacilityUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_facility(H225CSProtocol *proto,
- H225MessageBody* m);
- void *alt_aa_list;
- H225TransportAddress *alt_addr;
- H225CSFacilityReason reason;
- };
- // This class encapsulates the Progress User to User Information
- // element as defined in the H.225 Standard.
- //
- // @See:
- // -H225CSUUIE
- // -UUIEItemCallID
- // -UUIEItemDstInfo
- // -UUIEItemH225TransportAddress
- // -UUIEItemFastStartList
- //
- // @Version: PX3230S Version 2.2
- class DLLEXPORT H225CSProgressUUIE : public H225CSUUIE,
- public UUIEItemCallID,public UUIEItemDstInfo,
- public UUIEItemH245TransportAddress,
- public UUIEItemFastStartList
- {
- public:
- // constructors and destructors.
- H225CSProgressUUIE(H225CSProtocol& proto);
- ~H225CSProgressUUIE();
- H225CSProgressUUIE & operator=(H225CSProgressUUIE &);
- //@DELB
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- ProtReturnCode Populate(H225CSProtocol *proto);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSProgressUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_progress(H225CSProtocol *proto,
- H225MessageBody* m);
- //@DELE
- };
- // This class encapsulates the Information User to User Information
- // element as defined in the H.225 Standard.
- //
- // @See:
- // -H225CSUUIE
- // -UUIEItemCallID
- //
- // @Version: PX3230S Version 2.3.2
- class DLLEXPORT H225CSInformationUUIE : public H225CSUUIE,
- public UUIEItemCallID
- {
- public:
- // constructors and destructors.
- H225CSInformationUUIE(H225CSProtocol& proto);
- ~H225CSInformationUUIE();
- H225CSInformationUUIE & operator=(H225CSInformationUUIE &);
- //@DELB
- public:
- // For protocol internal use..
- H225MessageBody* GetPriv();
- ProtReturnCode SetPriv(H225MessageBody*);
- ProtReturnCode Populate(H225CSProtocol *proto);
- private:
- friend class H225Q931Client;
- // private functions
- H225CSInformationUUIE(H225CSProtocol *proto,
- H225MessageBody* m);
- void init_information(H225CSProtocol *proto,
- H225MessageBody* m);
- //@DELE
- };
- //
- // This is used for describing each of the
- // protocols listed under SupportedProtocols
- //
- class DLLEXPORT H225CSDataRate : public ItemNonStdParam
- {
- public:
- H225CSDataRate();
- virtual ~H225CSDataRate();
- // Bandwidth is a value in the range
- // [0..4294967295]. The value represents the
- // bandwidth in 100s of bits.
- ProtReturnCode SetChannelRate(unsigned long bandwidth);
- ProtReturnCode GetChannelRate(unsigned long& bandwidth);
- // Channel multiplier is a value in the range [1,256]
- ProtReturnCode SetChannelMultiplier(int cm);
- ProtReturnCode GetChannelMultiplier(int& cm);
- H225CSDataRate& operator=(H225CSDataRate&);
- // For protocol internal use
- H225DataRate *GetPriv();
- ProtReturnCode SetPriv(H225DataRate*);
- protected:
- H225DataRate *data_rate;
- int channel_multiplier;
- unsigned long bandwidth;
- };
- class DLLEXPORT H225CSSupportedPrefix : public ItemNonStdParam
- {
- public:
- H225CSSupportedPrefix();
- virtual ~H225CSSupportedPrefix();
- ProtReturnCode SetPrefix(H225CSAliasAddress&);
- ProtReturnCode GetPrefix(H225CSAliasAddress&);
- H225CSSupportedPrefix& operator=(H225CSSupportedPrefix&);
- // For stack internal use.
- virtual H225SupportedPrefix *GetPriv();
- virtual ProtReturnCode SetPriv(H225SupportedPrefix*);
- protected:
- H225SupportedPrefix *prefix;
- H225AliasAddress *alias;
- };
- class DLLEXPORT H225CSSupportedProtocols
- {
- public:
- // type is one of H225CSSupportedProtocols
- H225CSSupportedProtocols(int type);
- virtual ~H225CSSupportedProtocols();
- virtual int GetType()
- {
- return type;
- }
- H225CSSupportedProtocols& operator=(
- H225CSSupportedProtocols&);
- // For Stack internal use.
- virtual H225SupportedProtocols *GetPriv() = 0;
- virtual ProtReturnCode SetPriv(H225SupportedProtocols*) = 0;
- protected:
- int type;
- H225SupportedProtocols *supported_protocols;
- };
- class DLLEXPORT H225SuppProtNonStdData : public H225CSSupportedProtocols,
- public ItemNonStdParam
- {
- public:
- H225SuppProtNonStdData():
- H225CSSupportedProtocols(PROT_NONSTANDARD_DATA),
- ItemNonStdParam(0)
- {
- }
- virtual ~H225SuppProtNonStdData()
- {
- }
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225ProtocolCaps : public ItemNonStdParam
- {
- public:
- H225ProtocolCaps();
- virtual ~H225ProtocolCaps();
- virtual ProtReturnCode GetNumDataRatesSupported(int& count);
- virtual ProtReturnCode GetDataRatesSupported(
- H225CSDataRate data_rates[], int& count);
- virtual ProtReturnCode AddDataRatesSupported(
- H225CSDataRate &data_rate);
- virtual ProtReturnCode GetNumSupportedPrefixes(int& count);
- virtual ProtReturnCode GetSupportedPrefixes(
- H225CSSupportedPrefix prefixes[], int& count);
- virtual ProtReturnCode AddSupportedPrefixes(
- H225CSSupportedPrefix &prefix);
- protected:
- void *prefix_list;
- void *data_rates_list;
- };
- class DLLEXPORT H225SuppProtH310Caps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH310Caps():
- H225CSSupportedProtocols(PROT_H310)
- {
- }
- virtual ~H225SuppProtH310Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtH320Caps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH320Caps()
- : H225CSSupportedProtocols(PROT_H320)
- {
- }
- virtual ~H225SuppProtH320Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtH321Caps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH321Caps()
- : H225CSSupportedProtocols(PROT_H321)
- {
- }
- virtual ~H225SuppProtH321Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtH322Caps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH322Caps()
- : H225CSSupportedProtocols(PROT_H322)
- {
- }
- virtual ~H225SuppProtH322Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtH323Caps :public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH323Caps()
- : H225CSSupportedProtocols(PROT_H323)
- {
- }
- virtual ~H225SuppProtH323Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtH324Caps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtH324Caps()
- : H225CSSupportedProtocols(PROT_H324)
- {
- }
- virtual ~H225SuppProtH324Caps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtVoiceCaps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtVoiceCaps()
- : H225CSSupportedProtocols(PROT_VOICE)
- {
- }
- virtual ~H225SuppProtVoiceCaps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtT120OnlyCaps : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtT120OnlyCaps()
- : H225CSSupportedProtocols(PROT_T120_ONLY)
- {
- }
- virtual ~H225SuppProtT120OnlyCaps()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- class DLLEXPORT H225SuppProtNonStdProtocol : public H225ProtocolCaps,
- public H225CSSupportedProtocols
- {
- public:
- H225SuppProtNonStdProtocol()
- : H225CSSupportedProtocols(PROT_NONSTANDARD_PROTOCOL)
- {
- }
- virtual ~H225SuppProtNonStdProtocol()
- {
- }
- // For stack internal use.
- H225SupportedProtocols *GetPriv();
- ProtReturnCode SetPriv(H225SupportedProtocols*);
- };
- #endif //__H225TYPES_H__