public OpalStatusRegistration GetRegistrationStatus() { global::System.IntPtr cPtr = OPALPINVOKE.OpalMessagePtr_GetRegistrationStatus(swigCPtr); OpalStatusRegistration ret = (cPtr == global::System.IntPtr.Zero) ? null : new OpalStatusRegistration(cPtr, false); return(ret); }
private void HandleOpalMessages() { OpalMessagePtr msg = new OpalMessagePtr(); while (m_opalContext.GetMessage(msg, System.UInt32.MaxValue)) { // Handle the message switch (msg.GetType()) { case OpalMessageType.OpalIndRegistration: OpalStatusRegistration reg = msg.GetRegistrationStatus(); switch (reg.status) { case OpalRegistrationStates.OpalRegisterSuccessful: SetTextSafely(RegisterStatus, "Registration complete to " + reg.serverName); EnableSafely(Unregister, true); break; case OpalRegistrationStates.OpalRegisterRemoved: SetTextSafely(RegisterStatus, "Registration removed from " + reg.serverName); EnableSafely(Unregister, false); EnableSafely(Register, true); EnableSafely(host, true); EnableSafely(user, true); EnableSafely(password, true); break; case OpalRegistrationStates.OpalRegisterFailed: SetTextSafely(RegisterStatus, "Registration failed: " + reg.error); EnableSafely(Register, true); break; } break; case OpalMessageType.OpalIndIncomingCall: EnableSafely(Call, false); EnableSafely(Answer, true); EnableSafely(HangUp, true); SetTextSafely(CallStatus, "Incoming call ..." + msg.GetIncomingCall().remoteDisplayName); break; case OpalMessageType.OpalIndEstablished: SetTextSafely(CallStatus, "Call established"); break; case OpalMessageType.OpalIndCallCleared: EnableSafely(Call, true); EnableSafely(Answer, false); EnableSafely(HangUp, false); SetTextSafely(CallStatus, "Call ended: " + msg.GetCallCleared().reason); break; } } }
private void HandleOpalMessages() { OpalMessagePtr msg = new OpalMessagePtr(); while (m_opalContext.GetMessage(msg, System.UInt32.MaxValue)) { // Handle the message switch (msg.GetType()) { case OpalMessageType.OpalIndRegistration: OpalStatusRegistration reg = msg.GetRegistrationStatus(); switch (reg.status) { case OpalRegistrationStates.OpalRegisterSuccessful: MessageBox.Show("Registration complete to " + reg.serverName); EnableSafely(Unregister, true); break; case OpalRegistrationStates.OpalRegisterRemoved: MessageBox.Show("Registration removed from " + reg.serverName); EnableSafely(Unregister, false); EnableSafely(Register, true); break; case OpalRegistrationStates.OpalRegisterFailed: MessageBox.Show("Registration failed: " + reg.error); EnableSafely(Register, true); break; } break; case OpalMessageType.OpalIndIncomingCall: EnableSafely(Call, false); EnableSafely(Answer, true); EnableSafely(HangUp, true); break; case OpalMessageType.OpalIndCallCleared: EnableSafely(Call, true); EnableSafely(Answer, false); EnableSafely(HangUp, false); MessageBox.Show("Call ended: " + msg.GetCallCleared().reason); break; } } }
internal static HandleRef getCPtr(OpalStatusRegistration obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OpalStatusRegistration obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
internal static HandleRef getCPtr(OpalStatusRegistration obj) { return((obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr); }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(OpalStatusRegistration obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }