2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Collections.Generic;
20 namespace Tizen.Multimedia.MediaController
23 /// Metadata represents a metadata of media for server application to play
25 public class MediaControllerMetadata
28 /// The constructor of MediaControllerMetadata class.
30 public MediaControllerMetadata()
35 internal MediaControllerMetadata(IntPtr _handle) {
48 MediaControllerValidator.ThrowIfError(
49 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Title, out _title),
52 MediaControllerValidator.ThrowIfError(
53 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Artist, out _artist),
56 MediaControllerValidator.ThrowIfError(
57 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Album, out _album),
60 MediaControllerValidator.ThrowIfError(
61 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Author, out _author),
64 MediaControllerValidator.ThrowIfError(
65 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Genre, out _genre),
68 MediaControllerValidator.ThrowIfError(
69 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Duration, out _duration),
70 "Get Duration failed");
72 MediaControllerValidator.ThrowIfError(
73 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Date, out _date),
76 MediaControllerValidator.ThrowIfError(
77 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Copyright, out _copyright),
78 "Get Copyright failed");
80 MediaControllerValidator.ThrowIfError(
81 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Description, out _description),
82 "Get Description failed");
84 MediaControllerValidator.ThrowIfError(
85 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.TrackNumber, out _track_number),
86 "Get TrackNumber failed");
88 MediaControllerValidator.ThrowIfError(
89 Interop.MediaControllerClient.GetMetadata(_handle, MediaControllerAttributes.Picture, out _picture),
90 "Get Picture failed");
99 Copyright = _copyright;
100 Description = _description;
101 TrackNumber = _track_number;
106 /// Set/Get the Title of media
108 public string Title { get; set; }
111 /// Set/Get the Artist of media
113 public string Artist { get; set; }
116 /// Set/Get the Album of media
118 public string Album { get; set; }
121 /// Set/Get the Author of media
123 public string Author { get; set; }
126 /// Set/Get the Genre of media
128 public string Genre { get; set; }
131 /// Set/Get the Duration of media
133 public string Duration { get; set; }
136 /// Set/Get the Date of media
138 public string Date { get; set; }
141 /// Set/Get the Copyright of media
143 public string Copyright { get; set; }
146 /// Set/Get the Description of media
148 public string Description { get; set; }
151 /// Set/Get the Track Number of media
153 public string TrackNumber { get; set; }
156 /// Set/Get the Picture of media
158 public string Picture { get; set; }