⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cmiras.h

📁 基于h323协议的软phone
💻 H
📖 第 1 页 / 共 2 页
字号:
/************************************************************************
 * cmEvRasMessageReceiveFunc
 * purpose: Callback function that the RAS calls when a RAS message
 *          is received.
 *          This callback function can be used between DLLs and is
 *          used by the MIB package.
 * input  : nodeId      - pvt node of the received message
 *          rasTrStage  - Stage of the transaction we're in
 *          hsRas       - Stack's handle for the RAS transaction
 *          hAppRas     - Application's handle of this RAS message type
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
typedef int (RVCALLCONV *cmEvRasMessageReceiveFunc)(
    IN int              nodeId,
    IN cmRASTrStage     rasTrStage,
    IN HRAS             hsRas,
    IN HAPPRASMSG       hAppRas);


/************************************************************************
 * cmEvRasMessageSendFunc
 * purpose: Callback function that the RAS calls when a RAS message
 *          is sent.
 *          This callback function can be used between DLLs and is
 *          used by the MIB package.
 * input  : nodeId      - pvt node of the received message
 *          rasTrStage  - Stage of the transaction we're in
 *          hsRas       - Stack's handle for the RAS transaction
 *          hAppRas     - Application's handle of this RAS message type
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
typedef int (RVCALLCONV *cmEvRasMessageSendFunc)(
    IN int          nodeId,
    IN cmRASTrStage rasTrStage,
    IN HRAS         hsRas,
    IN HAPPRASMSG   hAppRas);


/************************************************************************
 * cmiEvRASEPRequestT
 * purpose: Callback function that the RAS calls when a new incoming
 *          RAS request that is not related to any particular call
 *          is being handled
 * input  : hApp        - Stack instance handle
 *          hsRas       - Stack's handle for the RAS transaction
 *          transaction - The type of transaction that arrived
 *          srcAddress  - Address of the source
 *          notifyCb    - Callback for application about the request
 * output : none
 * return : RV_TRUE if message was processed by this callback and shouldn't
 *          be processed by the manual RAS callbacks
 *          RV_FALSE if message wasn't processed by this callback
 ************************************************************************/
typedef RvBool (RVCALLCONV *cmiEvRASEPRequestT)(
    IN  HAPP                hApp,
    IN  HRAS                hsRas,
    IN  cmRASTransaction    transaction,
    IN  cmRASTransport*     srcAddress,
    IN  cmEvAutoRASRequestT notifyCb);


/************************************************************************
 * cmiEvRASCallRequestT
 * purpose: Callback function that the RAS calls when a new incoming
 *          RAS request that is related to a specific call that
 *          is being handled
 * input  : hApp        - Stack instance handle
 *          hsRas       - Stack's handle for the RAS transaction
 *          hsCall      - Stack's call handle
 *          transaction - The type of transaction that arrived
 *          srcAddress  - Address of the source
 *          haCall      - Application's call handle
 *          notifyCb    - Callback for application about the request
 * output : none
 * return : RV_TRUE if message was processed by this callback and shouldn't
 *          be processed by the manual RAS callbacks
 *          RV_FALSE if message wasn't processed by this callback
 ************************************************************************/
typedef RvBool (RVCALLCONV *cmiEvRASCallRequestT)(
    IN  HAPP                hApp,
    IN  HRAS                hsRas,
    IN  HCALL               hsCall,
    IN  cmRASTransaction    transaction,
    IN  cmRASTransport*     srcAddress,
    IN  HAPPCALL            haCall,
    IN  cmEvAutoRASRequestT notifyCb);


/************************************************************************
 * cmiEvRASResponseT
 * purpose: Callback function that the RAS calls when a new incoming
 *          RAS response has to be handled
 * input  : haRas       - The application's RAS transaction handle
 *          hsRas       - Stack's handle for the RAS transaction
 *          trState     - Transaction stage we're in
 * output : none
 * return : non-negative value on success
 *          negative value on failure
 ************************************************************************/
typedef int (RVCALLCONV *cmiEvRASResponseT)(
    IN  HAPPRAS          haRas,
    IN  HRAS             hsRas,
    IN  cmRASTrStage     trStage);



/************************************************************************
 * cmRasMessageEvent struct
 * This struct holds the events of received and sent messages.
 * It is used by the MIB to get information about the RAS messages.
 * hAppRasMsg               - Application's handle for RAS messages
 * cmEvRasMessageReceive    - Callback function for received RAS messages
 * cmEvRasMessageSend       - Callback function for sent RAS messages
 ************************************************************************/
