[MediaController] Fix dirty description for MediaController
authorJiyong Min <jiyong.min@samsung.com>
Thu, 22 Dec 2016 11:48:27 +0000 (20:48 +0900)
committerJiyong Min <jiyong.min@samsung.com>
Thu, 22 Dec 2016 11:59:28 +0000 (03:59 -0800)
 - Add the description of Exception
 - Modify dirty description

Change-Id: I5cb73de25b1d52d80bd3b88d661631a9100aa285
Signed-off-by: Jiyong Min <jiyong.min@samsung.com>
15 files changed:
src/Tizen.Multimedia/MediaController/CustomCommandEventArgs.cs
src/Tizen.Multimedia/MediaController/CustomCommandReplyEventArgs.cs
src/Tizen.Multimedia/MediaController/MediaControllerClient.cs
src/Tizen.Multimedia/MediaController/MediaControllerEnums.cs
src/Tizen.Multimedia/MediaController/MediaControllerErrorFactory.cs
src/Tizen.Multimedia/MediaController/MediaControllerMetadata.cs
src/Tizen.Multimedia/MediaController/MediaControllerPlayback.cs
src/Tizen.Multimedia/MediaController/MediaControllerServer.cs
src/Tizen.Multimedia/MediaController/MetadataUpdatedEventArgs.cs
src/Tizen.Multimedia/MediaController/PlaybackStateCommandEventArgs.cs
src/Tizen.Multimedia/MediaController/PlaybackUpdatedEventArgs.cs
src/Tizen.Multimedia/MediaController/RepeatModeUpdatedEventArgs.cs
src/Tizen.Multimedia/MediaController/ServerInformation.cs
src/Tizen.Multimedia/MediaController/ServerUpdatedEventArgs.cs
src/Tizen.Multimedia/MediaController/ShuffleModeUpdatedEventArgs.cs

