Release 4.0.0-preview1-00051
[platform/core/csapi/tizenfx.git] / src / Tizen.Maps / Tizen.Maps / RouteManeuver.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.Maps
20 {
21     /// <summary>
22     /// Route Maneuver information, used in Route Search requests
23     /// </summary>
24     /// <since_tizen>3</since_tizen>
25     public class RouteManeuver
26     {
27         private Interop.RouteDirection _direction;
28         private Interop.RouteTurnType _turntype;
29         private Geocoordinates _coordinates;
30         private string _road;
31         private string _instruction;
32         private string _locale;
33         private int _timeToNextInstruction;
34         private double _distanceToNextInstruction;
35
36         internal RouteManeuver(Interop.RouteManeuverHandle handle)
37         {
38             _direction = handle.Direction;
39             _turntype = handle.TurnType;
40             _coordinates = new Geocoordinates(handle.Coordinates);
41             _road = handle.RoadName;
42             _instruction = handle.Instruction;
43             _locale = handle.Locale;
44             _timeToNextInstruction = handle.TimeToNextInstruction;
45             _distanceToNextInstruction = handle.DistanceToNextInstruction;
46         }
47
48         /// <summary>
49         /// Gets direction type for this maneuver.
50         /// </summary>
51         /// <since_tizen>3</since_tizen>
52         public DirectionType Direction { get { return (DirectionType)_direction; } }
53
54         /// <summary>
55         /// Gets turn type for this maneuver.
56         /// </summary>
57         /// <since_tizen>3</since_tizen>
58         public TurnInstruction Turn { get { return (TurnInstruction)_turntype; } }
59
60         /// <summary>
61         /// Gets a geographical coordinates position for this maneuver.
62         /// </summary>
63         /// <since_tizen>3</since_tizen>
64         public Geocoordinates Position { get { return _coordinates; } }
65
66         /// <summary>
67         /// Gets a name of the road for this maneuver.
68         /// </summary>
69         /// <since_tizen>3</since_tizen>
70         public string Road { get { return _road; } }
71
72         /// <summary>
73         /// Gets an instruction text for this maneuver.
74         /// </summary>
75         /// <since_tizen>3</since_tizen>
76         public string Instruction { get { return _instruction; } }
77
78         /// <summary>
79         /// Gets a locale for this maneuver.
80         /// </summary>
81         /// <since_tizen>3</since_tizen>
82         public string Locale { get { return _locale; } }
83
84         /// <summary>
85         /// Gets time to next instruction for this maneuver.
86         /// </summary>
87         /// <since_tizen>3</since_tizen>
88         public int TimeToNextInstruction { get { return _timeToNextInstruction; } }
89
90         /// <summary>
91         /// Gets distance to next instruction for this maneuver.
92         /// </summary>
93         /// <since_tizen>3</since_tizen>
94         public double DistanceToNextInstruction { get { return _distanceToNextInstruction; } }
95     }
96 }