EasyCVR對接華為IVS查詢目錄共享資訊列表介面的使用

語言: CN / TW / HK

EasyCVR在不斷開拓接入協議及平臺,目前我們正在對華為IVS平臺做對接測試。由於介面眾多,後期我們會挑幾個重要的介面跟大家介紹一下。本文介紹查詢共享目錄資訊列表這個介面。

方法定義:

//cpp code
IVS_INT32 IVS_SDK_GetShareCatalogList (
  IVS_INT32 iSessionID,
  const IVS_CHAR* pExDomainCode, 
  const IVS_INDEX_RANGE* pIndexRange,
  IVS_UINT32 bDirect,
  IVS_CHAR** pRspXml);

引數描述:

表1查詢目錄共享資訊響應XML:

使用示例:

//cpp code

IVS_INT32 iRet = IVS_FAIL;
iRet = IVS_SDK_Init();
if (IVS_SUCCEED != iRet)
{
  return 0;
}

IVS_LOGIN_INFO LoginReqInfo = {0};
LoginReqInfo.stIP.uiIPType = IP_V4;
strncpy(LoginReqInfo.stIP.cIP, "192.168.1.1, IVS_IP_LEN);
LoginReqInfo.uiPort = 9900;
strncpy(LoginReqInfo.cUserName, "Admin", IVS_NAME_LEN);
strncpy(LoginReqInfo.pPWD, "super123", IVS_PWD_LEN);

iRet = IVS_SDK_Login(&LoginReqInfo, &iSessionID);

if (IVS_SUCCEED == iRet)
{
  const IVS_CHAR* pExDomainCode = "33010000002000000002";
  bDirect = 1;
  IVS_INDEX_RANGE IndexRange = {0};
  IndexRange.uiFromIndex= 1;
  IndexRange.uiToIndex= 1024;

  IVS_CHAR* pRspXml = NULL;
  iRet = IVS_SDK_GetShareCatalogList(iSessionID, pExDomainCode, &IndexRange, bDirect, &pRspXml);

  if (IVS_SUCCEED == iRet)
  {
    //成功
    if (NULL != pRspXml)
    {
       IVS_SDK_ReleaseBuffer(pRspXml);
       pRspXml = NULL;
    }
  }
}