📄 transport.h
字号:
IN RvBool annexESupported,
IN RvPortRange* portRange);
/**************************************************************************************
* cmTransStart
*
* Purpose: To start the listenning process on TPKT and/or Annex E
*
* Input: happTrans - The handle to the instance of the transport module.
* TPKTcallSignalingAddr - The TPKT Q.931 listenning address.
* annexEcallSignalingAddr - The annex E address.
* localIPAddress - The local IP address as was received from the config.
* cmTransAnnexEParam - The annex E configuration parameters
* Output: None.
*
* Returned value: cmTransOK - if success; cmTransErr - otherwise
*
**************************************************************************************/
TRANSERR cmTransStart(IN HAPPTRANS happTrans,
IN cmTransportAddress *TPKTcallSignalingAddr,
IN cmTransportAddress *annexEcallSignalingAddr,
IN int localIPAddress,
IN CMTRANSANNEXEPARAM *cmTransAnnexEParam);
/**************************************************************************************
* cmTransStop
*
* Purpose: Stops all the listenning processes that were started by cmTransStart.
*
* Input: hAppTrans - A handle to the entire transport module
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransStop(IN HAPPTRANS hAppTrans);
/**************************************************************************************
* cmTransEnd
*
* Purpose: Shuts down the module and deallocates all its components.
*
* Input: hAppTrans - A handle to the entire transport module
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransEnd(IN HAPPTRANS hAppTrans);
/**************************************************************************************
* cmTransCreateSession
*
* Purpose: Creates a new session element according to its parameters.
*
* Input: hAppTrans - A handle to the entire transport module
* haTranSession - An application handle to be set to the session, ususally
* would be the call handle that is associated with this session.
*
* Output: hsTranSession - An handle to the created session element
*
**************************************************************************************/
TRANSERR cmTransCreateSession( IN HAPPTRANS hAppTrans,
IN HATRANSSESSION haTransSession,
OUT HSTRANSSESSION *hsTransSession);
/**************************************************************************************
* cmTransDrop
*
* Purpose: Drop a session (put its state in Idle).
*
* Input: hsTranSession - An handle to the session element
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransDrop(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransCloseSession
*
* Purpose: Deletes a session element.
*
* Input: hsTranSession - An handle to the session element
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransCloseSession(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransCreateHost
*
* Purpose: Creates a new host element according to its parameters.
*
* Input: hAppTrans - A handle to the entire transport module
* haTranHost - An application handle to be set to the host element.
*
* Output: hsTranHost - An handle to the created host element
*
**************************************************************************************/
TRANSERR cmTransCreateHost( IN HAPPTRANS hAppTrans,
IN HATRANSHOST haTransHost,
OUT HSTRANSHOST *hsTransHost);
/**************************************************************************************
* cmTransCloseHost
*
* Purpose: Deletes a host element. Will notify all its associates sessions.
*
* Input: hsTranHost - An handle to the host element
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransCloseHost(IN HSTRANSHOST hsTransHost);
/**************************************************************************************
* cmTransSetSessionParam
*
* Purpose: Sets a specific parameter for the given session element.
*
* Input: hsTranSession - An handle to the session element
* param - The name of the parameter to be set.
* value - An integer or pointer to set as the new parameter.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSetSessionParam(IN HSTRANSSESSION hsTransSession,
IN TRANSSESSIONPARAM param,
IN void *value);
/**************************************************************************************
* cmTransGetSessionParam
*
* Purpose: Gets a specific parameter from a given session element.
*
* Input: hsTranSession - An handle to the session element
* param - The name of the parameter to get.
*
* Output: value - An integer or pointer which is the value of the parameter.
*
**************************************************************************************/
TRANSERR cmTransGetSessionParam(IN HSTRANSSESSION hsTransSession,
IN TRANSSESSIONPARAM param,
OUT void *value);
/**************************************************************************************
* cmTransSetHostParam
*
* Purpose: Sets a specific parameter for the given host element.
*
* Input: hsTranHost - An handle to the host element
* param - The name of the parameter to be set.
* value - An integer or pointer to set as the new parameter.
* force - In case of multiplexing parameters force the sending of FACILITY
* to the remote with the new parameters.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSetHostParam( IN HSTRANSHOST hsTransHost,
IN TRANSHOSTPARAM param,
IN void *value,
IN RvBool force);
/**************************************************************************************
* cmTransGetHostParam
*
* Purpose: Gets a specific parameter from a given host element.
*
* Input: hsTranHost - An handle to the host element
* param - The name of the parameter to get.
*
* Output: value - An integer or pointer which is the value of the parameter.
*
**************************************************************************************/
TRANSERR cmTransGetHostParam( IN HSTRANSHOST hsTransHost,
IN TRANSHOSTPARAM param,
OUT void *value);
/**************************************************************************************
* cmTransSetSessionEventHandler
*
* Purpose: Sets the event handlers' pointers for session related callbacks
*
* Input: hAppTrans - A handle to the entire transport module
* transSessionEvents - A structure with the pointers to the callbacks
* size - The size of that structure.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSetSessionEventHandler( IN HAPPTRANS hAppTrans,
IN TRANSSESSIONEVENTS *transSessionEvents,
IN int size);
/**************************************************************************************
* cmTransGetSessionEventHandler
*
* Purpose: Gets the event handlers' pointers for session related callbacks
*
* Input: hAppTrans - A handle to the entire transport module
* size - The size of the given structure.
*
* Output: transSessionEvents - A structure with the pointers to the callbacks
*
**************************************************************************************/
TRANSERR cmTransGetSessionEventHandler( IN HAPPTRANS hAppTrans,
OUT TRANSSESSIONEVENTS *transSessionEvents,
IN int size);
/**************************************************************************************
* cmTransSetHostEventHandler
*
* Purpose: Sets the event handlers' pointers for host related callbacks
*
* Input: hAppTrans - A handle to the entire transport module
* transHostEvents - A structure with the pointers to the callbacks
* size - The size of that structure.
*
* Output: None.
*
**************************************************************************************/
TRANSERR cmTransSetHostEventHandler( IN HAPPTRANS hAppTrans,
IN TRANSHOSTEVENTS *transHostEvents,
IN int size);
/**************************************************************************************
* cmTransGetHostEventHandler
*
* Purpose: Gets the event handlers' pointers for host related callbacks
*
* Input: hAppTrans - A handle to the entire transport module
* size - The size of the given structure.
*
* Output: transHostEvents - A structure with the pointers to the callbacks
*
**************************************************************************************/
TRANSERR cmTransGetHostEventHandler( IN HAPPTRANS hAppTrans,
OUT TRANSHOSTEVENTS *transHostEvents,
IN int size);
/**************************************************************************************
* cmTransSetAddress
*
* Purpose: sets the address, local and remote, or a host for a given session.
* This routine serves both Q.931 (TPKT & annex E) and H.245 connections.
*
* Input: hsTransSession - the handle to the session.
* localAddress - the local address to connect from or listen on.
* remoteAddress - The remote TPKT address to connect to.
* annexEremoteAddress - The remote annex E address to connect to.
* hsTransHost - An optional host that overrides the given addresses.
* type - Q.931 TPKT or H.245 addresses.
* newMultiplex - RV_TRUE: create new host even if multiplexed
* RV_FALSE: for multiplex use existing host, if exists.
*
* Output: None.
*
* Returned Value: cmTransErr - In case that an error occured.
* cmTransNotMultiplexed - The given host is not multiplexed.
* cmTransOK - In case that the connection is already opened.
*
**************************************************************************************/
TRANSERR cmTransSetAddress(IN HSTRANSSESSION hsTransSession,
INOUT cmTransportAddress *localAddress,
IN cmTransportAddress *remoteAddress,
IN cmTransportAddress *annexEremoteAddress,
IN HSTRANSHOST hsTransHost,
IN TRANSCONNTYPE type,
IN RvBool newMultiplex);
/**************************************************************************************
* cmTransQ931Connect
*
* Purpose: Starts the process of connecting on behalf of the given session.
* For regular connection this will initiate a connect procedure,
* for multiplexed operation on an existing connection, this will
* report that a connection was established.
*
* Input: hsTransSession - the handle to the session.
*
* Output: None.
*
* Returned Value: cmTransWouldBlock - In case that a connect procedure was instigated but
* not yet completed.
* cmTransOK - In case that the connection is already opened.
*
**************************************************************************************/
TRANSERR cmTransQ931Connect(IN HSTRANSSESSION hsTransSession);
/**************************************************************************************
* cmTransSendMessage
*
* Purpose: Encodes and sends a message for the given session thru its host connection.
*
* Input: hsTransSession - the handle to the session.
* pvtNode - The pvt of the given decoded message.
* type - The type of the message (Q.931/H.245)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -