Loading Samples/SampleWdpClient.UniversalWindows/MainPage.xaml.cs +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ namespace SampleWdpClient.UniversalWindows // remainder of this session. if (allowUntrusted) { await portal.GetRootDeviceCertificate(true); this.certificate = await portal.GetRootDeviceCertificate(true); } await portal.Connect(manualCertificate: this.certificate); } Loading WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/MockDevicePortalConnection.cs +7 −3 Original line number Diff line number Diff line Loading @@ -87,9 +87,13 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// <summary> /// The Mock will never update the connection. /// </summary> /// <param name="ipConfig">IP info</param> /// <param name="requiresHttps">https required</param> public void UpdateConnection(IpConfiguration ipConfig, bool requiresHttps) /// <param name="ipConfig">Object that describes the current network configuration.</param> /// <param name="requiresHttps">True if an https connection is required, false otherwise.</param> /// <param name="preservePort">True if the previous connection's port is to continue to be used, false otherwise.</param> public void UpdateConnection( IpConfiguration ipConfig, bool requiresHttps, bool preservePort) { throw new NotImplementedException(); } Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/DevicePortal.cs +15 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,21 @@ namespace Microsoft.Tools.WindowsDevicePortal DeviceConnectionStatus.Connecting, DeviceConnectionPhase.UpdatingDeviceAddress, connectionPhaseDescription); this.deviceConnection.UpdateConnection(await this.GetIpConfig(), requiresHttps); bool preservePort = true; // HoloLens and Mobile are the only devices that support USB. // They require the port to be changed when the connection is updated // to WiFi. if ((this.Platform == DevicePortalPlatforms.HoloLens) || (this.Platform == DevicePortalPlatforms.Mobile)) { preservePort = false; } this.deviceConnection.UpdateConnection( await this.GetIpConfig(), requiresHttps, preservePort); } this.SendConnectionStatus( Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/MixedRealityCapture.cs +129 −13 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// API for getting a high resolution live Holographic Mixed Reality Capture stream. /// </summary> public static readonly string MrcLiveStreamHighwResApi = "api/holographic/stream/live_high.mp4"; public static readonly string MrcLiveStreamHighResApi = "api/holographic/stream/live_high.mp4"; /// <summary> /// API for getting a low resolution live Holographic Mixed Reality Capture stream. Loading @@ -81,8 +81,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Removes a Mixed Reality Capture file from the device's local storage. /// </summary> /// <param name="fileName">The name of the file to be deleted.</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task DeleteMrcFile(string fileName) { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) Loading @@ -95,11 +95,95 @@ namespace Microsoft.Tools.WindowsDevicePortal string.Format("filename={0}", Utilities.Hex64Encode(fileName))); } /// <summary> /// Retrieve the Uri for the high resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetHighResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamHighResApi, payload); } /// <summary> /// Retrieve the Uri for the low resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetLowResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamLowResApi, payload); } /// <summary> /// Retrieve the Uri for the medium resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetMediumResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamMediumResApi, payload); } /// <summary> /// Gets the capture file data /// </summary> /// <param name="fileName">Name of the file to retrieve</param> /// <param name="isThumbnailRequest">Whether or not we just want a thumbnail</param> /// <param name="fileName">Name of the file to retrieve.</param> /// <param name="isThumbnailRequest">Specifies whether or not we are requesting a thumbnail image.</param> /// <returns>Byte array containing the file data.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task<byte[]> GetMrcFileData( Loading Loading @@ -154,6 +238,36 @@ namespace Microsoft.Tools.WindowsDevicePortal return mrcFileList; } /// <summary> /// Retrieve the Uri for the Mixed Reality Capture live stream using the default resolution. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamApi, payload); } // TODO: GetMrcSettings() /// <summary> /// Gets the status of the reality capture /// </summary> Loading Loading @@ -181,15 +295,17 @@ namespace Microsoft.Tools.WindowsDevicePortal return await this.GetMrcFileData(fileName, true); } // TODO: SetMrcSettings() /// <summary> /// Starts a Mixed Reality Capture recording. /// </summary> /// <param name="includeHolograms">Whether to include holograms</param> /// <param name="includeColorCamera">Whether to include the color camera</param> /// <param name="includeMicrophone">Whether to include microphone data</param> /// <param name="includeAudio">Whether to include audio data</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StartMrcRecording( bool includeHolograms = true, bool includeColorCamera = true, Loading @@ -216,8 +332,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Stops the Mixed Reality Capture recording /// </summary> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StopMrcRecording() { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) Loading @@ -231,10 +347,10 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Take a Mixed Reality Capture photo /// </summary> /// <param name="includeHolograms">Whether to include holograms</param> /// <param name="includeColorCamera">Whether to include the color camera</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task TakeMrcPhoto( bool includeHolograms = true, bool includeColorCamera = true) Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Interfaces/IDevicePortalConnection.cs +3 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,10 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> /// <param name="ipConfig">Object that describes the current network configuration.</param> /// <param name="requiresHttps">True if an https connection is required, false otherwise.</param> /// <param name="preservePort">True if the previous connection's port is to continue to be used, false otherwise.</param> void UpdateConnection( IpConfiguration ipConfig, bool requiresHttps); bool requiresHttps, bool preservePort); } } Loading
Samples/SampleWdpClient.UniversalWindows/MainPage.xaml.cs +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ namespace SampleWdpClient.UniversalWindows // remainder of this session. if (allowUntrusted) { await portal.GetRootDeviceCertificate(true); this.certificate = await portal.GetRootDeviceCertificate(true); } await portal.Connect(manualCertificate: this.certificate); } Loading
WindowsDevicePortalWrapper/UnitTestProject/WDPMockImplementations/MockDevicePortalConnection.cs +7 −3 Original line number Diff line number Diff line Loading @@ -87,9 +87,13 @@ namespace Microsoft.Tools.WindowsDevicePortal.Tests /// <summary> /// The Mock will never update the connection. /// </summary> /// <param name="ipConfig">IP info</param> /// <param name="requiresHttps">https required</param> public void UpdateConnection(IpConfiguration ipConfig, bool requiresHttps) /// <param name="ipConfig">Object that describes the current network configuration.</param> /// <param name="requiresHttps">True if an https connection is required, false otherwise.</param> /// <param name="preservePort">True if the previous connection's port is to continue to be used, false otherwise.</param> public void UpdateConnection( IpConfiguration ipConfig, bool requiresHttps, bool preservePort) { throw new NotImplementedException(); } Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/DevicePortal.cs +15 −1 Original line number Diff line number Diff line Loading @@ -256,7 +256,21 @@ namespace Microsoft.Tools.WindowsDevicePortal DeviceConnectionStatus.Connecting, DeviceConnectionPhase.UpdatingDeviceAddress, connectionPhaseDescription); this.deviceConnection.UpdateConnection(await this.GetIpConfig(), requiresHttps); bool preservePort = true; // HoloLens and Mobile are the only devices that support USB. // They require the port to be changed when the connection is updated // to WiFi. if ((this.Platform == DevicePortalPlatforms.HoloLens) || (this.Platform == DevicePortalPlatforms.Mobile)) { preservePort = false; } this.deviceConnection.UpdateConnection( await this.GetIpConfig(), requiresHttps, preservePort); } this.SendConnectionStatus( Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/MixedRealityCapture.cs +129 −13 Original line number Diff line number Diff line Loading @@ -60,7 +60,7 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// API for getting a high resolution live Holographic Mixed Reality Capture stream. /// </summary> public static readonly string MrcLiveStreamHighwResApi = "api/holographic/stream/live_high.mp4"; public static readonly string MrcLiveStreamHighResApi = "api/holographic/stream/live_high.mp4"; /// <summary> /// API for getting a low resolution live Holographic Mixed Reality Capture stream. Loading @@ -81,8 +81,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// Removes a Mixed Reality Capture file from the device's local storage. /// </summary> /// <param name="fileName">The name of the file to be deleted.</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task DeleteMrcFile(string fileName) { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) Loading @@ -95,11 +95,95 @@ namespace Microsoft.Tools.WindowsDevicePortal string.Format("filename={0}", Utilities.Hex64Encode(fileName))); } /// <summary> /// Retrieve the Uri for the high resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetHighResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamHighResApi, payload); } /// <summary> /// Retrieve the Uri for the low resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetLowResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamLowResApi, payload); } /// <summary> /// Retrieve the Uri for the medium resolution Mixed Reality Capture live stream. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetMediumResolutionMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamMediumResApi, payload); } /// <summary> /// Gets the capture file data /// </summary> /// <param name="fileName">Name of the file to retrieve</param> /// <param name="isThumbnailRequest">Whether or not we just want a thumbnail</param> /// <param name="fileName">Name of the file to retrieve.</param> /// <param name="isThumbnailRequest">Specifies whether or not we are requesting a thumbnail image.</param> /// <returns>Byte array containing the file data.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task<byte[]> GetMrcFileData( Loading Loading @@ -154,6 +238,36 @@ namespace Microsoft.Tools.WindowsDevicePortal return mrcFileList; } /// <summary> /// Retrieve the Uri for the Mixed Reality Capture live stream using the default resolution. /// </summary> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Uri used to retreive the Mixed Reality Capture stream.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public Uri GetMrcLiveStreamUri( bool includeHolograms = true, bool includeColorCamera = true, bool includeMicrophone = true, bool includeAudio = true) { string payload = string.Format( "holo={0}&pv={1}&mic={2}&loopback={3}", includeHolograms, includeColorCamera, includeMicrophone, includeAudio).ToLower(); return Utilities.BuildEndpoint( this.deviceConnection.Connection, MrcLiveStreamApi, payload); } // TODO: GetMrcSettings() /// <summary> /// Gets the status of the reality capture /// </summary> Loading Loading @@ -181,15 +295,17 @@ namespace Microsoft.Tools.WindowsDevicePortal return await this.GetMrcFileData(fileName, true); } // TODO: SetMrcSettings() /// <summary> /// Starts a Mixed Reality Capture recording. /// </summary> /// <param name="includeHolograms">Whether to include holograms</param> /// <param name="includeColorCamera">Whether to include the color camera</param> /// <param name="includeMicrophone">Whether to include microphone data</param> /// <param name="includeAudio">Whether to include audio data</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <param name="includeMicrophone">Specifies whether or not to include microphone data</param> /// <param name="includeAudio">Specifies whether or not to include audio data</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StartMrcRecording( bool includeHolograms = true, bool includeColorCamera = true, Loading @@ -216,8 +332,8 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Stops the Mixed Reality Capture recording /// </summary> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task StopMrcRecording() { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) Loading @@ -231,10 +347,10 @@ namespace Microsoft.Tools.WindowsDevicePortal /// <summary> /// Take a Mixed Reality Capture photo /// </summary> /// <param name="includeHolograms">Whether to include holograms</param> /// <param name="includeColorCamera">Whether to include the color camera</param> /// <remarks>This method is only supported on HoloLens devices.</remarks> /// <param name="includeHolograms">Specifies whether or not to include holograms</param> /// <param name="includeColorCamera">Specifies whether or not to include the color camera</param> /// <returns>Task tracking completion of the REST call.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task TakeMrcPhoto( bool includeHolograms = true, bool includeColorCamera = true) Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/Interfaces/IDevicePortalConnection.cs +3 −1 Original line number Diff line number Diff line Loading @@ -55,8 +55,10 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> /// <param name="ipConfig">Object that describes the current network configuration.</param> /// <param name="requiresHttps">True if an https connection is required, false otherwise.</param> /// <param name="preservePort">True if the previous connection's port is to continue to be used, false otherwise.</param> void UpdateConnection( IpConfiguration ipConfig, bool requiresHttps); bool requiresHttps, bool preservePort); } }