Commit af04fbdf authored by Margaux Clerc's avatar Margaux Clerc

Add mediaInProgress method and change type for window id

parent 752a7882
......@@ -128,6 +128,12 @@ Platform::Boolean Call::IsInConference::get()
return (linphone_call_is_in_conference(this->call) == TRUE);
}
Platform::Boolean Call::MediaInProgress::get()
{
API_LOCK;
return (linphone_call_media_in_progress(this->call) == TRUE);
}
Platform::Object^ Call::NativeVideoWindowId::get()
{
API_LOCK;
......@@ -232,6 +238,7 @@ Call::Call(::LinphoneCall *call)
{
API_LOCK;
RefToPtrProxy<Call^> *proxy = new RefToPtrProxy<Call^>(this);
linphone_call_ref(this->call);
linphone_call_set_user_data(this->call, proxy);
}
......
......@@ -163,6 +163,14 @@ namespace BelledonneCommunications
Platform::Boolean get();
}
/// <summary>
/// Tells whether an operation is in progress at the media side.
/// </summary>
property Platform::Boolean MediaInProgress
{
Platform::Boolean get();
}
/// <summary>
/// Sets the native video window id (a Windows::UI::Xaml::Controls::MediaElement as a Platform::Object).
/// </summary>
......
......@@ -623,37 +623,38 @@ int Core::MissedCallsCount::get()
return linphone_core_get_missed_calls_count(this->lc);
}
Platform::Object^ Core::NativePreviewWindowId::get()
Platform::String^ Core::NativePreviewWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_preview_window_id(this->lc);
if (id == NULL) return nullptr;
RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
RefToPtrProxy<Platform::String^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::String^>*>(id);
Platform::String^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Core::NativePreviewWindowId::set(Platform::Object^ value)
void Core::NativePreviewWindowId::set(Platform::String^ value)
{
API_LOCK;
RefToPtrProxy<Platform::Object^> *nativeWindowId = new RefToPtrProxy<Platform::Object^>(value);
RefToPtrProxy<Platform::String^> *nativeWindowId = new RefToPtrProxy<Platform::String^>(value);
linphone_core_set_native_preview_window_id(this->lc, nativeWindowId);
linphone_core_use_preview_window(this->lc, TRUE);
}
Platform::Object^ Core::NativeVideoWindowId::get()
Platform::String^ Core::NativeVideoWindowId::get()
{
API_LOCK;
void *id = linphone_core_get_native_video_window_id(this->lc);
if (id == NULL) return nullptr;
RefToPtrProxy<Platform::Object^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::Object^>*>(id);
Platform::Object^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
RefToPtrProxy<Platform::String^> *proxy = reinterpret_cast<RefToPtrProxy<Platform::String^>*>(id);
Platform::String^ nativeWindowId = (proxy) ? proxy->Ref() : nullptr;
return nativeWindowId;
}
void Core::NativeVideoWindowId::set(Platform::Object^ value)
void Core::NativeVideoWindowId::set(Platform::String^ value)
{
API_LOCK;
RefToPtrProxy<Platform::Object^> *nativeWindowId = new RefToPtrProxy<Platform::Object^>(value);
RefToPtrProxy<Platform::String^> *nativeWindowId = new RefToPtrProxy<Platform::String^>(value);
linphone_core_set_native_video_window_id(this->lc, nativeWindowId);
}
......
......@@ -508,19 +508,19 @@ namespace BelledonneCommunications
/// <summary>
/// Sets the native preview window id (a Windows::UI::Xaml::Controls::CaptureElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativePreviewWindowId
property Platform::String^ NativePreviewWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Sets the native video window id (a Windows::UI::Xaml::Controls::MediaElement as a Platform::Object).
/// </summary>
property Platform::Object^ NativeVideoWindowId
property Platform::String^ NativeVideoWindowId
{
Platform::Object^ get();
void set(Platform::Object^ value);
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
......
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