index 4d929e8..cb9c0a4 100755 (executable)
@@ -40,7 +40,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get client name.
+        /// Get the Client Name.
         /// </summary>
         public string ClientName
         {
@@ -51,7 +51,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get custom command.
+        /// Get the Custom Command.
         /// </summary>
         public string Command
         {
@@ -62,7 +62,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get bundle data.
+        /// Get the Bundle Data.
         /// </summary>
         public Bundle BundleData
         {
index fe724b5..9aa162c 100755 (executable)
@@ -41,7 +41,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server name.
+        /// Get the Sserver Name.
         /// </summary>
         public string ServerName
         {
@@ -52,7 +52,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get playback information.
+        /// Get the Result.
         /// </summary>
         public int Result
         {
@@ -63,7 +63,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get bundle data.
+        /// Get the Bundle Data.
         /// </summary>
         public Bundle BundleData
         {
index f1a846a..5bce0c4 100755 (executable)
@@ -47,9 +47,10 @@ namespace Tizen.Multimedia.MediaController
         private EventHandler<CustomCommandReplyEventArgs> _customcommandReply;
         private Interop.MediaControllerClient.CommandReplyRecievedCallback _customcommandReplyCallback;
 
-           /// <summary>
-        /// Constructor
+        /// <summary>
+        /// The constructor of MediaControllerClient class.
         /// </summary>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerClient ()
         {
             Interop.MediaControllerClient.Create (out _handle);
@@ -235,6 +236,7 @@ namespace Tizen.Multimedia.MediaController
 
         /// <summary>
         /// gets latest server information </summary>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public ServerInformation GetLatestServer()
         {
             MediaControllerError res = MediaControllerError.None;
@@ -255,6 +257,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// gets playback information for specific server </summary>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerPlayback GetPlayback(String serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -274,6 +278,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// gets metadata information for specific server </summary>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerMetadata GetMetadata(String serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -293,6 +299,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// gets shuffle mode for specific server </summary>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerShuffleMode GetShuffleMode(String serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -310,6 +318,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// gets repeat mode for specific server </summary>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerRepeatMode GetRepeatMode(String serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -328,6 +338,8 @@ namespace Tizen.Multimedia.MediaController
         /// Send command of playback state to server application </summary>
         /// <param name="serverName"> Server Name  </param>
         /// <param name="state"> Playback State  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void SendPlaybackStateCommand(string serverName, MediaControllerPlaybackState state)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -344,6 +356,8 @@ namespace Tizen.Multimedia.MediaController
         /// <param name="serverName"> Server Name  </param>
         /// <param name="command"> Command  </param>
         /// <param name="bundle"> Bundle data  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void SendCustomCommand(string serverName, string command, Bundle bundle)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -359,6 +373,7 @@ namespace Tizen.Multimedia.MediaController
         /// Subscribe subscription type from specific server application </summary>
         /// <param name="type"> Subscription Type  </param>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
         public void Subscribe(MediaControllerSubscriptionType type, string serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -374,6 +389,7 @@ namespace Tizen.Multimedia.MediaController
         /// Subscribe subscription type from specific server application </summary>
         /// <param name="type"> Subscription Type  </param>
         /// <param name="serverName"> Server Name  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
         public void Unsubscribe(MediaControllerSubscriptionType type, string serverName)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -400,6 +416,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// gets subscribed server list </summary>
         /// <param name="subscriptionType"> Subscription Type  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public Task<IEnumerable<string>> GetSubscribedServerList(MediaControllerSubscriptionType subscriptionType)
         {
             var task = new TaskCompletionSource<IEnumerable<string>>();
index af12c2f..8c00e37 100755 (executable)
@@ -20,7 +20,7 @@ using System;
 namespace Tizen.Multimedia.MediaController
 {
     /// <summary>
-    /// Enumeration for server state
+    /// Specifies states that a <see cref="ServerInformation"/> can have.
     /// </summary>
     public enum MediaControllerServerState
     {
@@ -119,27 +119,27 @@ namespace Tizen.Multimedia.MediaController
     public enum MediaControllerSubscriptionType
     {
         /// <summary>
-        /// Repeat mode is Off
+        /// The type of subscription is Server state
         /// </summary>
         ServerState,
 
         /// <summary>
-        /// Repeat mode is Off
+        /// The type of subscription is Playback
         /// </summary>
         Playback,
 
         /// <summary>
-        /// Repeat mode is Off
+        /// The type of subscription is Metadata
         /// </summary>
         Metadata,
 
         /// <summary>
-        /// Repeat mode is Off
+        /// The type of subscription is Shuffle mode
         /// </summary>
         ShuffleMode,
 
         /// <summary>
-        /// Repeat mode is Off
+        /// The type of subscription is Repeat mode
         /// </summary>
         RepeatMode,
     }
index a41ff27..df36184 100755 (executable)
@@ -43,9 +43,11 @@ namespace Tizen.Multimedia.MediaController
             case MediaControllerError.InvalidParameter:
                 throw new ArgumentException(errorMessage, paramName);
 
-            case MediaControllerError.OutOfMemory:
+            case MediaControllerError.OutOfMemory:\r
+            case MediaControllerError.NoSpaceOnDevice:\r
+                throw new OutOfMemoryException(errorMessage);\r
+\r
             case MediaControllerError.InvalidOperation:
-            case MediaControllerError.NoSpaceOnDevice:
             case MediaControllerError.PermissionDenied:
                 throw new InvalidOperationException(errorMessage);
             }
index 3b2a3a6..a3e58c0 100755 (executable)
@@ -37,7 +37,7 @@ namespace Tizen.Multimedia.MediaController
         private string _picture;
 
         /// <summary>
-        /// Constructor
+        /// The constructor of MediaControllerMetadata class.
         /// </summary>
         public MediaControllerMetadata()
         {
@@ -136,7 +136,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The title of media
+        /// Set/Get the Title of media
         /// </summary>
         public string Title
         {
@@ -150,7 +150,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The artist of media
+        /// Set/Get the Artist of media
         /// </summary>
         public string Artist
         {
@@ -165,7 +165,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The album of media
+        /// Set/Get the Album of media
         /// </summary>
         public string Album
         {
@@ -180,7 +180,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The author of media
+        /// Set/Get the Author of media
         /// </summary>
         public string Author
         {
@@ -195,7 +195,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The genre of media
+        /// Set/Get the Genre of media
         /// </summary>
         public string Genre
         {
@@ -210,7 +210,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The duration of media
+        /// Set/Get the Duration of media
         /// </summary>
         public string Duration
         {
@@ -225,7 +225,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The date of media
+        /// Set/Get the Date of media
         /// </summary>
         public string Date
         {
@@ -240,7 +240,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The copyright of media
+        /// Set/Get the Copyright of media
         /// </summary>
         public string Copyright
         {
@@ -255,7 +255,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The description of media
+        /// Set/Get the Description of media
         /// </summary>
         public string Description
         {
@@ -270,7 +270,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The track number of media
+        /// Set/Get the Track Number of media
         /// </summary>
         public string TrackNumber
         {
@@ -285,7 +285,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The picture of media
+        /// Set/Get the Picture of media
         /// </summary>
         public string Picture
         {
index f7fe52c..2277712 100755 (executable)
@@ -26,8 +26,9 @@ namespace Tizen.Multimedia.MediaController
     {
         private MediaControllerPlaybackState _state;
         private ulong _position;
+
         /// <summary>
-        /// Constructor
+        /// The constructor of MediaControllerPlayback class.
         /// </summary>
         public MediaControllerPlayback(MediaControllerPlaybackState state, ulong position) {
             _state = state;
@@ -58,7 +59,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
        /// <summary>
-       /// The state of playback of media application
+       /// Set/Get the State of playback information
        /// </summary>
         public MediaControllerPlaybackState State
         {
@@ -69,7 +70,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The position of playback of media application
+        /// Set/Get the Position of playback information
         /// </summary>
         public ulong Position
         {
index c50eaaa..97bd9ae 100755 (executable)
@@ -39,8 +39,9 @@ namespace Tizen.Multimedia.MediaController
         private Interop.MediaControllerServer.CustomCommandRecievedCallback _customCommandCallback;
 
         /// <summary>
-        /// Constructor
+        /// The constructor of MediaControllerServer class.
         /// </summary>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public MediaControllerServer ()
         {
             MediaControllerError res = MediaControllerError.None;
@@ -131,9 +132,17 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// Update playback state and playback position</summary>
         /// <param name="playback"> playback state and playback position  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void UpdatePlayback(MediaControllerPlayback playback)
         {
             MediaControllerError res = MediaControllerError.None;
+
+            if (playback == null)\r
+            {\r
+                MediaControllerErrorFactory.ThrowException(MediaControllerError.InvalidParameter, "playback");\r
+            }
+
             res = (MediaControllerError)Interop.MediaControllerServer.SetPlaybackState(_handle, (int)playback.State);
             if(res != MediaControllerError.None)
             {
@@ -159,9 +168,17 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// Update metadata information </summary>
         /// <param name="metadata"> metadata information  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void UpdateMetadata(MediaControllerMetadata metadata)
         {
             MediaControllerError res = MediaControllerError.None;
+
+            if (metadata == null)\r
+            {\r
+                MediaControllerErrorFactory.ThrowException(MediaControllerError.InvalidParameter, "metadata");\r
+            }
+
             res = (MediaControllerError)Interop.MediaControllerServer.SetMetadata(_handle, (int)MediaControllerAttributes.Title, metadata.Title);
             if(res != MediaControllerError.None)
             {
@@ -250,6 +267,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// Update shuffle mode </summary>
         /// <param name="mode"> shuffle mode  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void UpdateShuffleMode(MediaControllerShuffleMode mode)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -264,6 +283,8 @@ namespace Tizen.Multimedia.MediaController
         /// <summary>
         /// Update repeat mode </summary>
         /// <param name="mode"> repeat mode  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void UpdateRepeatMode(MediaControllerRepeatMode mode)
         {
             MediaControllerError res = MediaControllerError.None;
@@ -280,6 +301,8 @@ namespace Tizen.Multimedia.MediaController
         /// <param name="clientName"> client name to recieve reply  </param>
         /// <param name="result"> result to run command  </param>
         /// <param name="bundleData"> Bundle data  </param>
+        /// <exception cref="ArgumentException">Thrown when an invalid argument is used</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the operation is invalid for the current state</exception>
         public void SendCustomCommandReply(string clientName, int result, Bundle bundle)
         {
             MediaControllerError res = MediaControllerError.None;
index f0ca99a..dcf2601 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server name.
+        /// Get the Server Name.
         /// </summary>
         public string ServerName
         {
@@ -49,7 +49,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get playback information.
+        /// Get the Metadata information.
         /// </summary>
         public MediaControllerMetadata Metadata
         {
index 22a2ae1..a39a93f 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get client name.
+        /// Get the Client Name.
         /// </summary>
         public string ClientName
         {
@@ -49,7 +49,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get playback state.
+        /// Get the State of playback.
         /// </summary>
         public MediaControllerPlaybackState State
         {
index d230737..72dd41c 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server name.
+        /// Get the Server Name.
         /// </summary>
         public string ServerName
         {
@@ -49,7 +49,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get playback information.
+        /// Get the Playback Information.
         /// </summary>
         public MediaControllerPlayback PlaybackInfo
         {
index cd562d3..6f338b3 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server name.
+        /// Get the Server Name.
         /// </summary>
         public string ServerName
         {
@@ -49,7 +49,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get repeat mode.
+        /// Get the Repeat Mode.
         /// </summary>
         public MediaControllerRepeatMode RepeatMode
         {
index 44686f8..9870ef7 100755 (executable)
@@ -34,7 +34,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The name of server
+        /// Get the Name of server
         /// </summary>
         public string Name
         {
@@ -45,7 +45,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// The state of server
+        /// Get the State of server
         /// </summary>
         public MediaControllerServerState State
         {
index 5f96e85..ae0c169 100755 (executable)
@@ -35,7 +35,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server information.
+        /// Get the Server Information.
         /// </summary>
         public ServerInformation ServerInfo
         {
index 736b675..c380e31 100755 (executable)
@@ -38,7 +38,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get server name.
+        /// Get the Server Name.
         /// </summary>
         public string ServerName
         {
@@ -49,7 +49,7 @@ namespace Tizen.Multimedia.MediaController
         }
 
         /// <summary>
-        /// Get shuffle mode.
+        /// Get the Shuffle Mode.
         /// </summary>
         public MediaControllerShuffleMode ShuffleMode
         {