示例#1
0
        //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);
            }
        }
示例#2
0
        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"));
        }
示例#3
0
        /// <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"));
        }
示例#4
0
        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"));
        }
示例#5
0
        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"));
        }
示例#6
0
        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"));
        }
示例#7
0
        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"));
        }
示例#8
0
        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"));
        }
示例#9
0
        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"));
        }
示例#10
0
        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"));
        }
示例#11
0
        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"));
        }
示例#12
0
        /// <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"));
        }
示例#13
0
        //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"));
        }
示例#14
0
        /// <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);
        }
示例#15
0
        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);
        }
示例#16
0
        /// <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);
        }
示例#17
0
        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);
        }
示例#18
0
        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"));
        }
示例#19
0
        /// <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);
        }
示例#20
0
        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);
        }
示例#21
0
        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);
        }
示例#22
0
        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);
        }
示例#23
0
        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);
        }
示例#24
0
        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);
        }
示例#25
0
        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);
        }
示例#26
0
        //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);
        }
示例#27
0
        /// <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;
        }
示例#28
0
 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);
     }
 }