private Tapstream(string accountName, string developerSecret, string hardware) { del = new DelegateImpl(this); platform = new PlatformImpl(); listener = new CoreListenerImpl(); core = new Core(del, platform, listener, accountName, developerSecret, hardware); }
public Tapstream(OperationQueue queue, string accountName, string developerSecret, string hardware) { del = new DelegateImpl(); platform = new PlatformImpl(); listener = new CoreListenerImpl(queue); core = new Core(del, platform, listener, accountName, developerSecret, hardware); }
public MainPage() { InitializeComponent(); welcome.Text = "Linphone Xamarin version: " + Core.Version; Listener = Factory.Instance.CreateCoreListener(); Listener.OnRegistrationStateChanged = OnRegistration; Listener.OnCallStateChanged = OnCall; Listener.OnCallStatsUpdated = OnStats; Listener.OnLogCollectionUploadStateChanged = OnLogCollectionUpload; Core.AddListener(Listener); Transports = new Dictionary <string, TransportType> { { "UDP", TransportType.Udp }, { "TCP", TransportType.Tcp }, { "TLS", TransportType.Tls }, }; foreach (string protocol in Transports.Keys) { transport.Items.Add(protocol); } transport.SelectedIndex = 2; if (Core.DefaultProxyConfig?.State == RegistrationState.Ok) { register.IsEnabled = false; stack_registrar.IsVisible = false; registration_status.Text = "Registration state: " + Core.DefaultProxyConfig.State; } }
AeonixInfoRepository() { LinphoneCore = LinphoneBase.Instance.linphoneCore; Listener = LinphoneBase.Instance.coreListener; Listener.OnInfoReceived = OnInfoRecived; LinphoneCore.AddListener(Listener); }
CallService() { LinphoneCore = LinphoneBase.Instance.linphoneCore; Listener = LinphoneBase.Instance.coreListener; Listener.OnCallStateChanged = OnCall; LinphoneCore.AddListener(Listener); }
private Tapstream(string accountName, string developerSecret, Config config) { del = new DelegateImpl(this); platform = new PlatformImpl(); listener = new CoreListenerImpl(); core = new Core(del, platform, listener, accountName, developerSecret, config); core.Start(); }
public Tapstream(OperationQueue queue, string accountName, string developerSecret, Config config) { del = new DelegateImpl(); platform = new PlatformImpl(); listener = new CoreListenerImpl(queue); core = new Core(del, platform, listener, accountName, developerSecret, config); core.Start(); }
RegistrationService() { LinphoneCore = LinphoneBase.Instance.linphoneCore; Listener = LinphoneBase.Instance.coreListener; Listener.OnRegistrationStateChanged = OnRegistration; LinphoneCore.AddListener(Listener); logger(); }
private LinphoneEngineAndroid() { Log("C# WRAPPER=" + LinphoneWrapper.VERSION); Log($"Linphone version {Core.Version}"); CoreListener = Factory.Instance.CreateCoreListener(); LinphoneListeners = new List <ILinphoneListener>(); RegisterState = RegistrationState.None; // Giving app context in CreateCore is mandatory for Android to be able to load grammars (and other assets) from AAR linphoneCore = Factory.Instance.CreateCore(CoreListener, RcPath, FactoryPath, IntPtr.Zero, LinphoneAndroid.AndroidContext); // Required to be able to store logs as file Core.SetLogCollectionPath(System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData)); Core.EnableLogCollection(LogCollectionState.Enabled); UploadLogCommand(); //LoggingService.Instance.LogLevel = LogLevel.Debug; //LoggingService.Instance.Listener.OnLogMessageWritten = OnLog; CoreListener.OnGlobalStateChanged = OnGlobal; CoreListener.OnLogCollectionUploadStateChanged = OnLogUpload; linphoneCore.NetworkReachable = true; linphoneCore.RingDuringIncomingEarlyMedia = false; linphoneCore.VideoCaptureEnabled = false; linphoneCore.VideoDisplayEnabled = true; linphoneCore.Transports.TcpPort = -1; linphoneCore.Transports.TlsPort = 0; linphoneCore.Transports.UdpPort = 0; Log($"Transports, TCP: {linphoneCore.Transports.TcpPort}, TLS: {linphoneCore.Transports.TlsPort}, UDP: {linphoneCore.Transports.UdpPort}"); Log($"used transports is {linphoneCore.TransportsUsed.ToString()}"); LogCodecs(); CoreListener.OnCallStateChanged = OnCall; CoreListener.OnCallStatsUpdated = OnStats; CoreListener.OnRegistrationStateChanged = OnRegistration; CoreListener.OnConfiguringStatus = OnConfigurationStatus; linphoneCore.EchoCancellationEnabled = true; //For MTS 4: beamforming_mic_dist_mm=74 beamforming_angle_deg=0 DON'T DELETE! //For MTS 7: beamforming_mic_dist_mm =184 beamforming_angle_deg=0 default value in linphonerc DON'T DELETE! // DON'T DELETE! // linphoneCore.BeamformingMicDist = 184f; // linphoneCore.BeamformingAngleDeg = 0; // linphoneCore.BeamformingEnabled = true; LinphoneCoreIterateAsync(); }
public Tapstream(OperationQueue queue, string accountName, string developerSecret, Config config) { del = new DelegateImpl(); platform = new PlatformImpl(); listener = new CoreListenerImpl(queue); this.config = config; core = new Core(del, platform, listener, null, accountName, developerSecret, config); core.Start(); }
public MainPage() { InitializeComponent(); Listener = Factory.Instance.CreateCoreListener(); Listener.OnRegistrationStateChanged = OnRegistration; Listener.OnCallStateChanged = OnCall; Listener.OnCallStatsUpdated = OnStats; LinphoneCore.AddListener(Listener); }
public Core(Delegate del, Platform platform, CoreListener listener, String accountName, String developerSecret, String hardware) { this.del = del; this.platform = platform; this.listener = listener; this.accountName = Clean(accountName); MakePostArgs(developerSecret, hardware); firedEvents = platform.LoadFiredEvents(); }
private void chatListenerInit() { CoreListener listener = LinphoneManager.Instance.getCoreListener(); if (listener == null) { return; } listener.OnMessageReceived = this.MessageReceived; listener.OnIsComposingReceived = this.ComposeReceived; }
public Core(Delegate del, Platform platform, CoreListener listener, String accountName, String developerSecret, Config config) { this.del = del; this.platform = platform; this.listener = listener; this.config = config; this.accountName = Clean(accountName); MakePostArgs(developerSecret); firedEvents = platform.LoadFiredEvents(); }
private void ParseRecieved(MemoryStream stream) { if (stream == null || stream.Length <= 0) { return; } var json = Encoding.UTF8.GetString(stream.ToArray()); if (string.IsNullOrEmpty(json)) { return; } IRecieved recieved; try { recieved = JsonConvert.DeserializeObject <IRecieved>(json); } catch (Exception ex) { Console.WriteLine(ex.Message); Console.WriteLine(ex.StackTrace); return; } if (recieved is JsonRpcParamsResponse) { var response = (JsonRpcParamsResponse)recieved; if (response == null || response.Id == null) { return; } var id = (int)response.Id; if (this._responseDictionary.ContainsKey(id)) { var resSet = this._responseDictionary[id]; resSet.CompleteTask(response); this._responseDictionary.TryRemove(id, out ResponseSet tmp); } } if (recieved is IEventArgs) { //Debug.WriteLine($"Event Recieved: {json}"); CoreListener.FireEvent((IEventArgs)recieved); } }
public App(string rc_path = null) { LinphoneWrapper.setNativeLogHandler(); LinphoneCore = LinphoneBase.Instance.linphoneCore; coreListener = LinphoneBase.Instance.coreListener; var page = new NavigationPage(new components.Login()); page.BarBackgroundColor = Color.Brown; page.BarTextColor = Color.White; MainPage = page; //MainPage = new components.navBar(); }
public App(string rc_path = null) { LinphoneWrapper.setNativeLogHandler(); Core.SetLogLevelMask(0xFF); CoreListener listener = Factory.Instance.CreateCoreListener(); listener.OnGlobalStateChanged = OnGlobal; LinphoneCore = Factory.Instance.CreateCore(listener, rc_path, null); LinphoneCore.NetworkReachable = true; MainPage = new MainPage(); }
private Tapstream(string accountName, string developerSecret, Config config) { del = new DelegateImpl(this); platform = new PlatformImpl(); listener = new CoreListenerImpl(); #if TEST_WINPHONE || WINDOWS_PHONE appEventSource = new AppEventSourceImpl(); #else appEventSource = null; #endif core = new Core(del, platform, listener, appEventSource, accountName, developerSecret, config); core.Start(); }
public Core(Delegate del, Platform platform, CoreListener listener, AppEventSource appEventSource, String accountName, String developerSecret, Config config) { this.del = del; this.platform = platform; this.listener = listener; this.appEventSource = appEventSource; this.config = config; this.accountName = Clean(accountName); this.secret = developerSecret; MakePostArgs(); firedEvents = platform.LoadFiredEvents(); }
public void Init(string configPath, string factoryPath) { CoreListener listener = Factory.Instance.CreateCoreListener(); listener.OnGlobalStateChanged = OnGlobal; #if ANDROID // Giving app context in CreateCore is mandatory for Android to be able to load grammars (and other assets) from AAR Core = Factory.Instance.CreateCore(listener, configPath, factoryPath, IntPtr.Zero, LinphoneAndroid.AndroidContext); // Required to be able to store logs as file Core.SetLogCollectionPath(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData)); #else Core = Factory.Instance.CreateCore(listener, configPath, factoryPath); #endif Core.NetworkReachable = true; }
public LinphoneBase() { Console.WriteLine("omer50: initialize"); Core.SetLogLevelMask(0xFF); CoreListener listener = Factory.Instance.CreateCoreListener(); listener.OnGlobalStateChanged = OnGlobal; linphoneCore = Factory.Instance.CreateCore(listener, null, null); coreListener = Factory.Instance.CreateCoreListener(); linphoneCore.VerifyServerCertificates(false); linphoneCore.VerifyServerCn(false); linphoneCore.NetworkReachable = true; //if (App.Current != null) // iterate = new Thread(startForgroundLinphoneIteration); //else // iterate = new Thread(startBackgroundLinphoneIteration); //iterate.IsBackground = false; //iterate.Start(); //Thread iterate = new Thread(LinphoneCoreIterate); }
/// <summary> /// Instanciate a <see cref="Core" /> object. /// </summary> public Core CreateCore(CoreListener cbs, string configPath, string factoryConfigPath, IntPtr userData, IntPtr systemContext) { IntPtr ptr = linphone_factory_create_core_2(nativePtr, cbs != null ? cbs.nativePtr : IntPtr.Zero, configPath, factoryConfigPath, userData, systemContext); return(fromNativePtr <Core>(ptr, false)); }
/// <summary> /// Instantiates a <see cref="Core" /> object with a given LpConfig. /// </summary> public Core CreateCoreWithConfig(CoreListener cbs, Config config) { IntPtr ptr = linphone_factory_create_core_with_config(nativePtr, cbs != null ? cbs.nativePtr : IntPtr.Zero, config != null ? config.nativePtr : IntPtr.Zero); return(fromNativePtr <Core>(ptr, false)); }
/// <summary> /// Instantiates a <see cref="Core" /> object with a given LpConfig. /// </summary> public Core CreateCoreWithConfig(CoreListener cbs, Config config, IntPtr userData, IntPtr systemContext) { IntPtr ptr = linphone_factory_create_core_with_config_2(nativePtr, cbs != null ? cbs.nativePtr : IntPtr.Zero, config != null ? config.nativePtr : IntPtr.Zero, userData, systemContext); return(fromNativePtr <Core>(ptr, false)); }