Merge "[NUI] suuport NUIWatchApplication for watchface app"
[platform/core/csapi/tizenfx.git] / src / Tizen.Content.MediaContent / Tizen.Content.MediaContent / Folder.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
19 namespace Tizen.Content.MediaContent
20 {
21     /// <summary>
22     /// Represents the folder information for the media.
23     /// </summary>
24     /// <remarks>
25     /// The <see cref="Folder"/> is used to organize media content files, i.e., image, audio, and video files,
26     /// in the physical storage of the device.
27     /// </remarks>
28     /// <since_tizen> 4 </since_tizen>
29     public class Folder
30     {
31         internal Folder(IntPtr handle)
32         {
33             Id = InteropHelper.GetString(handle, Interop.Folder.GetFolderId);
34             Path = InteropHelper.GetString(handle, Interop.Folder.GetPath);
35             Name = InteropHelper.GetString(handle, Interop.Folder.GetName);
36
37             StorageType = InteropHelper.GetValue<StorageType>(handle, Interop.Folder.GetStorageType);
38             StorageId = InteropHelper.GetString(handle, Interop.Folder.GetStorageId);
39         }
40
41         internal static Folder FromHandle(IntPtr handle) => new Folder(handle);
42
43         /// <summary>
44         /// Gets the ID of the folder.
45         /// </summary>
46         /// <value>The unique ID of the folder.</value>
47         /// <since_tizen> 4 </since_tizen>
48         public string Id { get; }
49
50         /// <summary>
51         /// Gets the path of the folder.
52         /// </summary>
53         /// <value>The path of the folder.</value>
54         /// <since_tizen> 4 </since_tizen>
55         public string Path { get; }
56
57         /// <summary>
58         /// Gets the name of the folder.
59         /// </summary>
60         /// <value>The name of the folder.</value>
61         /// <since_tizen> 4 </since_tizen>
62         public string Name { get; }
63
64         /// <summary>
65         /// Gets the <see cref="StorageType"/> of the storage that the folder exists.
66         /// </summary>
67         /// <value>The <see cref="StorageType"/> of the storage that the folder exists.</value>
68         /// <since_tizen> 4 </since_tizen>
69         public StorageType StorageType { get; }
70
71         /// <summary>
72         /// Gets the storage ID of the storage that the folder exists.
73         /// </summary>
74         /// <value>The storage ID of the storage that the folder exists.</value>
75         /// <since_tizen> 4 </since_tizen>
76         public string StorageId { get; }
77
78         /// <summary>
79         /// Returns a string representation of the folder.
80         /// </summary>
81         /// <returns>A string representation of the current folder.</returns>
82         /// <since_tizen> 4 </since_tizen>
83         public override string ToString() =>
84             $"Id={Id}, Name={Name}, Path={Path}, StorageType={StorageType}, StorageId={StorageType}";
85     }
86 }