Release 9.0.0.16887
[platform/core/csapi/tizenfx.git] / src / Tizen.Applications.PackageManager / Tizen.Applications / PackageDependencyInformation.cs
1 /*
2  * Copyright (c) 2019 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.Applications
20 {
21     /// <summary>
22     /// This class has read-only properties to get the package dependency information.
23     /// </summary>
24     /// <since_tizen> 6 </since_tizen>
25     public class PackageDependencyInformation
26     {
27         private string _from;
28         private string _to;
29         private string _type;
30         private string _requiredVersion;
31
32         /// <summary>
33         /// The ID of package that depends on another.
34         /// </summary>
35         /// <since_tizen> 6 </since_tizen>
36         public string From { get { return _from; } }
37
38         /// <summary>
39         /// The ID of package that is required by another.
40         /// </summary>
41         /// <since_tizen>  </since_tizen>
42         public string To { get { return _to; } }
43
44         /// <summary>
45         /// The Type of dependency.
46         /// </summary>
47         /// <since_tizen> 6 </since_tizen>
48         public string Type { get { return _type; } }
49
50         /// <summary>
51         /// The required version.
52         /// </summary>
53         /// <since_tizen> 6 </since_tizen>
54         public string RequiredVersion { get { return _requiredVersion; } }
55         internal static PackageDependencyInformation GetPackageDependencyInformation(string from, string to, string type, string requiredVersion)
56         {
57             var pkgDependencyInfo = new PackageDependencyInformation();
58             pkgDependencyInfo._from = from;
59             pkgDependencyInfo._to = to;
60             pkgDependencyInfo._type = type;
61             pkgDependencyInfo._requiredVersion = requiredVersion;
62             return pkgDependencyInfo;
63         }
64     }
65 }