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

📄 cmhosts.c

📁 基于h323协议的软phone
💻 C
字号:
/***********************************************************************
        Copyright (c) 2002 RADVISION Ltd.
************************************************************************
NOTICE:
This document contains information that is confidential and proprietary
to RADVISION Ltd.. No part of this document may be reproduced in any
form whatsoever without written prior approval by RADVISION Ltd..

RADVISION Ltd. reserve the right to revise this publication and make
changes without obligation to notify any person of such revisions or
changes.
***********************************************************************/

#include "rvinternal.h"
#include "cm.h"
#include "cmCall.h"
#include "cmintr.h"
#include "cmdebprn.h"

#ifdef __cplusplus
extern "C" {
#endif


RVAPI
HPROTCONN RVCALLCONV cmGetTpktChanHandle(
    IN HCALL                hsCall,
    IN cmTpktChanHandleType tpktChanHandleType)
{
    HPROTCONN hProtCon=NULL;
    callElem*call=(callElem*)hsCall;
    cmElem* app=(cmElem*)emaGetInstance((EMAElement)call);
    if (!hsCall) return NULL;
    if (!app) return NULL;

    cmiAPIEnter((HAPP)app,(char*)"cmGetTpktChanHandle: hsCall=0x%p tpktChanHandleType = %d",hsCall,tpktChanHandleType);
    if (emaLock((EMAElement)hsCall))
    {
        TRANSSESSIONPARAM sessionParam = (TRANSSESSIONPARAM)-1;

        switch (tpktChanHandleType)
        {
            case cmQ931TpktChannel: sessionParam = cmTransParam_host; break;
            case cmH245TpktChannel: sessionParam = cmTransParam_H245Connection; break;
        }
        if (cmTransGetSessionParam(call->hsTransSession, sessionParam, (void*)&hProtCon) != cmTransOK)
            hProtCon = NULL;
        emaUnlock((EMAElement)hsCall);
    }
    cmiAPIExit((HAPP)app,(char*)"cmGetTpktChanHandle: hProtConn 0x%p",hProtCon);

    return hProtCon;
}


RVAPI
int RVCALLCONV cmSetTpktChanApplHandle(
    IN HPROTCONN    hConn,
    IN HAPPCONN     hAppConn)
{
    if (hConn != NULL)
    {
        if (cmTransSetHostApplHandle((HSTRANSHOST)hConn, (HATRANSHOST)hAppConn) == cmTransOK)
            return RV_TRUE;
    }
    return RV_ERROR_UNKNOWN;
}


RVAPI
int RVCALLCONV cmGetTpktChanApplHandle(
    IN  HPROTCONN   hConn,
    OUT HAPPCONN*   hAppConn)
{
    if (hConn && hAppConn)
    {
        if (cmTransGetHostApplHandle((HSTRANSHOST)hConn, (HATRANSHOST*)hAppConn)==cmTransOK)
            return RV_TRUE;
    }
    return RV_ERROR_UNKNOWN;
}







#ifdef __cplusplus
}
#endif

⌨️ 快捷键说明

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