//modify public int Login(string name, string pwd, string server1, string langID) { try { LogManager.SystemLog.Debug(string.Format("Start Login")); int iRet = UCInterface.UC_SDK_Init(); UCInterface.UC_SDK_SetLoginEventCB(clientSignInNotifyCB); UCInterface.UC_SDK_SetCallEventCallBack(avSessionClosedCB, avSessionConnectedCB, avSessAddedCB); UCInterface.UC_SDK_SetStatusChangedCB(statusChangedCB); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start Login error {0}", iRet)); return(iRet); } iRet = UCInterface.UC_SDK_SignInByPWD(name, pwd, server1, langID); LogManager.SystemLog.Debug(string.Format("End Login")); return(iRet); } catch (System.Exception ex) { LogManager.SystemLog.Error(ex.ToString()); return(-1); } }
public void SendDTMF(char tone) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SendDTMF")); int iRet = UCInterface.UC_SDK_SendDTMF(tone); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_SendDTMF = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SendDTMF")); }
/// <summary> /// 该函数用于设置盲转呼叫事件回调函数 /// </summary> /// <param name="crEventCallBack"></param> public void SetCallTransEventCallBack(CallTransEventCB CallTransCallBack) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetCallReservedEventCallBack")); int iRet = UCInterface.UC_SDK_SetCallTransEventCallBack(CallTransCallBack); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_SetCallTransEventCallBack = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetCallTransEventCallBack")); }
public void SetConfMemEventCallBack(ConfMemberEventCB confMemEventCallBack) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetConfMemEventCallBack")); int iRet = UCInterface.UC_SDK_SetConfMemEventCallBack(confMemEventCallBack); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_SetConfMemEventCallBack = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetConfMemEventCallBack")); }
public void GetSpkerLevel(ref int level) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetSpkerLevel")); int iRet = UCInterface.UC_SDK_GetSpkerLevel(ref level); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetSpkerLevel = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetSpkerLevel")); }
public void SetVideoCallEventCallBack(CallEventCB callEventCallBack) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetCallEventCallBack2")); int iRet = UCInterface.UC_SDK_SetVideoCallEventCallBack(callEventCallBack); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_SetCallEventCallBack2 = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetCallEventCallBack2")); }
public void UnMuteSpker() { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_UnMuteSpker")); int iRet = UCInterface.UC_SDK_UnMuteSpker(); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_UnMuteSpker = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_UnMuteSpker")); }
public void ModifyMemberStatusInCall(int operateType, int memberType, StringBuilder lyncAccount) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_ModifyMemberStatusInCall lyncAccount = {0}", lyncAccount.ToString())); int iRet = UCInterface.UC_SDK_ModifyMemberStatusInCall(operateType, memberType, lyncAccount); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_ModifyMemberStatusInCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_ModifyMemberStatusInCall")); }
public void DeleteMemberInCall(int memberType, StringBuilder lyncAccount) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_DeleteMemberInCall")); int iRet = UCInterface.UC_SDK_DeleteMemberInCall(memberType, lyncAccount); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_DeleteMemberInCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_DeleteMemberInCall")); }
public void GetUCAccount(string phoneNum, StringBuilder _UCAcc) //modify by jinyeqing 2015/6/9 之前是返回值是空值 现在返回INT { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetUCAccount")); int iRet = UCInterface.UC_SDK_GetUCAccount(phoneNum, _UCAcc); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetUCAccount = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetUCAccount")); }
public void ForwardCall(int iMemberType, string pMember) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_ForwardCall")); int iRet = UCInterface.UC_SDK_ForwardCall(iMemberType, pMember); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_ForwardCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_ForwardCall")); }
/// <summary> /// 结束通话 /// </summary> public void hangupCall() { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_HangupCall")); int iRet = UCInterface.UC_SDK_HangupCall(); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_HangupCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_HangupCall")); }
//endmodify public void GetContactStatus(int _AccountType, string _Account, ref int _Status) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetContactStatus")); int iRet = UCInterface.UC_SDK_GetContactStatus(_AccountType, _Account, ref _Status); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetContactStatus = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetContactStatus")); }
/// <summary> /// 该函数用于呼叫企业通讯录 /// </summary> /// <param name="strSearchKey">查询关键字。为空时表示查询所有列表</param> /// <param name="_fromIndex">查询起始序列号。要求返回的数据</param> /// <param name="_toIndex">查询截止序列号。要求返回的数据,注意最多查询100</param> /// <param name="_pContactList">返回的数据STContactList*</param> /// <returns>0</returns> public int GetEntContactList(string strSearchKey, int _fromIndex, int _toIndex, byte[] _pContactList) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetEntContactList")); int iRet = UCInterface.UC_SDK_GetEntContactList(strSearchKey, _fromIndex, _toIndex, _pContactList); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetEntContactList = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetEntContactList")); return(iRet); }
public int BlindTransCall(int iMemberType, string pMember) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_BlindTransCall")); int iRet = UCInterface.UC_SDK_BlindTransCall(iMemberType, pMember); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_BlindTransCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_BlindTransCall")); return(iRet); }
/// <summary> /// 插件呼叫管理模块的发起上下文呼叫业务接口 /// </summary> /// <param name="userID"></param> /// <param name="contactNum"></param> /// <param name="isVideo"></param> public int startContextCall() //modify by jinyeqing 2015/6/2 之前是返回值是空值 现在返回INT { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_MakeCall")); int iRet = UCInterface.UC_SDK_MakeCall(); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_MakeCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_MakeCall")); return(iRet); }
public int SetCallExService(int iMemberType, STCallExData pMember) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetCallExService")); int iRet = UCInterface.UC_SDK_SetCallExService(iMemberType, ref pMember); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_SetCallExService = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetCallExService")); return(iRet); }
public void AcceptVideoCall(ref STVideoWindow stLocalWnd, ref STVideoWindow stRemoteWnd)//接听视频呼叫 { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_AcceptVideoCall")); int iRet = UCInterface.UC_SDK_AcceptVideoCall(stLocalWnd.hWnd, stLocalWnd.left, stLocalWnd.top, stLocalWnd.width, stLocalWnd.height, stRemoteWnd.hWnd, stRemoteWnd.left, stRemoteWnd.top, stRemoteWnd.width, stRemoteWnd.height); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_AcceptVideoCall = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_AcceptVideoCall")); }
/// <summary> /// 增加成员 /// </summary> /// <param name="sipUri"></param> public int insertMember(int type, StringBuilder sipUri) //modify by jinyeqing 2015/6/9 之前是返回值是空值 现在返回INT { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_InsertMember")); int iRet = UCInterface.UC_SDK_AddCallMember(type, StringHelper.GetSubString(sipUri.ToString())); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_InsertMember = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_InsertMember")); return(iRet); }
public int GetCallExService(int _type, ref STCallExData _CallExData) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetCallExService")); int iRet = UCInterface.UC_SDK_GetCallExService(_type, ref _CallExData); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetCallExService = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetCallExService")); return(iRet); }
public int UC_SDK_TransCallToConf(byte[] _pContactList, int size) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_InviteMemberInCall")); int iRet = UCInterface.UC_SDK_TransCallToConf(_pContactList, size); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_TransCallToConf = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_TransCallToConf")); return(iRet); }
public int SignOut() { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SignOut")); int iRet = UCInterface.UC_SDK_SignOut(); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_SignOut error {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SignOut")); return(iRet); }
public int PubSelfStatus(int _Status, StringBuilder _Desc) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_PubSelfStatus")); int iRet = UCInterface.UC_SDK_PubSelfStatus(_Status, _Desc); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_PubSelfStatus error {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_PubSelfStatus")); return(iRet); }
public int SetPhoneJointEventCallBack(PhoneJointEventCB pjEventCallBack) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetPhoneJointEventCallBack")); int iRet = UCInterface.UC_SDK_SetPhoneJointEventCallBack(pjEventCallBack); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_SetPhoneJointEventCallBack error {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetPhoneJointEventCallBack")); return(iRet); }
public int SetPhoneJointDevType(int _pDevType) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_SetPhoneJointDevType")); int iRet = UCInterface.UC_SDK_SetPhoneJointDevType(_pDevType); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_SetPhoneJointDevType error {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_SetPhoneJointDevType")); return(iRet); }
//modify byjinyeqing 2015/6/10 public string GetUCAccountByPhoneNo(string phoneNum, StringBuilder _UCAcc) { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetUCAccount")); int iRet = UCInterface.UC_SDK_GetUCAccount(phoneNum, _UCAcc); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("UC_SDK_GetUCAccount = {0}", iRet)); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetUCAccount")); string UCAcc = _UCAcc.ToString().Trim(); return(UCAcc); }
/// <summary> /// 获取视频播放窗体参数 /// </summary> /// <param name="stLocalWnd"></param> /// <param name="stRemoteWnd"></param> public void GetVideoPlayPara(ref STVideoWindow stLocalWnd, ref STVideoWindow stRemoteWnd) { System.Drawing.Point phRemote = new System.Drawing.Point(); System.Drawing.Point phLocal = new System.Drawing.Point(); IntPtr intpRemote = new IntPtr(); System.Drawing.Point plRemote = new System.Drawing.Point(); IntPtr intpLocal = new IntPtr(); System.Drawing.Point plLocal = new System.Drawing.Point(); Dispatcher.Invoke(new Action(() => { intpRemote = (host.Child as UCVideo).Remote.Handle; intpLocal = (host.Child as UCVideo).Local.Handle; plRemote.X = 0; plRemote.Y = 0; UCInterface.ClientToScreen(intpRemote, ref plRemote); phRemote.X = (int)(host.Child as UCVideo).Remote.Width; phRemote.Y = (int)(host.Child as UCVideo).Remote.Height; UCInterface.ClientToScreen(intpRemote, ref phRemote); plLocal.X = 0; plLocal.Y = 0; UCInterface.ClientToScreen(intpLocal, ref plLocal); phLocal.X = (int)(host.Child as UCVideo).Local.Width; phLocal.Y = (int)(host.Child as UCVideo).Local.Height; UCInterface.ClientToScreen(intpLocal, ref phLocal); })); stRemoteWnd.height = phRemote.Y; stRemoteWnd.hWnd = (int)(intpRemote); stRemoteWnd.left = plRemote.X; stRemoteWnd.top = plRemote.Y; stRemoteWnd.width = phRemote.X; stLocalWnd.height = phLocal.Y; stLocalWnd.hWnd = (int)(intpLocal); stLocalWnd.left = plLocal.X; stLocalWnd.top = plLocal.Y; stLocalWnd.width = phLocal.X; SetWinSize(); //重新设置video尺寸 this.isreturn = false; //modify by jinyeqing 重置Video后由于线程原因仍会进入closewinvideo 所以还是要使用这个isreturn还判断避免在updatelayout this.IsReturn = true; }
public int AnswerCall()//该函数用于接听呼叫 { try { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_AcceptCall")); int iRet = UCInterface.UC_SDK_AcceptCall(); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_AcceptCall error {0}", iRet)); return(iRet); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_AcceptCall")); return(iRet); } catch (Exception ex) { LogManager.SystemLog.Error(ex.ToString()); return(-1); } }
public int GetCurrentSpeakerDev(byte[] device)//该函数用于获取当前扬声器设备 { try { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetCurrentSpeakerDev")); int iRet = UCInterface.UC_SDK_GetCurrentSpeakerDev(device); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_GetCurrentSpeakerDev error {0}", iRet)); return(iRet); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetCurrentSpeakerDev")); return(iRet); } catch (Exception ex) { LogManager.SystemLog.Debug(ex.ToString()); return(-1); } }
public int GetMicDevList(int _fromIndex, int _toIndex, int _size, byte[] devList)//该函数用于获取麦克风设备列表 { try { LogManager.SystemLog.Debug(string.Format("Start UC_SDK_GetMicDevList")); int iRet = UCInterface.UC_SDK_GetMicDevList(_fromIndex, _toIndex, _size, devList); if (iRet != 0) { LogManager.SystemLog.Error(string.Format("Start UC_SDK_GetMicDevList error {0}", iRet)); return(iRet); } LogManager.SystemLog.Debug(string.Format("End UC_SDK_GetMicDevList")); return(iRet); } catch (Exception ex) { LogManager.SystemLog.Debug(ex.ToString()); return(-1); } }