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.
19 namespace Tizen.Content.MediaContent
22 /// Represents a logical collection grouping of related media information.
24 /// <seealso cref="AlbumCommand"/>
27 internal Album(IntPtr handle)
29 Id = InteropHelper.GetValue<int>(handle, Interop.Album.GetId);
31 Artist = InteropHelper.GetString(handle, Interop.Album.GetArtist);
32 AlbumArtPath = InteropHelper.GetString(handle, Interop.Album.GetAlbumArt);
33 Name = InteropHelper.GetString(handle, Interop.Album.GetName);
36 internal static Album FromHandle(IntPtr handle) => new Album(handle);
39 /// Gets the ID of the album.
41 /// <value>The unique ID of the album.</value>
42 public int Id { get; }
45 /// Gets the artist name of the album.
47 /// <value>The artist name.</value>
48 public string Artist { get; }
51 /// Gets the path to the album art.
53 /// <value>The path to the album art.</value>
54 public string AlbumArtPath { get; }
57 /// Gets the name of the album.
59 /// <value>The album name.</value>
60 public string Name { get; }
63 /// Returns a string representation of the album.
65 /// <returns>A string representation of the current album.</returns>
66 public override string ToString() =>
67 $"Id={Id}, Name={Name}, Artist={Artist}, AlbumArtPath={AlbumArtPath}";