Commit 187bf668 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

cppcx: Expose media discoverer listing

parent a7f07552
......@@ -185,6 +185,11 @@ namespace libVLCX
return MarshallVector<AudioOutputDeviceDescription, VLC::AudioOutputDeviceDescription>(m_instance.audioOutputDeviceList(VLCString(aout)));
}
Windows::Foundation::Collections::IVector<MediaDiscovererDescription^>^ Instance::mediaDiscoverers(MediaDiscovererCategory category)
{
return MarshallVector<MediaDiscovererDescription, VLC::MediaDiscoverer::Description>(m_instance.mediaDiscoverers(static_cast<VLC::MediaDiscoverer::Category>(category)));
}
Instance::~Instance()
{
}
......
......@@ -303,6 +303,8 @@ namespace libVLCX
*/
Windows::Foundation::Collections::IVector<AudioOutputDeviceDescription^>^ audioOutputDeviceList(Platform::String^ aout);
Windows::Foundation::Collections::IVector<MediaDiscovererDescription^>^ mediaDiscoverers(MediaDiscovererCategory category);
private:
void InitializeHack(char** argv, unsigned int nbArgs);
......
......@@ -272,4 +272,26 @@ namespace libVLCX
{
return m_uri;
}
Platform::String^ MediaDiscovererDescription::name()
{
return m_name;
}
Platform::String^ MediaDiscovererDescription::longName()
{
return m_longName;
}
MediaDiscovererCategory MediaDiscovererDescription::category()
{
return m_category;
}
MediaDiscovererDescription::MediaDiscovererDescription(const VLC::MediaDiscoverer::Description& desc)
: m_name(ToPlatformString(desc.name().c_str()))
, m_longName(ToPlatformString(desc.longName().c_str()))
, m_category(static_cast<MediaDiscovererCategory>(desc.category()))
{
}
}
......@@ -210,4 +210,27 @@ namespace libVLCX
unsigned priority();
Platform::String^ uri();
};
public enum class MediaDiscovererCategory
{
Devices = VLC::MediaDiscoverer::Category::Devices,
Lan = VLC::MediaDiscoverer::Category::Lan,
Podcasts = VLC::MediaDiscoverer::Category::Podcasts,
Localdirs = VLC::MediaDiscoverer::Category::Localdirs,
};
public ref class MediaDiscovererDescription sealed
{
public:
Platform::String^ name();
Platform::String^ longName();
MediaDiscovererCategory category();
internal:
explicit MediaDiscovererDescription(const VLC::MediaDiscoverer::Description& desc);
private:
Platform::String^ m_name;
Platform::String^ m_longName;
MediaDiscovererCategory m_category;
};
}
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