[Build] Suppress CS0618 warnings due to internal reference (#869)
[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 #pragma warning disable CS0618 // Type or member is obsolete
32         internal Folder(IntPtr handle)
33         {
34             Id = InteropHelper.GetString(handle, Interop.Folder.GetFolderId);
35             Path = InteropHelper.GetString(handle, Interop.Folder.GetPath);
36             Name = InteropHelper.GetString(handle, Interop.Folder.GetName);
37
38             StorageType = InteropHelper.GetValue<StorageType>(handle, Interop.Folder.GetStorageType);
39             StorageId = InteropHelper.GetString(handle, Interop.Folder.GetStorageId);
40         }
41 #pragma warning restore CS0618 // Type or member is obsolete
42         internal static Folder FromHandle(IntPtr handle) => new Folder(handle);
43
44         /// <summary>
45         /// Gets the ID of the folder.
46         /// </summary>
47         /// <value>The unique ID of the folder.</value>
48         /// <since_tizen> 4 </since_tizen>
49         public string Id { get; }
50
51         /// <summary>
52         /// Gets the path of the folder.
53         /// </summary>
54         /// <value>The path of the folder.</value>
55         /// <since_tizen> 4 </since_tizen>
56         public string Path { get; }
57
58         /// <summary>
59         /// Gets the name of the folder.
60         /// </summary>
61         /// <value>The name of the folder.</value>
62         /// <since_tizen> 4 </since_tizen>
63         public string Name { get; }
64
65         /// <summary>
66         /// Gets the <see cref="StorageType"/> of the storage that the folder exists.
67         /// </summary>
68         /// <value>The <see cref="StorageType"/> of the storage that the folder exists.</value>
69         /// <since_tizen> 4 </since_tizen>
70         [Obsolete("Please do not use! this will be deprecated in level 6")]
71         public StorageType StorageType { get; }
72
73         /// <summary>
74         /// Gets the storage ID of the storage that the folder exists.
75         /// </summary>
76         /// <value>The storage ID of the storage that the folder exists.</value>
77         /// <since_tizen> 4 </since_tizen>
78         [Obsolete("Please do not use! this will be deprecated in level 6")]
79         public string StorageId { get; }
80
81 #pragma warning disable CS0618 // Type or member is obsolete
82         /// <summary>
83         /// Returns a string representation of the folder.
84         /// </summary>
85         /// <returns>A string representation of the current folder.</returns>
86         /// <since_tizen> 4 </since_tizen>
87         public override string ToString() =>
88             $"Id={Id}, Name={Name}, Path={Path}, StorageType={StorageType}, StorageId={StorageType}";
89 #pragma warning restore CS0618 // Type or member is obsolete
90     }
91 }