Commit 876631e5 authored by Sylvain Berfini's avatar Sylvain Berfini

Added new callback for log upload progress + fix crash when returning from send mail to linphone

parent aa989626
......@@ -163,9 +163,19 @@ namespace Linphone.Agents
{
}
/// <summary>
/// Callback for LinphoneCoreListener
/// </summary>
public void LogUploadStatusChanged(bool uploadComplete, string info)
{
}
/// <summary>
/// Callback for LinphoneCoreListener
/// </summary>
public void LogUploadProgressChanged(int progress)
{
}
#endregion
}
}
......@@ -1623,7 +1623,7 @@ void log_collection_upload_progress_indication(LinphoneCore *lc, size_t progress
Linphone::Core::LinphoneCoreListener^ listener = Linphone::Core::Globals::Instance->LinphoneCore->CoreListener;
if (listener != nullptr)
{
//TODO
listener->LogUploadProgressChanged((int)progress);
}
Linphone::Core::gApiLock.LeaveListener();
}
......
......@@ -84,7 +84,18 @@ namespace Linphone
/// <param name="room">The room for which the composing status has been updated</param>
void ComposingReceived(LinphoneChatRoom^ room);
/// <summary>
/// Callback method called when the status of the current log upload changes.
/// </summary>
/// <param name="uploadComplete">Tells whether or not the upload is complete</param>
/// <param name="info">An error message if the upload went wrong, the url of the uploaded logs if it went well, null if upload not yet finished</param>
void LogUploadStatusChanged(Platform::Boolean uploadComplete, Platform::String^ info);
/// <summary>
/// Callback method called when the progress of the current logs upload has changed.
/// </summary>
/// <param name="progress"></param>
void LogUploadProgressChanged(int progress);
};
}
}
\ No newline at end of file
......@@ -1002,6 +1002,9 @@ namespace Linphone.Model
});
}
/// <summary>
/// Callback for LinphoneCoreListener
/// </summary>
public void LogUploadStatusChanged(bool uploadComplete, string info)
{
BaseModel.UIDispatcher.BeginInvoke(() =>
......@@ -1012,6 +1015,17 @@ namespace Linphone.Model
}
});
}
/// <summary>
/// Callback for LinphoneCoreListener
/// </summary>
public void LogUploadProgressChanged(int progress)
{
BaseModel.UIDispatcher.BeginInvoke(() =>
{
});
}
#endregion
#region Contact Lookup
......
......@@ -105,6 +105,7 @@ namespace Linphone.Views
protected override async void OnNavigatedTo(NavigationEventArgs e)
{
base.OnNavigatedTo(e);
saveSettingsOnLeave = true;
// Create LinphoneCore if not created yet, otherwise do nothing
await LinphoneManager.Instance.InitLinphoneCore();
}
......@@ -149,6 +150,7 @@ namespace Linphone.Views
private void SendLogs_Click(object sender, RoutedEventArgs e)
{
saveSettingsOnLeave = false;
LinphoneManager.Instance.LinphoneCore.UploadLogCollection();
}
......
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