Loading WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/HolographicOs.cs +121 −5 Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </content> public partial class DevicePortal { public enum ProcessStatus { Running = 0, Stopped } /// <summary> /// API for getting or setting Interpupilary distance /// </summary> Loading @@ -29,6 +35,21 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> public static readonly string HolographicWebManagementHttpSettingsApi = "api/holographic/os/webmanagement/settings/https"; /// <summary> /// Gets the status of the Holographic Services on this HoloLens. /// </summary> /// <returns>HolographicServices object describing the state of the Holographic services.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task<HolographicServices> GetHolographicServiceState() { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) { throw new NotSupportedException("This method is only supported on HoloLens."); } return await this.GetAsync<HolographicServices>(HolographicServicesApi); } /// <summary> /// Gets the interpupilary distance registered on the device. /// </summary> Loading Loading @@ -103,16 +124,56 @@ namespace Microsoft.Tools.WindowsDevicePortal #region Data contract /// <summary> /// Object representation for HTTP settings /// Object reporesentation of the status of the Holographic services /// </summary> [DataContract] public class WebManagementHttpSettings public class HolographicServices { [DataMember(Name = "SoftwareStatus")] public HolographicSoftwareStatus Status { get; private set; } } /// <summary> /// Gets a value indicating whether HTTPS is required /// Object representation of the collection of holographic services. /// </summary> [DataMember(Name = "httpsRequired")] public bool IsHttpsRequired { get; private set; } [DataContract] public class HolographicSoftwareStatus { /// <summary> /// Gets the status of dwm.exe /// </summary> [DataMember(Name = "dwm.exe")] public ServiceStatus Dwm { get; private set; } /// <summary> /// Gets the status of holoshellapp.exe /// </summary> [DataMember(Name = "holoshellapp.exe")] public ServiceStatus HoloShellApp { get; private set; } /// <summary> /// Gets the status of holosi.exe /// </summary> [DataMember(Name = "holosi.exe")] public ServiceStatus HoloSi { get; private set; } /// <summary> /// Gets the status of mixedrealitycapture.exe /// </summary> [DataMember(Name = "mixedrealitycapture.exe")] public ServiceStatus MixedRealitytCapture { get; private set; } /// <summary> /// Gets the status of sihost.exe /// </summary> [DataMember(Name = "sihost.exe")] public ServiceStatus SiHost { get; private set; } /// <summary> /// Gets the status of spectrum.exe /// </summary> [DataMember(Name = "spectrum.exe")] public ServiceStatus Spectrum { get; private set; } } /// <summary> Loading @@ -136,6 +197,61 @@ namespace Microsoft.Tools.WindowsDevicePortal set { this.IpdRaw = (int)(value * 1000); } } } /// <summary> /// Object representation of the status of a service /// </summary> [DataContract] public class ServiceStatus { /// <summary> /// Gets the raw value returned for the expected service status /// </summary> [DataMember(Name = "Expected")] public string ExpectedRaw { get; private set; } /// <summary> /// Gets the raw value returned for the observed service status /// </summary> [DataMember(Name = "Observed")] public string ObservedRaw { get; private set; } /// <summary> /// Gets the the expected service status /// </summary> public ProcessStatus Expected { get { return (ExpectedRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } /// <summary> /// Gets the the observed service status /// </summary> public ProcessStatus Observed { get { return (ObservedRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } } /// <summary> /// Object representation for HTTP settings /// </summary> [DataContract] public class WebManagementHttpSettings { /// <summary> /// Gets a value indicating whether HTTPS is required /// </summary> [DataMember(Name = "httpsRequired")] public bool IsHttpsRequired { get; private set; } } #endregion // Data contract } } WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/MixedRealityCapture.cs +14 −3 Original line number Diff line number Diff line Loading @@ -478,16 +478,27 @@ namespace Microsoft.Tools.WindowsDevicePortal } /// <summary> /// Object representation of the recording process status /// Object representation of the Mixed Reality Capture process status /// </summary> [DataContract] public class MrcProcessStatus { /// <summary> /// Gets the process status /// Gets the raw data for the Mixed Reality Capture process status /// </summary> [DataMember(Name = "MrcProcess")] public string MrcProcess { get; private set; } // TODO this should be an enum public string MrcProcessRaw { get; private set; } /// <summary> /// Gets the status of the Mixed Reality Capture process /// </summary> public ProcessStatus MrcProcess { get { return (this.MrcProcessRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } } /// <summary> Loading Loading
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/HolographicOs.cs +121 −5 Original line number Diff line number Diff line Loading @@ -14,6 +14,12 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </content> public partial class DevicePortal { public enum ProcessStatus { Running = 0, Stopped } /// <summary> /// API for getting or setting Interpupilary distance /// </summary> Loading @@ -29,6 +35,21 @@ namespace Microsoft.Tools.WindowsDevicePortal /// </summary> public static readonly string HolographicWebManagementHttpSettingsApi = "api/holographic/os/webmanagement/settings/https"; /// <summary> /// Gets the status of the Holographic Services on this HoloLens. /// </summary> /// <returns>HolographicServices object describing the state of the Holographic services.</returns> /// <remarks>This method is only supported on HoloLens devices.</remarks> public async Task<HolographicServices> GetHolographicServiceState() { if (!Utilities.IsHoloLens(this.Platform, this.DeviceFamily)) { throw new NotSupportedException("This method is only supported on HoloLens."); } return await this.GetAsync<HolographicServices>(HolographicServicesApi); } /// <summary> /// Gets the interpupilary distance registered on the device. /// </summary> Loading Loading @@ -103,16 +124,56 @@ namespace Microsoft.Tools.WindowsDevicePortal #region Data contract /// <summary> /// Object representation for HTTP settings /// Object reporesentation of the status of the Holographic services /// </summary> [DataContract] public class WebManagementHttpSettings public class HolographicServices { [DataMember(Name = "SoftwareStatus")] public HolographicSoftwareStatus Status { get; private set; } } /// <summary> /// Gets a value indicating whether HTTPS is required /// Object representation of the collection of holographic services. /// </summary> [DataMember(Name = "httpsRequired")] public bool IsHttpsRequired { get; private set; } [DataContract] public class HolographicSoftwareStatus { /// <summary> /// Gets the status of dwm.exe /// </summary> [DataMember(Name = "dwm.exe")] public ServiceStatus Dwm { get; private set; } /// <summary> /// Gets the status of holoshellapp.exe /// </summary> [DataMember(Name = "holoshellapp.exe")] public ServiceStatus HoloShellApp { get; private set; } /// <summary> /// Gets the status of holosi.exe /// </summary> [DataMember(Name = "holosi.exe")] public ServiceStatus HoloSi { get; private set; } /// <summary> /// Gets the status of mixedrealitycapture.exe /// </summary> [DataMember(Name = "mixedrealitycapture.exe")] public ServiceStatus MixedRealitytCapture { get; private set; } /// <summary> /// Gets the status of sihost.exe /// </summary> [DataMember(Name = "sihost.exe")] public ServiceStatus SiHost { get; private set; } /// <summary> /// Gets the status of spectrum.exe /// </summary> [DataMember(Name = "spectrum.exe")] public ServiceStatus Spectrum { get; private set; } } /// <summary> Loading @@ -136,6 +197,61 @@ namespace Microsoft.Tools.WindowsDevicePortal set { this.IpdRaw = (int)(value * 1000); } } } /// <summary> /// Object representation of the status of a service /// </summary> [DataContract] public class ServiceStatus { /// <summary> /// Gets the raw value returned for the expected service status /// </summary> [DataMember(Name = "Expected")] public string ExpectedRaw { get; private set; } /// <summary> /// Gets the raw value returned for the observed service status /// </summary> [DataMember(Name = "Observed")] public string ObservedRaw { get; private set; } /// <summary> /// Gets the the expected service status /// </summary> public ProcessStatus Expected { get { return (ExpectedRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } /// <summary> /// Gets the the observed service status /// </summary> public ProcessStatus Observed { get { return (ObservedRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } } /// <summary> /// Object representation for HTTP settings /// </summary> [DataContract] public class WebManagementHttpSettings { /// <summary> /// Gets a value indicating whether HTTPS is required /// </summary> [DataMember(Name = "httpsRequired")] public bool IsHttpsRequired { get; private set; } } #endregion // Data contract } }
WindowsDevicePortalWrapper/WindowsDevicePortalWrapper.Shared/HoloLens/MixedRealityCapture.cs +14 −3 Original line number Diff line number Diff line Loading @@ -478,16 +478,27 @@ namespace Microsoft.Tools.WindowsDevicePortal } /// <summary> /// Object representation of the recording process status /// Object representation of the Mixed Reality Capture process status /// </summary> [DataContract] public class MrcProcessStatus { /// <summary> /// Gets the process status /// Gets the raw data for the Mixed Reality Capture process status /// </summary> [DataMember(Name = "MrcProcess")] public string MrcProcess { get; private set; } // TODO this should be an enum public string MrcProcessRaw { get; private set; } /// <summary> /// Gets the status of the Mixed Reality Capture process /// </summary> public ProcessStatus MrcProcess { get { return (this.MrcProcessRaw == "Running") ? ProcessStatus.Running : ProcessStatus.Stopped; } } } /// <summary> Loading