Release 4.0.0-preview1-00151
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Remoting / MediaController / MediaControlMetadata.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18 using System.Diagnostics;
19 using Native = Interop.MediaControllerClient;
20
21 namespace Tizen.Multimedia.Remoting
22 {
23     /// <summary>
24     /// Represents metadata for media control.
25     /// </summary>
26     public class MediaControlMetadata
27     {
28         /// <summary>
29         /// Initializes a new instance of the <see cref="MediaControlMetadata"/> class.
30         /// </summary>
31         public MediaControlMetadata()
32         {
33         }
34
35         internal MediaControlMetadata(IntPtr handle)
36         {
37             Debug.Assert(handle != IntPtr.Zero);
38
39             Title = Native.GetMetadata(handle, MediaControllerAttribute.Title);
40             Artist = Native.GetMetadata(handle, MediaControllerAttribute.Artist);
41             Album = Native.GetMetadata(handle, MediaControllerAttribute.Album);
42             Author = Native.GetMetadata(handle, MediaControllerAttribute.Author);
43             Genre = Native.GetMetadata(handle, MediaControllerAttribute.Genre);
44             Duration = Native.GetMetadata(handle, MediaControllerAttribute.Duration);
45             Date = Native.GetMetadata(handle, MediaControllerAttribute.Date);
46             Copyright = Native.GetMetadata(handle, MediaControllerAttribute.Copyright);
47             Description = Native.GetMetadata(handle, MediaControllerAttribute.Description);
48             TrackNumber = Native.GetMetadata(handle, MediaControllerAttribute.TrackNumber);
49             AlbumArtPath = Native.GetMetadata(handle, MediaControllerAttribute.Picture);
50         }
51
52         /// <summary>
53         /// Gets or sets the title.
54         /// </summary>
55         public string Title { get; set; }
56
57         /// <summary>
58         /// Gets or sets the artist.
59         /// </summary>
60         public string Artist { get; set; }
61
62         /// <summary>
63         /// Gets or sets the album.
64         /// </summary>
65         public string Album { get; set; }
66
67         /// <summary>
68         /// Gets or sets the author.
69         /// </summary>
70         public string Author { get; set; }
71
72         /// <summary>
73         /// Gets or sets the genre.
74         /// </summary>
75         public string Genre { get; set; }
76
77         /// <summary>
78         /// Gets or sets the duration.
79         /// </summary>
80         public string Duration { get; set; }
81
82         /// <summary>
83         /// Gets or sets the date.
84         /// </summary>
85         public string Date { get; set; }
86
87         /// <summary>
88         /// Gets or sets the copyright.
89         /// </summary>
90         public string Copyright { get; set; }
91
92         /// <summary>
93         /// Gets or sets the description.
94         /// </summary>
95         public string Description { get; set; }
96
97         /// <summary>
98         /// Gets or sets the track number.
99         /// </summary>
100         public string TrackNumber { get; set; }
101
102         /// <summary>
103         /// Gets or sets the path of the album art.
104         /// </summary>
105         public string AlbumArtPath { get; set; }
106     }
107 }