コード例 #1
0
ファイル: sample.cs プロジェクト: sumritt/PJSIP-PJSUA2-CSharp
        override public void onRegState(OnRegStateParam prm)
        {
            AccountInfo ai = getInfo();

            Console.WriteLine("***" + (ai.regIsActive? "": "Un") +
                              "Register: code=" + prm.code);
        }
コード例 #2
0
ファイル: Account.cs プロジェクト: waffle-iron/nequeo
 public virtual void onRegState(OnRegStateParam prm)
 {
     pjsua2PINVOKE.Account_onRegState(swigCPtr, OnRegStateParam.getCPtr(prm));
     if (pjsua2PINVOKE.SWIGPendingException.Pending)
     {
         throw pjsua2PINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #3
0
        public virtual void onRegState(OnRegStateParam prm)
        {
            AccountInfo ai = getInfo();
            var         tt = prm;

            Console.WriteLine("prm:");
            Console.WriteLine(JsonConvert.SerializeObject(prm));
            Console.WriteLine("getInfo:");
            Console.WriteLine(JsonConvert.SerializeObject(ai));
        }
コード例 #4
0
        public override void onRegState(OnRegStateParam prm)
        {
            var ai = getInfo();

            //Console.WriteLine("prm:");
            //Console.WriteLine(JsonConvert.SerializeObject(prm));
            //Console.WriteLine("getInfo:");
            //Console.WriteLine(JsonConvert.SerializeObject(ai));
            OnAccountRegState?.Invoke(this, ai, prm);
        }
コード例 #5
0
        /// <summary>
        /// Обрабатываем событие изменение статуса регистрации
        /// </summary>
        /// <param name="prm"></param>
        override public void onRegState(OnRegStateParam prm)
        {
            AccountInfo ai = getInfo();

            isActive = ai.regIsActive;
            code     = prm.code;
            if (onAccountRegState != null)
            {
                onAccountRegState(this);
            }
        }
コード例 #6
0
 public virtual void onRegState(OnRegStateParam prm)
 {
     if (SwigDerivedClassHasMethod("onRegState", swigMethodTypes2))
     {
         pjsua2PINVOKE.Account_onRegStateSwigExplicitAccount(swigCPtr, OnRegStateParam.getCPtr(prm));
     }
     else
     {
         pjsua2PINVOKE.Account_onRegState(swigCPtr, OnRegStateParam.getCPtr(prm));
     }
     if (pjsua2PINVOKE.SWIGPendingException.Pending)
     {
         throw pjsua2PINVOKE.SWIGPendingException.Retrieve();
     }
 }
コード例 #7
0
        /// <summary>
        /// Notify application when registration status has changed.
        /// </summary>
        /// <param name="sender">The current sender.</param>
        /// <param name="e">The event parameter.</param>
        private void _voipManager_OnRegState(object sender, OnRegStateParam e)
        {
            // Send a notification to the call.
            Param.OnRegStateParam param = new Param.OnRegStateParam();
            param.Info       = e.RxData.Info;
            param.SrcAddress = e.RxData.SrcAddress;
            param.WholeMsg   = e.RxData.WholeMsg;
            param.Code       = e.Code;
            param.Expiration = e.Expiration;
            param.Reason     = e.Reason;
            param.Status     = e.Status;

            // Call the event handler.
            OnRegState?.Invoke(this, param);
        }
コード例 #8
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OnRegStateParam obj)
 {
     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
 }
コード例 #9
0
 public override void onRegState(OnRegStateParam prm)
 {
     base.onRegState(prm);
 }
コード例 #10
0
ファイル: VoIPManager.cs プロジェクト: waffle-iron/nequeo
 /// <summary>
 /// Notify application when registration status has changed.
 /// </summary>
 /// <param name="sender">The current sender.</param>
 /// <param name="e">The event parameter.</param>
 private void _account_OnRegState(object sender, OnRegStateParam e)
 {
     OnRegState?.Invoke(this, e);
 }
コード例 #11
0
 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OnRegStateParam obj)
 {
     return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr);
 }
コード例 #12
0
ファイル: Account.cs プロジェクト: fanshuxian/PJSIPDotNetSDK
 public override void onRegState(OnRegStateParam prm)
 {
     base.onRegState(prm);
     //Console.WriteLine("Account registration state: " + prm.code + " : " + prm.reason);
     NotifyAccountState(prm.code, prm.reason);
 }
コード例 #13
0
ファイル: Account.cs プロジェクト: Reltik/PJSip-CSharp
 public virtual void onRegState(OnRegStateParam prm)
 {
     if (SwigDerivedClassHasMethod("onRegState", swigMethodTypes2)) pjsua2PINVOKE.Account_onRegStateSwigExplicitAccount(swigCPtr, OnRegStateParam.getCPtr(prm)); else pjsua2PINVOKE.Account_onRegState(swigCPtr, OnRegStateParam.getCPtr(prm));
     if (pjsua2PINVOKE.SWIGPendingException.Pending) throw pjsua2PINVOKE.SWIGPendingException.Retrieve();
 }
コード例 #14
0
 private void OnAccountRegState(object sender, AccountInfo ai, OnRegStateParam prm)
 {
     Messages += $"---------------------{DateTime.Now.ToString("T")}---------------------\r";
     Messages += "prm:\r" + JsonConvert.SerializeObject(prm) + "\r";
     Messages += "ai:\r" + JsonConvert.SerializeObject(ai) + "\r";
 }