?? h323.h
字號(hào):
If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour simply returns TRUE. */ virtual BOOL OnOutgoingCall( const H323SignalPDU & connectPDU /// Received Connect PDU ); /**Handle the acknowldege of a fast start. This function is called from one of a number of functions after it receives a PDU from the remote endpoint that has a fastStart field. It is in response to a request for a fast strart from the local endpoint. If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour parses . */ virtual BOOL HandleFastStartAcknowledge( const H225_ArrayOf_PASN_OctetString & array /// Array of H245_OpenLogicalChannel ); /**Start a separate H245 channel. This function is called from one of a number of functions after it receives a PDU from the remote endpoint that has a h245Address field. If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour checks to see if it is a known transport and creates a corresponding H323Transport decendent for the control channel. */ virtual BOOL StartControlChannel( const H225_TransportAddress & h245Address /// H245 address ); //@} /**@name Control Channel */ //@{ /**Write a PDU to the control channel. If there is no control channel open then this will tunnel the PDU into the signalling channel. */ BOOL WriteControlPDU( const H323ControlPDU & pdu ); /**Start control channel negotiations. */ BOOL StartControlNegotiations(); /**Handle reading data on the control channel. */ virtual void HandleControlChannel(); /**Handle incoming data on the control channel. This decodes the data stream into a PDU and calls HandleControlPDU(). If FALSE is returned the connection is aborted. The default behaviour returns TRUE. */ virtual BOOL HandleControlData( PPER_Stream & strm ); /**Handle incoming PDU's on the control channel. Dispatches them to the various virtuals off this class. If FALSE is returned the connection is aborted. The default behaviour returns TRUE. */ virtual BOOL HandleControlPDU( const H323ControlPDU & pdu ); /**This function is called from the HandleControlPDU() function for unhandled PDU types. If FALSE is returned the connection is aborted and a Release Complete PDU is sent. The default behaviour returns TRUE. The default behaviour send a FunctioNotUnderstood indication back to the sender, and returns TRUE to continue operation. */ virtual BOOL OnUnknownControlPDU( const H323ControlPDU & pdu /// Received PDU ); /**Handle incoming request PDU's on the control channel. Dispatches them to the various virtuals off this class. */ virtual BOOL OnH245Request( const H323ControlPDU & pdu /// Received PDU ); /**Handle incoming response PDU's on the control channel. Dispatches them to the various virtuals off this class. */ virtual BOOL OnH245Response( const H323ControlPDU & pdu /// Received PDU ); /**Handle incoming command PDU's on the control channel. Dispatches them to the various virtuals off this class. */ virtual BOOL OnH245Command( const H323ControlPDU & pdu /// Received PDU ); /**Handle incoming indication PDU's on the control channel. Dispatches them to the various virtuals off this class. */ virtual BOOL OnH245Indication( const H323ControlPDU & pdu /// Received PDU ); /**Handle H245 command to send terminal capability set. */ virtual BOOL OnH245_SendTerminalCapabilitySet( const H245_SendTerminalCapabilitySet & pdu /// Received PDU ); /**Handle H245 command to control flow control. This function calls OnLogicalChannelFlowControl() with the channel and bit rate restriction. */ virtual BOOL OnH245_FlowControlCommand( const H245_FlowControlCommand & pdu /// Received PDU ); /**Handle H245 miscellaneous command. This function passes the miscellaneous command on to the channel defined by the pdu. */ virtual BOOL OnH245_MiscellaneousCommand( const H245_MiscellaneousCommand & pdu /// Received PDU ); /**Handle H245 miscellaneous indication. This function passes the miscellaneous indication on to the channel defined by the pdu. */ virtual BOOL OnH245_MiscellaneousIndication( const H245_MiscellaneousIndication & pdu /// Received PDU ); /**Handle H245 indication of received jitter. This function calls OnLogicalChannelJitter() with the channel and estimated jitter. */ virtual BOOL OnH245_JitterIndication( const H245_JitterIndication & pdu /// Received PDU ); /**Error discriminator for the OnControlProtocolError() function. */ enum ControlProtocolErrors { e_MasterSlaveDetermination, e_CapabilityExchange, e_LogicalChannel, e_ModeRequest, e_RoundTripDelay }; /**This function is called from the HandleControlPDU() function or any of its sub-functions for protocol errors, eg unhandled PDU types. The errorData field may be a string or PDU or some other data depending on the value of the errorSource parameter. These are: e_UnhandledPDU &H323ControlPDU e_MasterSlaveDetermination const char * If FALSE is returned the connection is aborted. The default behaviour returns TRUE. */ virtual BOOL OnControlProtocolError( ControlProtocolErrors errorSource, // Source of the proptoerror const void * errorData = NULL // Data associated with error ); /**This function is called from the HandleControlPDU() function when it is about to send the Capabilities Set to the remote endpoint. This gives the application an oppurtunity to alter the PDU to be sent. The default behaviour will make "adjustments" for compatibiliry with some broken remote endpoints. */ virtual void OnSendCapabilitySet( H245_TerminalCapabilitySet & pdu /// PDU to send ); /**This function is called when the remote endpoint sends its capability set. This gives the application an opportunity to determine what codecs are available and if it supports any of the combinations of codecs. Note any codec types that are the remote system supports that are not in the codecs list member variable for the endpoint are ignored and not included in the remoteCodecs list. The default behaviour assigns the table and set to member variables and returns TRUE if the remoteCodecs list is not empty. */ virtual BOOL OnReceivedCapabilitySet( const H323Capabilities & remoteCaps, /// Capability combinations remote supports const H245_MultiplexCapability * muxCap, /// Transport capability, if present H245_TerminalCapabilitySetReject & reject /// Rejection PDU (if return FALSE) ); /**Return if this H245 connection is a master or slave */ BOOL IsH245Master() const; /**Start the round trip delay calculation over the control channel. */ void StartRoundTripDelay(); /**Get the round trip delay over the control channel. */ PTimeInterval GetRoundTripDelay() const; /**Call back for control channel open. This is called when the control channel has negotiated the master/slave relationship and the remote endpoint has acknowledged receipt of the capability set. If FALSE is returned the conenction is cleared. The default behaviour of this function is to call OnSelectLogicalChannels() and return TRUE. */ virtual BOOL OnControlChannelOpen(); //@} /**@name Logical Channel Management */ //@{ /**Call back to select logical channels to start. This function must be defined by the descendent class. It is used to select the logical channels to be opened between the two endpoints. There are three ways in which this may be called: when a "fast start" has been initiated by the local endpoint (via SendSignalSetup() function), when a "fast start" has been requested from the remote endpoint (via the OnReceivedSignalSetup() function) or when the H245 capability set (and master/slave) negotiations have completed (via the OnControlChannelOpen() function. The function would typically examine several member variable to decide which mode it is being called in and what to do. If fastStartState is FastStartDisabled then non-fast start semantics should be used. The H245 capabilities in the remoteCapabilities members should be examined, and appropriate transmit channels started using OpenLogicalChannel(). If fastStartState is FastStartInitiate, then the local endpoint has initiated a call and is asking the application if fast start semantics are to be used. If so it is expected that the function call OpenLogicalChannel() for all the channels that it wishes to be able to be use. A subset (possibly none!) of these would actually be started when the remote endpoint replies. If fastStartState is FastStartResponse, then this indicates the remote endpoint is attempting a fast start. The fastStartChannels member contains a list of possible channels from the remote that the local endpoint is to select which to accept. For each accepted channel it simply necessary to call the Start() function on that channel eg fastStartChannels[0].Start(); The default behaviour selects the first codec of each session number that is available. This is according to the order of the capabilities in the remoteCapabilities, the local capability table or of the fastStartChannels list respectively for each of the above scenarios. */ virtual void OnSelectLogicalChannels(); /**Select default logical channel for normal start. */ virtual void SelectDefaultLogicalChannel( unsigned sessionID /// Session ID to find default logical channel. ); /**Select default logical channel for fast start. */ virtual void SelectFastStartChannels( unsigned sessionID /// Session ID to find default logical channel. ); /**Open a new logical channel. This function will open a channel between the endpoints for the specified capability. If this function is called while there is not yet a conenction established, eg from the OnFastStartLogicalChannels() function, then a "trial" receiver/transmitter channel is created. This channel is not started until the remote enpoint has confirmed that they are to start. Any channels not confirmed are deleted. If this function is called later in the call sequence, eg from OnSelectLogicalChannels(), then it may only establish a transmit channel, ie fromRemote must be FALSE. */ virtual BOOL OpenLogicalChannel( const H323Capability & capability, /// Capability to open channel with unsigned sessionID, /// Session for the channel H323Channel::Directions dir /// Direction of channel ); /**This function is called when the remote endpoint want's to open a new channel. If the return value is FALSE then the open is rejected using the errorCode as the cause, this would be a value from the enum H245_OpenLogicalChannelReject_cause::Choices. The default behaviour simply returns TRUE. */ virtual BOOL OnOpenLogicalChannel( const H245_OpenLogicalChannel & openPDU, /// Received PDU for the channel open H245_OpenLogicalChannelAck & ackPDU, /// PDU to send for acknowledgement unsigned & errorCode /// Error to return if refused ); /**Create a new logical channel object. This is in response to a request from the remote endpoint to open a logical channel. */ virtual H323Channel * CreateLogicalChannel( const H245_OpenLogicalChannel & open, /// Parameters for opening channel BOOL startingFast, /// Flag for fast/slow starting. unsigned & errorCode /// Reason for create failure ); /**This function is called when the remote endpoint want's to create a new channel. If the return value is FALSE then the open is rejected using the errorCode as the cause, this would be a value from the enum H245_OpenLogicalChannelReject_cause::Choices. The default behaviour checks the capability set for if this capability is allowed to be opened with other channels that may already be open. */ virtual BOOL OnCreateLogicalChannel(
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -