Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.Remoting / MediaController / MediaControllerMetadata.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 Native = Interop.MediaControllerClient;
19
20 namespace Tizen.Multimedia.MediaController
21 {
22     /// <summary>
23     /// Metadata represents a metadata of media for server application to play
24     /// </summary>
25     public class MediaControllerMetadata
26     {
27         /// <summary>
28         /// The constructor of MediaControllerMetadata class.
29         /// </summary>
30         /// <since_tizen> 3 </since_tizen>
31         public MediaControllerMetadata()
32         {
33             // Do nothing
34         }
35
36         internal MediaControllerMetadata(IntPtr handle)
37         {
38             if (handle == IntPtr.Zero)
39             {
40                 throw new InvalidOperationException("MediaControllerMetadata is not valid.");
41             }
42
43             Title = Native.GetMetadata(handle, MediaControllerAttributes.Title);
44             Artist = Native.GetMetadata(handle, MediaControllerAttributes.Artist);
45             Album = Native.GetMetadata(handle, MediaControllerAttributes.Album);
46             Author = Native.GetMetadata(handle, MediaControllerAttributes.Author);
47             Genre = Native.GetMetadata(handle, MediaControllerAttributes.Genre);
48             Duration = Native.GetMetadata(handle, MediaControllerAttributes.Duration);
49             Date = Native.GetMetadata(handle, MediaControllerAttributes.Date);
50             Copyright = Native.GetMetadata(handle, MediaControllerAttributes.Copyright);
51             Description = Native.GetMetadata(handle, MediaControllerAttributes.Description);
52             TrackNumber = Native.GetMetadata(handle, MediaControllerAttributes.TrackNumber);
53             Picture = Native.GetMetadata(handle, MediaControllerAttributes.Picture);
54         }
55
56         /// <summary>
57         /// Set/Get the Title of media
58         /// </summary>
59         /// <since_tizen> 3 </since_tizen>
60         public string Title { get; set; }
61
62         /// <summary>
63         /// Set/Get the Artist of media
64         /// </summary>
65         /// <since_tizen> 3 </since_tizen>
66         public string Artist { get; set; }
67
68         /// <summary>
69         /// Set/Get the Album of media
70         /// </summary>
71         /// <since_tizen> 3 </since_tizen>
72         public string Album { get; set; }
73
74         /// <summary>
75         /// Set/Get the Author of media
76         /// </summary>
77         /// <since_tizen> 3 </since_tizen>
78         public string Author { get; set; }
79
80         /// <summary>
81         /// Set/Get the Genre of media
82         /// </summary>
83         /// <since_tizen> 3 </since_tizen>
84         public string Genre { get; set; }
85
86         /// <summary>
87         /// Set/Get the Duration of media
88         /// </summary>
89         /// <since_tizen> 3 </since_tizen>
90         public string Duration { get; set; }
91
92         /// <summary>
93         /// Set/Get the Date of media
94         /// </summary>
95         /// <since_tizen> 3 </since_tizen>
96         public string Date { get; set; }
97
98         /// <summary>
99         /// Set/Get the Copyright of media
100         /// </summary>
101         /// <since_tizen> 3 </since_tizen>
102         public string Copyright { get; set; }
103
104         /// <summary>
105         /// Set/Get the Description of media
106         /// </summary>
107         /// <since_tizen> 3 </since_tizen>
108         public string Description { get; set; }
109
110         /// <summary>
111         /// Set/Get the Track Number of media
112         /// </summary>
113         /// <since_tizen> 3 </since_tizen>
114         public string TrackNumber { get; set; }
115
116         /// <summary>
117         /// Set/Get the Picture of media
118         /// </summary>
119         /// <since_tizen> 3 </since_tizen>
120         public string Picture { get; set; }
121     }
122 }
123