}
/// <summary>
- /// Get client name.
+ /// Get the Client Name.
/// </summary>
public string ClientName
{
}
/// <summary>
- /// Get custom command.
+ /// Get the Custom Command.
/// </summary>
public string Command
{
}
/// <summary>
- /// Get bundle data.
+ /// Get the Bundle Data.
/// </summary>
public Bundle BundleData
{
}
/// <summary>
- /// Get server name.
+ /// Get the Sserver Name.
/// </summary>
public string ServerName
{
}
/// <summary>
- /// Get playback information.
+ /// Get the Result.
/// </summary>
public int Result
{
}
/// <summary>
- /// Get bundle data.
+ /// Get the Bundle Data.
/// </summary>
public Bundle BundleData
{
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);
/// <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;
/// <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;
/// <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;
/// <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;
/// <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;
/// 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;
/// <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;
/// 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;
/// 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;
/// <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>>();
namespace Tizen.Multimedia.MediaController
{
/// <summary>
- /// Enumeration for server state
+ /// Specifies states that a <see cref="ServerInformation"/> can have.
/// </summary>
public enum MediaControllerServerState
{
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,
}
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);
}
private string _picture;
/// <summary>
- /// Constructor
+ /// The constructor of MediaControllerMetadata class.
/// </summary>
public MediaControllerMetadata()
{
}
/// <summary>
- /// The title of media
+ /// Set/Get the Title of media
/// </summary>
public string Title
{
}
/// <summary>
- /// The artist of media
+ /// Set/Get the Artist of media
/// </summary>
public string Artist
{
}
/// <summary>
- /// The album of media
+ /// Set/Get the Album of media
/// </summary>
public string Album
{
}
/// <summary>
- /// The author of media
+ /// Set/Get the Author of media
/// </summary>
public string Author
{
}
/// <summary>
- /// The genre of media
+ /// Set/Get the Genre of media
/// </summary>
public string Genre
{
}
/// <summary>
- /// The duration of media
+ /// Set/Get the Duration of media
/// </summary>
public string Duration
{
}
/// <summary>
- /// The date of media
+ /// Set/Get the Date of media
/// </summary>
public string Date
{
}
/// <summary>
- /// The copyright of media
+ /// Set/Get the Copyright of media
/// </summary>
public string Copyright
{
}
/// <summary>
- /// The description of media
+ /// Set/Get the Description of media
/// </summary>
public string Description
{
}
/// <summary>
- /// The track number of media
+ /// Set/Get the Track Number of media
/// </summary>
public string TrackNumber
{
}
/// <summary>
- /// The picture of media
+ /// Set/Get the Picture of media
/// </summary>
public string Picture
{
{
private MediaControllerPlaybackState _state;
private ulong _position;
+
/// <summary>
- /// Constructor
+ /// The constructor of MediaControllerPlayback class.
/// </summary>
public MediaControllerPlayback(MediaControllerPlaybackState state, ulong position) {
_state = state;
}
/// <summary>
- /// The state of playback of media application
+ /// Set/Get the State of playback information
/// </summary>
public MediaControllerPlaybackState State
{
}
/// <summary>
- /// The position of playback of media application
+ /// Set/Get the Position of playback information
/// </summary>
public ulong Position
{
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;
/// <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)
{
/// <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)
{
/// <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;
/// <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;
/// <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;
}
/// <summary>
- /// Get server name.
+ /// Get the Server Name.
/// </summary>
public string ServerName
{
}
/// <summary>
- /// Get playback information.
+ /// Get the Metadata information.
/// </summary>
public MediaControllerMetadata Metadata
{
}
/// <summary>
- /// Get client name.
+ /// Get the Client Name.
/// </summary>
public string ClientName
{
}
/// <summary>
- /// Get playback state.
+ /// Get the State of playback.
/// </summary>
public MediaControllerPlaybackState State
{
}
/// <summary>
- /// Get server name.
+ /// Get the Server Name.
/// </summary>
public string ServerName
{
}
/// <summary>
- /// Get playback information.
+ /// Get the Playback Information.
/// </summary>
public MediaControllerPlayback PlaybackInfo
{
}
/// <summary>
- /// Get server name.
+ /// Get the Server Name.
/// </summary>
public string ServerName
{
}
/// <summary>
- /// Get repeat mode.
+ /// Get the Repeat Mode.
/// </summary>
public MediaControllerRepeatMode RepeatMode
{
}
/// <summary>
- /// The name of server
+ /// Get the Name of server
/// </summary>
public string Name
{
}
/// <summary>
- /// The state of server
+ /// Get the State of server
/// </summary>
public MediaControllerServerState State
{
}
/// <summary>
- /// Get server information.
+ /// Get the Server Information.
/// </summary>
public ServerInformation ServerInfo
{
}
/// <summary>
- /// Get server name.
+ /// Get the Server Name.
/// </summary>
public string ServerName
{
}
/// <summary>
- /// Get shuffle mode.
+ /// Get the Shuffle Mode.
/// </summary>
public MediaControllerShuffleMode ShuffleMode
{