Commit da417060 authored by Margaux Clerc's avatar Margaux Clerc

Change preview place

parent efad6a4a
......@@ -4,7 +4,7 @@ upload_bw=380
[sip]
default_proxy=0
media_encryption=none
media_encryption=0
[misc]
log_collection_upload_server_url=https://www.linphone.org:444/lft.php
......
......@@ -39,15 +39,6 @@ namespace Linphone.Model
private static LinphoneManager _instance = new LinphoneManager();
public static LinphoneManager Instance { get { return _instance; } }
public delegate void ChangedEventHandler(object sender, EventArgs e);
public delegate void CallStateChangedEventHandler(Call call, CallState state);
public event CallStateChangedEventHandler CallStateChangedEvent;
public event ChangedEventHandler CallStateChanged;
public event ChangedEventHandler RegistrationChanged;
public event ChangedEventHandler MessageReceived;
private Core _core;
public bool isLinphoneRunning = false;
......@@ -175,6 +166,17 @@ namespace Linphone.Model
{
return Core.Version;
}
public void ConfigureLog(OutputTraceLevel level)
{
Core.LogLevel = level;
}
public void resetLogCollection()
{
Core.ResetLogCollection();
}
#endregion
#region CallLogs
......@@ -360,14 +362,8 @@ namespace Linphone.Model
return nbUnreadMessages;
}
public class MessageEventArgs : EventArgs
{
public ChatMessage _chatMessage { get; set; }
public MessageEventArgs(ChatMessage m)
{
_chatMessage = m;
}
}
public delegate void MessageReceivedEventHandler(ChatRoom room, ChatMessage message);
public event MessageReceivedEventHandler MessageReceived;
public MessageReceivedListener MessageListener { get; set; }
//public ToastNotification MessageReceivedNotification { get; set; }
......@@ -379,7 +375,7 @@ namespace Linphone.Model
{
if (MessageReceived != null)
{
MessageReceived(this, new MessageEventArgs(message));
MessageReceived(room, message);
}
Address fromAddress = message.FromAddress;
......@@ -559,25 +555,10 @@ namespace Linphone.Model
{
}
public class CallEventArgs : EventArgs
{
public Call _call { get; set; }
public CallEventArgs(Call c)
{
_call = c;
}
}
public class CallStateEventArgs : EventArgs
{
public string State { get; set; }
public CallStateEventArgs(string state)
{
State = state;
}
}
public delegate void CallStateChangedEventHandler(Call call, CallState state);
public event CallStateChangedEventHandler CallStateChangedEvent;
void CoreListener.CallStateChanged(Call call, CallState state, string message)
void CoreListener.CallStateChanged(Call call, CallState state, string message)
{
#pragma warning disable CS4014 // Dans la mesure où cet appel n'est pas attendu, l'exécution de la méthode actuelle continue avant la fin de l'appel
CoreDispatcher.RunAsync(CoreDispatcherPriority.High, () =>
......@@ -708,25 +689,44 @@ void CoreListener.CallStateChanged(Call call, CallState state, string message)
Debug.WriteLine(String.Format("GlobalStateChanged: {0} [{1}]", state, message));
}
public delegate void LogUploadProgressIndicationEventHandler(int offset, int total);
public event LogUploadProgressIndicationEventHandler LogUploadProgressIndicationEH;
void CoreListener.LogCollectionUploadProgressIndication(int offset, int total)
{
//throw new NotImplementedException();
if (LogUploadProgressIndicationEH != null)
{
LogUploadProgressIndicationEH(offset, total);
}
}
void CoreListener.LogCollectionUploadStateChanged(LogCollectionUploadState state, string info)
{
//throw new NotImplementedException();
}
public class ProxyEventArgs : EventArgs
{
public ProxyConfig _proxy { get; set; }
public ProxyEventArgs(ProxyConfig p)
if (CoreDispatcher == null) return;
#pragma warning disable CS4014 // Dans la mesure où cet appel n'est pas attendu, l'exécution de la méthode actuelle continue avant la fin de l'appel
CoreDispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
{
_proxy = p;
}
if (state == LogCollectionUploadState.Delivered)
{
BugCollector.ReportExceptions(info);
}
else if (state == LogCollectionUploadState.NotDelivered)
{
Debug.WriteLine("[LinphoneManager] Logs upload error: " + info);
/* var notif = new CustomMessageBox()
{
Caption = "Logfile upload failed",
Message = info,
RightButtonContent = AppResources.Close
};
notif.Show();*/
}
});
}
public delegate void RegistrationStateChangedEventHandler(ProxyConfig config, RegistrationState state, string message);
public event RegistrationStateChangedEventHandler RegistrationChanged;
void CoreListener.RegistrationStateChanged(ProxyConfig config, RegistrationState state, string message)
{
if (CoreDispatcher == null) return;
......@@ -735,7 +735,7 @@ void CoreListener.CallStateChanged(Call call, CallState state, string message)
{
if(RegistrationChanged != null)
{
RegistrationChanged(this, new ProxyEventArgs(config));
RegistrationChanged(config, state, message);
}
});
}
......
......@@ -20,6 +20,8 @@ using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using Windows.Storage;
using Windows.Storage.Pickers;
using Windows.UI.Core;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
......@@ -85,11 +87,13 @@ namespace Linphone.Views
base.OnNavigatedFrom(e);
}
private void MessageReceived(object sender, EventArgs e)
private void MessageReceived(ChatRoom room, ChatMessage message)
{
GetMessagesAndDisplayConversationsList();
}
/// <summary>
/// Callback called when the search on a phone number or an email for a contact has a match
/// </summary>
......
......@@ -103,12 +103,12 @@ namespace Linphone.Views
});*/
}
private void RegistrationChanged(object sender, EventArgs e)
private void RegistrationChanged(ProxyConfig config, RegistrationState state, string message)
{
status.RefreshStatus();
}
private void MessageReceived(object sender, EventArgs e)
private void MessageReceived(ChatRoom room, ChatMessage message)
{
UnreadMessageCount = LinphoneManager.Instance.GetUnreadMessageCount();
......
......@@ -73,7 +73,7 @@
Grid.RowSpan="2"/>
<!-- Local video media element -->
<Grid Grid.RowSpan="2" x:Name="VideoGrid" Canvas.ZIndex="-1" Background="Black" Visibility="Collapsed" Tapped="Video_Tapped">
<Grid Grid.RowSpan="2" x:Name="VideoGrid" Canvas.ZIndex="-1" Background="Black" Visibility="Visible" Tapped="Video_Tapped">
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="*" />
......@@ -87,7 +87,7 @@
</Grid.ColumnDefinitions>
<SwapChainPanel x:Name="VideoSwapChainPanel" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
<SwapChainPanel x:Name="PreviewSwapChainPanel" Grid.Column="2" Grid.Row="2" Width="120" Height="160" RenderTransformOrigin="0.5,0.5">
<SwapChainPanel x:Name="PreviewSwapChainPanel" Grid.Column="2" Grid.Row="3" RenderTransformOrigin="0.5,0.5">
<SwapChainPanel.RenderTransform>
<CompositeTransform ScaleX="-1"/>
</SwapChainPanel.RenderTransform>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment