[MediaController] Replace native api with new one (#609)
[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.MediaControllerPlaylist;
20
21 namespace Tizen.Multimedia.Remoting
22 {
23     /// <summary>
24     /// Represents metadata for media control.
25     /// </summary>
26     /// <since_tizen> 4 </since_tizen>
27     public class MediaControlMetadata
28     {
29         /// <summary>
30         /// Initializes a new instance of the <see cref="MediaControlMetadata"/> class.
31         /// </summary>
32         /// <since_tizen> 4 </since_tizen>
33         public MediaControlMetadata()
34         {
35         }
36
37         internal MediaControlMetadata(IntPtr handle)
38         {
39             Debug.Assert(handle != IntPtr.Zero);
40
41             Title = Native.GetMetadata(handle, MediaControllerNativeAttribute.Title);
42             Artist = Native.GetMetadata(handle, MediaControllerNativeAttribute.Artist);
43             Album = Native.GetMetadata(handle, MediaControllerNativeAttribute.Album);
44             Author = Native.GetMetadata(handle, MediaControllerNativeAttribute.Author);
45             Genre = Native.GetMetadata(handle, MediaControllerNativeAttribute.Genre);
46             Duration = Native.GetMetadata(handle, MediaControllerNativeAttribute.Duration);
47             Date = Native.GetMetadata(handle, MediaControllerNativeAttribute.Date);
48             Copyright = Native.GetMetadata(handle, MediaControllerNativeAttribute.Copyright);
49             Description = Native.GetMetadata(handle, MediaControllerNativeAttribute.Description);
50             TrackNumber = Native.GetMetadata(handle, MediaControllerNativeAttribute.TrackNumber);
51             AlbumArtPath = Native.GetMetadata(handle, MediaControllerNativeAttribute.Picture);
52         }
53
54         /// <summary>
55         /// Gets or sets the title.
56         /// </summary>
57         /// <since_tizen> 4 </since_tizen>
58         public string Title { get; set; }
59
60         /// <summary>
61         /// Gets or sets the artist.
62         /// </summary>
63         /// <since_tizen> 4 </since_tizen>
64         public string Artist { get; set; }
65
66         /// <summary>
67         /// Gets or sets the album.
68         /// </summary>
69         /// <since_tizen> 4 </since_tizen>
70         public string Album { get; set; }
71
72         /// <summary>
73         /// Gets or sets the author.
74         /// </summary>
75         /// <since_tizen> 4 </since_tizen>
76         public string Author { get; set; }
77
78         /// <summary>
79         /// Gets or sets the genre.
80         /// </summary>
81         /// <since_tizen> 4 </since_tizen>
82         public string Genre { get; set; }
83
84         /// <summary>
85         /// Gets or sets the duration.
86         /// </summary>
87         /// <since_tizen> 4 </since_tizen>
88         public string Duration { get; set; }
89
90         /// <summary>
91         /// Gets or sets the date.
92         /// </summary>
93         /// <since_tizen> 4 </since_tizen>
94         public string Date { get; set; }
95
96         /// <summary>
97         /// Gets or sets the copyright.
98         /// </summary>
99         /// <since_tizen> 4 </since_tizen>
100         public string Copyright { get; set; }
101
102         /// <summary>
103         /// Gets or sets the description.
104         /// </summary>
105         /// <since_tizen> 4 </since_tizen>
106         public string Description { get; set; }
107
108         /// <summary>
109         /// Gets or sets the track number.
110         /// </summary>
111         /// <since_tizen> 4 </since_tizen>
112         public string TrackNumber { get; set; }
113
114         /// <summary>
115         /// Gets or sets the path of the album art.
116         /// </summary>
117         /// <since_tizen> 4 </since_tizen>
118         public string AlbumArtPath { get; set; }
119     }
120 }