Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Multimedia.MediaPlayer / Player / DownloadProgress.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 namespace Tizen.Multimedia
17 {
18
19     /// <summary>
20     /// Represents data for a downloading status.
21     /// </summary>
22     public struct DownloadProgress
23     {
24         /// <summary>
25         /// Initializes a new instance of the DownloadProgress struct.
26         /// </summary>
27         /// <param name="start">The position that downloading started in percentage.</param>
28         /// <param name="current">The position indicating the current downloading progress in percentage.</param>
29         public DownloadProgress(int start, int current)
30         {
31             Start = start;
32             Current = current;
33             Log.Debug(PlayerLog.Tag, "start : " + start + ", current : " + current);
34         }
35
36         /// <summary>
37         /// Gets or sets the start position.
38         /// </summary>
39         /// <value>The position that downloading started in percentage.</value>
40         public int Start
41         {
42             get;
43             set;
44         }
45
46         /// <summary>
47         /// Gets or sets the current position.
48         /// </summary>
49         /// <value>The position indicating the current downloading progress in percentage.</value>
50         public int Current
51         {
52             get;
53             set;
54         }
55
56         public override string ToString()
57         {
58             return $"Start={ Start.ToString() }, Current={ Current.ToString() }";
59         }
60     }
61 }