ooh245.h

来自「一个非常美妙的proxy。功能强大。基于sip的协议。如果还要的话」· C头文件 代码 · 共 637 行 · 第 1/2 页

H
637
字号
 * @param call           Pointer to call for which CLCAck message is received. * @param clcAck         Pointer to the received CloseLogicalChannelAck message. *  * @return               OO_OK, on success. OO_FAILED, on failure */EXTERN int ooOnReceivedCloseChannelAck(struct OOH323CallData* call,                                            H245CloseLogicalChannelAck* clcAck);/** * This function is used to handle received H245 message. Based on the type of message received, * it calls helper functions to process those messages. * @param call           Pointer to call for which a message is received. * @param pmsg           Pointer to the received H245 message. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooHandleH245Message(struct OOH323CallData *call, H245Message * pmsg);/** * This function is used to process received TCS message. It builds TCSAck message and queues it * into the calls outgoing queue. Also, starts Logical channel opening procedure if TCS and MSD * procedures have finished. * @param call           Pointer to call for which TCS is received. * @param pmsg           Pointer to the received message. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooOnReceivedTerminalCapabilitySet(struct OOH323CallData *call, H245Message *pmsg);/** * This function is used to send a TCSAck message to remote endpoint. * @param call           Pointer to call on which TCSAck has to be sent. * * @return               OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooH245AcknowledgeTerminalCapabilitySet(struct OOH323CallData *call);/** * This function is used to start OpenLogicalChannel procedure for all the * channels to be opened for the call. * @param call            Pointer to call for which logical channels have to be opened. * * @return                OO_OK, on success. OO_FAILED, on failure. */ EXTERN int ooOpenLogicalChannels(struct OOH323CallData *call);/** * This function is used to send OpenLogicalChannel message for audio/video  * channel. * @param call            Pointer to call for which  channel has to be opened. * @param capType         Type of media channel. * * @return                OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooOpenLogicalChannel(struct OOH323CallData *call,                                 enum OOCapType capType);/** * This function is used to build and send OpenLogicalChannel message using *  capability passed as parameter. * @param call            Pointer to call for which OpenLogicalChannel message  *                        has to be built. * @param epCap           Pointer to capability *  * @return                OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooOpenChannel(struct OOH323CallData* call, ooH323EpCapability *epCap);/** * This function is used to send dtmf digits as user input indication message * contating alphanumeric string. * @param call            Handle to the call for which dtmf has to be sent. * @param data            DTMF data * * @return                OO_OK, on success; OO_FAILED, on failure. */EXTERN int ooSendH245UserInputIndication_alphanumeric   (OOH323CallData *call, const char *data);/** * This function is used to send dtmf digits as user input indication message * contating dtmf signal type. * @param call            Handle to the call for which dtmf has to be sent. * @param data            DTMF data * * @return                OO_OK, on success; OO_FAILED, on failure. */EXTERN int ooSendH245UserInputIndication_signal   (OOH323CallData *call, const char *data);/** * This function is used to request a remote end point to close a logical * channel.  * @param call            Pointer to call for which the logical channel has to *                        be closed. * @param logicalChan     Pointer to the logical channel structure which needs *                        to be closed. * * @return                OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooSendRequestCloseLogicalChannel(struct OOH323CallData *call,                                             ooLogicalChannel *logicalChan);/** * This function is used to send a RequestChannelCloseRelease message when the * corresponding timer has expired. * @param call            Handle to the call * @param channelNum      Channel number. * * @return                OO_OK, on success. OO_FAILED, otherwise. */int ooSendRequestChannelCloseRelease(struct OOH323CallData *call, int channelNum);/** * This function handles the received RequestChannelClose message, verifies * that the requested channel is forward channel. It sends an acknowledgement * for the message followed by CloseLogicalChannel message. * @param call             Pointer to the call for which RequestChannelClose is *                         received. * @param rclc             Pointer to the received message. * * @return                 OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooOnReceivedRequestChannelClose(struct OOH323CallData *call,                                            H245RequestChannelClose *rclc);/** * This function is used to handle a received RequestChannelCloseReject  * response message. * @param call             Handle to the call. * @param rccReject        Pointer to the received reject response message. * * @return                 OO_OK, on success. OO_FAILED, on failure. */int ooOnReceivedRequestChannelCloseReject   (struct OOH323CallData *call, H245RequestChannelCloseReject *rccReject);/** * This function is used to handle a received RequestChannelCloseAck  * response message. * @param call             Handle to the call. * @param rccAck           Pointer to the received ack response message. * * @return                 OO_OK, on success. OO_FAILED, on failure. */int ooOnReceivedRequestChannelCloseAck   (struct OOH323CallData *call, H245RequestChannelCloseAck *rccAck);/** * Builds an OLC for faststart with an audio/video capability passed as  * parameter. * @param call             Handle to call for which OLC has to be built. * @param olc              Pointer to an OLC structure which will be populated. * @param epCap            Pointer to the capability which will be used to  *                         build OLC. * @param pctxt            Pointer to an OOCTXT structure which will be used  *                         to allocate additional memory for OLC. * @param dir              Direction of OLC * * @return                 OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooBuildFastStartOLC(struct OOH323CallData *call,                                           H245OpenLogicalChannel *olc,                                           ooH323EpCapability *epCap,                                           OOCTXT*pctxt, int dir);/** * Prepares a faststart response olc from the olc received in SETUP message. * This function just changes the mediaChannel and mediaControl channel part * of the olc received in SETUP. * @param call             Handle to call for which OLC has to be built. * @param olc              Pointer to an received OLC structure. * @param epCap            Pointer to the capability which will be used for  *                         this channel. * @param pctxt            Pointer to an OOCTXT structure which will be used  *                         to allocate additional memory for OLC. * @param dir              Direction of channel OORX, OOTX etc. * * @return                 OO_OK, on success. OO_FAILED, on failure. */EXTERN int ooPrepareFastStartResponseOLC   (OOH323CallData *call, H245OpenLogicalChannel *olc,     ooH323EpCapability *epCap, OOCTXT*pctxt, int dir);/** * This function is used to encode an H245 message and return encoded data * into the buffer passed as a parameter to the function. * @param call            Handle to the call * @param ph245Msg        Handle to the message to be encoded. * @param msgbuf          buffer in which encoded message will be returned. * @param size            Size of the buffer. * * @return                OO_OK, on success. OO_FAILED, on failure */EXTERN int ooEncodeH245Message(struct OOH323CallData *call, H245Message *ph245Msg, char *msgbuf, int size);/** * This function is used to send a master-slave determination release message. * @param call             Handle to call, for which MSDRelease message has *                         to be sent. * * @return                 OO_OK, on success. OO_FAILED, on failure. */int ooSendMasterSlaveDeterminationRelease(struct OOH323CallData * call);/** * This function is used to send a terminal capability set reject message * to the remote endpoint. * @param call             Handle to the call for which reject message has to  *                         be sent. * @param seqNo            Sequence number of the TCS message to be rejected. * @param cause            Cause for rejecting a TCS message. * * @return                 OO_OK, on success; OO_FAILED, otherwise. */int ooSendTerminalCapabilitySetReject    (struct OOH323CallData *call, int seqNo, ASN1UINT cause);/** * This function is used to send a TerminalCapabilitySetRelease message after * capability exchange timer has expired. * @param call            Handle to call for which release message has to be  *                        sent. * * @return                OO_OK, on success; OO_FAILED, on failure. */int ooSendTerminalCapabilitySetRelease(struct OOH323CallData * call);/** * This is an helper function used to extract ip address and port info from  * H245TransportAddress structure. * @param call           Handle to associated call. * @param h245Address    Handle to H245TransportAddress structure from which  *                       information has to be extracted. * @param ip             Pointer to buffer in which ip address will be  *                       returned. Make sure that buffer has sufficient length. * @param port           Pointer to integer in which port number will be  *                       returned. * * @return               OO_OK, on success. OO_FAILED, on failure. */int ooGetIpPortFromH245TransportAddress   (OOH323CallData *call, H245TransportAddress *h245Address, char *ip,     int *port);/** * This is a callback function for handling an expired master-slave  * determination timer. * @param data             Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooMSDTimerExpired(void *data);/** * This is a callback function for handling an expired capability exchange  * timer. * @param data             Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooTCSTimerExpired(void *data);/** * This is a callback function for handling an expired OpenLogicalChannel  * timer. * @param pdata            Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooOpenLogicalChannelTimerExpired(void *pdata);/** * This is a callback function for handling an expired CloseLogicalChannel  * timer. * @param pdata            Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooCloseLogicalChannelTimerExpired(void *pdata);/** * This is a callback function for handling an expired RequestChannelClose  * timer. * @param pdata            Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooRequestChannelCloseTimerExpired(void *pdata);/** * This is a callback function for handling an expired EndSession timer. * @param pdata            Callback data registered at the time of creation of  *                         the timer. * * @return                 OO_OK, on success. OO_FAILED, otherwise. */int ooSessionTimerExpired(void *pdata);/**  * @}  */#ifdef __cplusplus}#endif#endif

⌨️ 快捷键说明

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