typedef struct
{
    HAPPRASMSG                  hAppRasMsg;
    cmEvRasMessageReceiveFunc   cmEvRasMessageReceive;
    cmEvRasMessageSendFunc      cmEvRasMessageSend;
} cmRasMessageEvent;



/************************************************************************
 * cmiRASSetSendEventHandler
 * purpose: Set the callback function to use for sending messages through
 *          the network.
 * input  : hRasMgr         - RAS module to set
 *          evMessageToSend - Callback function to use
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
int RVCALLCONV cmiRASSetSendEventHandler(
    IN  HRASMGR                 hRasMgr,
    IN  cmiEvRasMessageToSend   evMessageToSend);


/************************************************************************
 * cmiRASSetTrEventHandler
 * purpose: Set the callback function to use for responses to RAS
 *          transactions.
 *          It is called per transaction if the stack wishes to be
 *          notified of the response.
 * input  : hRas            - The application's RAS transaction handle
 *                            to deal with
 *          cmEvRASResponse - The callback to use
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
int RVCALLCONV cmiRASSetTrEventHandler(
    IN  HRAS                hRas,
    IN  cmiEvRASResponseT   cmEvRASResponse);


/************************************************************************
 * cmiRASSetEPTrEventHandler
 * purpose: Set the callback function to use for new RAS requests that
 *          are not related to specific calls.
 * input  : hApp            - Application's handle for a stack instance
 *          cmEvRASRequest  - The callback to use
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
int RVCALLCONV cmiRASSetEPTrEventHandler(
    IN  HAPP                hApp,
    IN  cmiEvRASEPRequestT  cmEvRASEPRequest);


/************************************************************************
 * cmiRASSetCallTrEventHandler
 * purpose: Set the callback function to use for new RAS requests that
 *          are related to specific calls.
 * input  : hApp            - Application's handle for a stack instance
 *          cmEvRASRequest  - The callback to use
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
int RVCALLCONV cmiRASSetCallTrEventHandler(
    IN  HAPP                    hApp,
    IN  cmiEvRASCallRequestT    cmEvRASCallRequest);


/************************************************************************
 * cmRASMsgSetEventHandler
 * purpose: Set the callback function to use for RAS messages.
 *          Used specifically by the MIB.
 * input  : hApp            - Application's handle for a stack instance
 *          cmRASMsgEvent   - The callbacks to use
 *          size            - Size of the callbacks struct
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 * note   : This function is part of an API that wasn't published. It
 *          is used for H235v1.
 ************************************************************************/
RVAPI
int RVCALLCONV cmRASMsgSetEventHandler(
    IN  HAPP                hApp,
    IN  cmRasMessageEvent*  cmRASMsgEvent,
    IN  int                 size);



/************************************************************************
 * cmiRASGetProperty
 * purpose: Gets the pvt node of the RAS property DB
 * input  : hsRas       - Stack's handle for the RAS transaction
 * output : none
 * return : pvt node of the RAS property DB
 *          or negative value on error
 ************************************************************************/
int cmiRASGetProperty(
    IN  HRAS         hsRas);


/************************************************************************
 * cmiEvRASNewCallT
 * purpose: Callback function that the RAS calls when a new call is detected
 * input  : hApp        - Application's handle for a stack instance
 *        : lphCatCall  - the pointer where to put the CAT handle
 *        : callObj     - call parameters
 * output : none
 * return : Non-negative value on success
 *          Negative value on failure
 ************************************************************************/
typedef int (*cmiEvRASNewCallT)(
    IN HAPP         hApp,
    IN RVHCATCALL*  lphCatCall,
    IN catStruct*   callObj);



/************************************************************************
 * cmiRASSetNewCallEventHandler
 * purpose: Set the callback function to use when RAS detects new call
 *
 * input  : hApp            - Application's handle for a stack instance
 *          cmiEvRASNewCall - The callback for new call
 * output : none
 * return : If an error occurs, the function returns a negative value.
 *          If no error occurs, the function returns a non-negative value.
 ************************************************************************/
int cmiRASSetNewCallEventHandler(
    IN  HAPP                hApp,
    IN  cmiEvRASNewCallT    cmiEvRASNewCall);





#ifdef __cplusplus
}
#endif

#endif  /* _CMIRAS_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -