From 5b1ddff6a981da0ed54ce92640f9623b5c377c38 Mon Sep 17 00:00:00 2001 From: priyakohl <114220343+priyakohl@users.noreply.github.com> Date: Tue, 11 Oct 2022 15:08:36 +0530 Subject: [PATCH] [Tizen.MapView] Deprecate Tizen.MapView and other view related APIs (#4593) * [Tizen.MapView] Deprecate Tizen.MpaView and other view related APIs Signed-off-by: priya kohli * [Tizen.MapView] updated comment Signed-off-by: priya kohli * Added Obsolete attribute to class declaration Signed-off-by: priya kohli Signed-off-by: priya kohli Co-authored-by: WonYoung Choi --- src/Tizen.Maps/Tizen.Maps/Area.cs | 2 ++ src/Tizen.Maps/Tizen.Maps/MapView.cs | 28 +++++++++++++++++++++++++++ src/Tizen.Maps/Tizen.Maps/Marker.cs | 1 + src/Tizen.Maps/Tizen.Maps/Overlay.cs | 3 +++ src/Tizen.Maps/Tizen.Maps/Polygon.cs | 2 ++ src/Tizen.Maps/Tizen.Maps/Polyline.cs | 2 ++ 6 files changed, 38 insertions(+) diff --git a/src/Tizen.Maps/Tizen.Maps/Area.cs b/src/Tizen.Maps/Tizen.Maps/Area.cs index 135414cfc..b144cc9ca 100755 --- a/src/Tizen.Maps/Tizen.Maps/Area.cs +++ b/src/Tizen.Maps/Tizen.Maps/Area.cs @@ -35,6 +35,7 @@ namespace Tizen.Maps /// Thrown when the required feature is not supported. /// Thrown when input coordinates are invalid. /// Thrown when a native operation fails to allocate memory. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Area(Geocoordinates topLeft, Geocoordinates bottomRight) { handle = new Interop.AreaHandle(topLeft?.handle, bottomRight?.handle); @@ -49,6 +50,7 @@ namespace Tizen.Maps /// Thrown when the required feature is not supported. /// Thrown when input coordinates are invalid. /// Thrown when a native operation fails to allocate memory. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Area(Geocoordinates center, double radius) { handle = new Interop.AreaHandle(center?.handle, radius); diff --git a/src/Tizen.Maps/Tizen.Maps/MapView.cs b/src/Tizen.Maps/Tizen.Maps/MapView.cs index d25e4b760..3659110cf 100755 --- a/src/Tizen.Maps/Tizen.Maps/MapView.cs +++ b/src/Tizen.Maps/Tizen.Maps/MapView.cs @@ -26,6 +26,7 @@ namespace Tizen.Maps /// Map View class to show a map on the screen. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public class MapView : Layout, IDisposable { internal Interop.ViewHandle handle; @@ -85,6 +86,7 @@ namespace Tizen.Maps /// Event handlers to get a scrolled gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler Scrolled { add @@ -112,6 +114,7 @@ namespace Tizen.Maps /// Event handlers to get a zoomed gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler TwoFingerZoomed { add @@ -139,6 +142,7 @@ namespace Tizen.Maps /// Event handlers to get a clicked gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler Clicked { add @@ -166,6 +170,7 @@ namespace Tizen.Maps /// Event handlers to get a double-clicked gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler DoubleClicked { add @@ -193,6 +198,7 @@ namespace Tizen.Maps /// Event handlers to get a clicked gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler TwoFingerClicked { add @@ -220,6 +226,7 @@ namespace Tizen.Maps /// Event handlers to get a rotated gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler TwoFingerRotated { add @@ -248,6 +255,7 @@ namespace Tizen.Maps /// Event handlers to get a long-pressed gesture event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler LongPressed { add @@ -275,6 +283,7 @@ namespace Tizen.Maps /// Event handlers to get a view ready event. /// 3 /// Thrown when the required feature is not supported. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler ViewReady { add @@ -301,6 +310,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public int ZoomLevel { get @@ -324,6 +334,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public int MinimumZoomLevel { get @@ -347,6 +358,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public int MaximumZoomLevel { get @@ -370,6 +382,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public double Orientation { get @@ -392,6 +405,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public MapTypes MapType { get @@ -414,6 +428,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public bool BuildingsEnabled { get @@ -436,6 +451,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public bool TrafficEnabled { get @@ -458,6 +474,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public bool PublicTransitEnabled { get @@ -480,6 +497,7 @@ namespace Tizen.Maps /// http://tizen.org/privilege/network.get /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public bool ScaleBarEnabled { get @@ -509,6 +527,7 @@ namespace Tizen.Maps /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public string Language { get @@ -532,6 +551,7 @@ namespace Tizen.Maps /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Geocoordinates Center { get @@ -549,6 +569,7 @@ namespace Tizen.Maps /// Gets a list of the map object added to map view. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public new IEnumerable Children { get @@ -568,6 +589,7 @@ namespace Tizen.Maps /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. /// Thrown when a native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Point GeolocationToScreen(Geocoordinates coordinates) { return handle.GeolocationToScreen(coordinates.handle); @@ -584,6 +606,7 @@ namespace Tizen.Maps /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. /// Thrown when a native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Geocoordinates ScreenToGeolocation(Point screenCoordinates) { return new Geocoordinates(handle.ScreenToGeolocation(screenCoordinates)); @@ -599,6 +622,7 @@ namespace Tizen.Maps /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. /// Thrown when a native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public void Add(MapObject child) { Log.Info(string.Format("Add a object")); @@ -624,6 +648,7 @@ namespace Tizen.Maps /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. /// Thrown when native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public void Remove(MapObject child) { Log.Info(string.Format("Remove a object")); @@ -645,6 +670,7 @@ namespace Tizen.Maps /// Thrown when the required feature is not supported. /// Thrown when application does not have some privilege to access this method. /// Thrown when a native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public void RemoveAll() { Log.Info(string.Format("Remove all of objects")); @@ -668,6 +694,7 @@ namespace Tizen.Maps /// Thrown when application does not have some privilege to access this method. /// Thrown when the value is invalid. /// Thrown when a native operation failed to allocate memory and connect to the service. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public void CaptureSnapshot(SnapshotType type, int quality, string path) { var err = Interop.ViewSnapshot.ViewCaptureSnapshot(handle, (Interop.ViewSnapshotFormatType)type, quality, path); @@ -785,6 +812,7 @@ namespace Tizen.Maps /// Releases all the resources used by this object. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public void Dispose() { Dispose(true); diff --git a/src/Tizen.Maps/Tizen.Maps/Marker.cs b/src/Tizen.Maps/Tizen.Maps/Marker.cs index 54c626045..12806c48f 100755 --- a/src/Tizen.Maps/Tizen.Maps/Marker.cs +++ b/src/Tizen.Maps/Tizen.Maps/Marker.cs @@ -49,6 +49,7 @@ namespace Tizen.Maps /// Gets or sets the clicked event handlers. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler Clicked; /// diff --git a/src/Tizen.Maps/Tizen.Maps/Overlay.cs b/src/Tizen.Maps/Tizen.Maps/Overlay.cs index 2ce79ae86..74c59fee0 100755 --- a/src/Tizen.Maps/Tizen.Maps/Overlay.cs +++ b/src/Tizen.Maps/Tizen.Maps/Overlay.cs @@ -34,6 +34,7 @@ namespace Tizen.Maps /// /// /// Thrown when the input coordinates or objectToContain are invalid. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Overlay(Geocoordinates coordinates, EvasObject objectToContain) : this(coordinates, objectToContain, Interop.ViewOverlayType.Normal) { @@ -89,6 +90,7 @@ namespace Tizen.Maps /// Gets or sets minimum zoom level for an overlay map object. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public int MinimumZoomLevel { get @@ -105,6 +107,7 @@ namespace Tizen.Maps /// Gets or sets maximum zoom lever for an overlay map object. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public int MaximumZoomLevel { get diff --git a/src/Tizen.Maps/Tizen.Maps/Polygon.cs b/src/Tizen.Maps/Tizen.Maps/Polygon.cs index 67a606df1..51097df07 100755 --- a/src/Tizen.Maps/Tizen.Maps/Polygon.cs +++ b/src/Tizen.Maps/Tizen.Maps/Polygon.cs @@ -38,6 +38,7 @@ namespace Tizen.Maps /// List of geographical coordinates. /// Background color. /// Thrown when input values are invalid. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Polygon(IEnumerable coordinates, Color color) : base() { var err = Interop.ErrorCode.InvalidParameter; @@ -62,6 +63,7 @@ namespace Tizen.Maps /// Adds or removes the clicked event handlers. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler Clicked; /// diff --git a/src/Tizen.Maps/Tizen.Maps/Polyline.cs b/src/Tizen.Maps/Tizen.Maps/Polyline.cs index 79f9b3a2f..4732be959 100755 --- a/src/Tizen.Maps/Tizen.Maps/Polyline.cs +++ b/src/Tizen.Maps/Tizen.Maps/Polyline.cs @@ -39,6 +39,7 @@ namespace Tizen.Maps /// Line color. /// The width of line [1 ~ 100] \(pixels). /// Thrown when input values are invalid. + [Obsolete("Deprecated since API10. Might be removed in API12.")] public Polyline(List coordinates, Color color, int width) : base() { var err = Interop.ErrorCode.InvalidParameter; @@ -63,6 +64,7 @@ namespace Tizen.Maps /// Adds or removes the clicked event handlers. /// /// 3 + [Obsolete("Deprecated since API10. Might be removed in API12.")] public event EventHandler Clicked; /// -- 2.34.1