📄 transport.h
字号:
*
* Output: None.
*
* Returned Value: cmTransWouldBlock - In case that there aren't enough buffers.
* cmTransOK - In case that the send was successful.
* cmTrandErr - In case of fatal error.
*
**************************************************************************************/
TRANSERR cmTransSendMessage(IN HSTRANSSESSION hsTransSession,
IN int pvtNode,
IN TRANSTYPE type);
/**************************************************************************************
* cmTransSendH450Message
*
* Purpose: Sends a tunneled encoded message for the given session thru its host connection.
*
* Input: hsTransSession - the handle to the session.
* buffer - The encoded tunneled message.
* size - The size of the encoded message.
* flags:
* CM_H450_NO_FLAGS - will send on the next outgoing message, and will
* initiate a facility messgae if call is connected.
* CM_H450_FORCE - will force the stack to send a facility message
* with the APDU.
* CM_H450_ALERTING - will send the APDU only with an alerting or a
* connect message
*
* Output: None.
*
* Returned Value: cmTransWouldBlock - Last message was not sent yet, can't accept new one.
* cmTransOK - In case that the send was successful.
* cmTrandErr - In case of fatal error.
*
**************************************************************************************/
TRANSERR cmTransSendH450Message(IN HSTRANSSESSION hsTransSession,
IN RvUint8 *buffer,
IN int size,
IN RvUint flags);
/**************************************************************************************
* cmTransSendTunneledMessage
*
* Purpose: Sends a tunneled encoded message for the given session thru its host connection.
*
* Input: hsTransSession - the handle to the session.
* msg - The node id of the encoded tunneled message.
* type - The type of the message (AnnexM/AnnexL etc.)
* force - Should we send a facility immediately with the message.
*
* Output: None.
*
* Returned Value: cmTransWouldBlock - Last message was not sent yet, can't accept new one.
* cmTransOK - In case that the send was successful.
* cmTrandErr - In case of fatal error.
*
**************************************************************************************/
TRANSERR cmTransSendTunneledMessage(IN HSTRANSSESSION hsTransSession,
IN int msg,
IN TRANSTYPE type,
IN RvBool force);
/**************************************************************************************
* cmTransEstablishControl
*
* Purpose: Starts a H.245 control for a given session after fast start or no control
* exists. If tunneling allowed, will use tunneling, else will open a "true"
* H.245 connection.
*
* Input: hsTransSession - the handle to the session.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransEstablishControl(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransSwitchToSeparate
*
* Purpose: Starts a "true" H.245 control connection for a given session.
* Can be called when the call is in Fast Start, tunneling or no control.
*
* Input: hsTransSession - the handle to the session.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSwitchToSeparate(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransCreateControlSession
*
* Purpose: Starts a "true" H.245 control connection, in case that H.245 is allowed.
*
* Input: hsTransSession - the handle to the session with which the new H.245
* control is to be associated.
* addr - the address to listen or connect to.
* startListen - RV_TRUE: start listenning on the address.
* RV_FALSE: try to connect to the addr.
* nullControlSession - RV_TRUE: Create a dummy control session that is not connected
* to anywhere.
* RV_FALSE: Create a normal control session according to
* the given params.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransCreateControlSession(IN HSTRANSSESSION hsTransSession,
IN cmTransportAddress *addr,
IN RvBool startListen,
IN RvBool nullControlSession);
/**************************************************************************************
* cmTransCloseControlSession
*
* Purpose: closes an H.245 connection for a given session.
*
* Input: hsTransSession - The handle of the new or old sesson associated with the
* new H.245 control.
*
* Output: None.
*
* returned value: cmTransErr - in case of error, cmTransOK - otherwise
*
**************************************************************************************/
TRANSERR cmTransCloseControlSession(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransTryControlAfterACF
*
* Purpose: sees if H245 control session should be oprned after ACF.
*
* Input: hsTransSession - The handle of the new or old sesson associated with the
* new H.245 control.
*
* Output: None.
*
* returned value: cmTransErr - in case of error, cmTransOK - otherwise
*
**************************************************************************************/
TRANSERR cmTransTryControlAfterACF(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransHasControlSession
*
* Purpose: reports whether an H.245 connection exists and connected.
*
* Input: hsTransSession - The handle of the sesson associated with the H.245 control.
*
* Output: None.
*
* returned value: RV_TRUE - The h245 exists and connected; RV_FALSE - Otherwise
*
**************************************************************************************/
RvBool cmTransHasControlSession(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransHasControlSession
*
* Purpose: reports whether an H.245 connection exists and connected.
*
* Input: hsTransSession - The handle of the sesson associated with the H.245 control.
*
* Output: addr - local address of the H.245 connection
*
* returned value: RV_TRUE - The h245 exists and connected; RV_FALSE - Otherwise
*
**************************************************************************************/
void cmTransGetGoodAddressForH245(IN HSTRANSSESSION hsTransSession,
INOUT cmTransportAddress *addr);
/**************************************************************************************
* cmTransGetHApp
*
* Purpose: gets the hApp element according to the given host
*
* Input: hsTransHost - The handle of the host.
*
* returned value: hAppATrans - The user associated handle to the module instance.
*
**************************************************************************************/
HAPPATRANS cmTransGetHApp(IN HSTRANSHOST hsTransHost);
/**************************************************************************************
* cmTransSetHostApplHandle
*
* Purpose: Changes host application handle
*
* Input: hsTransHost - The handle of the host.
* haTransHost - The new host application handle.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSetHostApplHandle(IN HSTRANSHOST hsTransHost,
IN HATRANSHOST haTransHost);
/**************************************************************************************
* cmTransGetHostApplHandle
*
* Purpose: Retrieves host application handle
*
* Input: hsTransHost - The handle of the host.
*
* Output: haTransHost - The host application handle.
*
**************************************************************************************/
TRANSERR cmTransGetHostApplHandle(IN HSTRANSHOST hsTransHost,
OUT HATRANSHOST *haTransHost);
/**************************************************************************************
* cmTransHostSendMessage
*
* Purpose: Sends the message on the host
*
* Input: hsTransHost - The handle of the host.
* pvtNode - The pvtNodeId of the message to be sent
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransHostSendMessage(IN HSTRANSHOST hsTransHost,
IN int pvtNode);
/**************************************************************************************
* cmTransGetHostsStats
*
* Purpose: retrieves the current and max used number of hosts.
*
* Input: happTrans - The handle to the instance of the transport module.
*
* Output: curSize - The current amount of hosts used (Q.931 (TPKT & Annex E) + H.245)
* maxSize - The maximum amount used so far of hosts (Q.931 (TPKT & Annex E) + H.245)
*
**************************************************************************************/
TRANSERR cmTransGetHostsStats(IN HAPPTRANS hAppTrans, IN int *curSize, IN int *maxSize);
/**************************************************************************************
* cmTransGetMessagesStats
*
* Purpose: retrieves the current and max used number of messages saved before sending.
*
* Input: happTrans - The handle to the instance of the transport module.
*
* Output: curSize - The current amount of messages in the pool.
* maxSize - The maximum amount that was so far in the pool.
*
**************************************************************************************/
TRANSERR cmTransGetMessagesStats(IN HAPPTRANS hAppTrans, IN int *curSize, IN int *maxSize);
/**************************************************************************************
* cmTransIsParallel
*
* Purpose: tells whether we are in parallel (fast start and tunneling) operation.
*
* Input: hsTransSession - the session.
*
* Output: None.
*
* Returned Value: RV_TRUE - we are in parallel operation.
* RV_FALSE - Otherwise.
**************************************************************************************/
RvBool cmTransIsParallel(IN HSTRANSSESSION hsTransSession);
/*---------------------------------------------------------------------------------------
* dummyControlSession :
*
* defines if the control session is dummy
*
* Input: hsTranSession - An handle to the created session element
* Output: none
* Return: 1 - if control session is DUMMY.
* 0 - otherwise
*---------------------------------------------------------------------------------------*/
RvBool dummyControlSession(IN HSTRANSSESSION hsTransSession);
/*---------------------------------------------------------------------------------------
* triggerH245AfterACF :
*
* triggers the setup/early H.245 connection after ACF was received for the call
*
* Input: hsTranSession - handle to the call's session element
* Output: none
* Return: cmTransOK
*---------------------------------------------------------------------------------------*/
TRANSERR triggerH245AfterACF(IN HSTRANSSESSION hsTransSession);
#ifdef __cplusplus
}
#endif
#endif /* _TRANSPORT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -