From dea58350f320ad4bb2c4cd5f72cf79eb7f62067f Mon Sep 17 00:00:00 2001 From: coderhyme Date: Fri, 18 Aug 2017 15:24:06 +0900 Subject: [PATCH] [Multimedia] Added exception specifications to doc comments. Change-Id: Iedbf95f387981070cb7dcc8f342b46386b6791ea Signed-off-by: coderhyme --- src/Tizen.Multimedia/AudioManager/AudioManager.cs | 1 - .../AudioManager/AudioStreamPolicy.cs | 37 +++++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/src/Tizen.Multimedia/AudioManager/AudioManager.cs b/src/Tizen.Multimedia/AudioManager/AudioManager.cs index e6191e5..51cf1ca 100755 --- a/src/Tizen.Multimedia/AudioManager/AudioManager.cs +++ b/src/Tizen.Multimedia/AudioManager/AudioManager.cs @@ -38,7 +38,6 @@ namespace Tizen.Multimedia /// /// Gets the all devices currently connected. /// - /// The audio device options. /// An IEnumerable<AudioDevice> that contains connected devices. public static IEnumerable GetConnectedDevices() { diff --git a/src/Tizen.Multimedia/AudioManager/AudioStreamPolicy.cs b/src/Tizen.Multimedia/AudioManager/AudioStreamPolicy.cs index f82dfb4..accf277 100755 --- a/src/Tizen.Multimedia/AudioManager/AudioStreamPolicy.cs +++ b/src/Tizen.Multimedia/AudioManager/AudioStreamPolicy.cs @@ -36,6 +36,7 @@ namespace Tizen.Multimedia /// be passed to other APIs related to playback or recording. (e.g., , , etc.) /// /// Type of sound stream for which policy needs to be created. + /// is invalid. public AudioStreamPolicy(AudioStreamType streamType) { ValidationUtil.ValidateEnum(typeof(AudioStreamType), streamType, nameof(streamType)); @@ -70,6 +71,7 @@ namespace Tizen.Multimedia /// it returns . /// /// The of the policy instance. + /// The has already been disposed of. public AudioVolumeType VolumeType { get @@ -99,12 +101,14 @@ namespace Tizen.Multimedia /// Gets the state of focus for playback. /// /// The state of focus for playback. + /// The has already been disposed of. public AudioStreamFocusState PlaybackFocusState => GetFocusState(true); /// /// Gets the state of focus for recording. /// /// The state of focus for recording. + /// The has already been disposed of. public AudioStreamFocusState RecordingFocusState => GetFocusState(false); /// @@ -118,6 +122,7 @@ namespace Tizen.Multimedia /// If you don't want to reacquire the focus you've lost automatically, /// disable the focus reacquisition. /// + /// The has already been disposed of. public bool FocusReacquisitionEnabled { get @@ -152,6 +157,15 @@ namespace Tizen.Multimedia /// The focuses that you want to acquire. /// The requesting behaviors. /// The extra information for this request. This value can be null. + /// is zero. + /// + /// contain a invalid bit.\n + /// -or-\n + /// contain a invalid bit.\n + /// + /// The focus has already been acquired. + /// Called in raised by releasing focus. + /// The has already been disposed of. public void AcquireFocus(AudioStreamFocusOptions options, AudioStreamBehaviors behaviors, string extraInfo) { if (options == 0) @@ -179,6 +193,14 @@ namespace Tizen.Multimedia /// The focus mask that you want to release. /// The requesting behaviors. /// The extra information for this request. This value can be null. + /// is zero. + /// + /// contain a invalid bit.\n + /// -or-\n + /// contain a invalid bit.\n + /// + /// The focus has not been acquired. + /// The has already been disposed of. public void ReleaseFocus(AudioStreamFocusOptions options, AudioStreamBehaviors behaviors, string extraInfo) { if (options == 0) @@ -208,6 +230,7 @@ namespace Tizen.Multimedia /// /// /// + /// The has already been disposed of. public void ApplyStreamRouting() { Interop.AudioStreamPolicy.ApplyStreamRouting(Handle).Validate("Failed to apply stream routing"); @@ -220,6 +243,13 @@ namespace Tizen.Multimedia /// /// The available is and . /// + /// + /// The device is not connected.\n + /// -or-\n + /// An internal error occurs. + /// + /// is null. + /// The has already been disposed of. /// /// public void AddDeviceForStreamRouting(AudioDevice device) @@ -228,11 +258,12 @@ namespace Tizen.Multimedia { throw new ArgumentNullException(nameof(device)); } + var ret = Interop.AudioStreamPolicy.AddDeviceForStreamRouting(Handle, device.Id); if (ret == AudioManagerError.NoData) { - throw new ArgumentException("The device seems not connected.", nameof(device)); + throw new InvalidOperationException("The device seems not connected."); } ret.Validate("Failed to add device for stream routing"); @@ -245,6 +276,10 @@ namespace Tizen.Multimedia /// /// The available is and . /// + /// An internal error occurs. + /// is null. + /// The has already been disposed of. + /// public void RemoveDeviceForStreamRouting(AudioDevice device) { if (device == null) -- 2.7.4