[TCSACR-601][Badge] Deprecate Badge apis (#6318)
authorsukhyungkang <35091460+sukhyungkang@users.noreply.github.com>
Thu, 26 Sep 2024 06:17:51 +0000 (15:17 +0900)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2024 06:17:51 +0000 (15:17 +0900)
Signed-off-by: SukhyungKang <shine.kang@samsung.com>
src/Tizen.Applications.Badge/Tizen.Applications/Badge.cs
src/Tizen.Applications.Badge/Tizen.Applications/BadgeControl.cs
src/Tizen.Applications.Badge/Tizen.Applications/BadgeEventArgs.cs

index c7a4f1acabcd0cc75fbfcb76eaaac660da86f73d..6378e4b5ba85ef4834d460dc4c293998ed364298 100644 (file)
@@ -22,6 +22,7 @@ namespace Tizen.Applications
     /// The class containing common properties of the Badge.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class Badge
     {
         private int count = 0;
@@ -34,6 +35,7 @@ namespace Tizen.Applications
         /// <param name="count">Count value</param>
         /// <param name="visible">True if it should be displayed</param>
         /// <exception cref="ArgumentException">Thrown when failed because of invalid argument</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public Badge(string appId, int count = 1, bool visible = true)
         {
             if (IsNegativeNumber(count))
@@ -50,6 +52,7 @@ namespace Tizen.Applications
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
         /// <exception cref="ArgumentException">Thrown when set negative number</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public int Count
         {
             get
@@ -71,12 +74,14 @@ namespace Tizen.Applications
         /// Property for the application ID of the badge.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string AppId { get; set; }
 
         /// <summary>
         /// Property for display visibility. True if the badge display visible, otherwise false..
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public bool Visible{ get; set; }
 
         private bool IsNegativeNumber(int number)
index 093f40f65f81e5966223abb337e97ab1a8f20b8b..7a2e4f11f5efefa867c7ff9a437a479a888d3efb 100755 (executable)
@@ -22,6 +22,7 @@ namespace Tizen.Applications
     /// The class for badge operation.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public static class BadgeControl
     {
         private static event EventHandler<BadgeEventArgs> s_changed;
@@ -37,6 +38,7 @@ namespace Tizen.Applications
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static event EventHandler<BadgeEventArgs> Changed
         {
             add
@@ -88,6 +90,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static Badge Find(string appId)
         {
             uint count;
@@ -119,6 +122,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Remove(string appId)
         {
             BadgeError err = Interop.Badge.Remove(appId);
@@ -139,6 +143,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Remove(Badge badge)
         {
             if (badge == null)
@@ -160,6 +165,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Add(Badge badge)
         {
             if (badge == null)
@@ -195,6 +201,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Update(Badge badge)
         {
             if (badge == null)
@@ -225,6 +232,7 @@ namespace Tizen.Applications
         /// <exception cref="UnauthorizedAccessException">Thrown when an application does not have the privilege to access.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of failed conditions.</exception>
         /// <exception cref="NotSupportedException">Thrown when Badge is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static IEnumerable<Badge> GetBadges()
         {
             IList<Badge> list = new List<Badge>();
index c0b8d0ff1da78a064dd5629abfe043ca1eb9b50b..c20c0add80a55f4b3464341a11ba33fe65a2e53d 100755 (executable)
@@ -22,6 +22,7 @@ namespace Tizen.Applications
     /// The class for event arguments of the badge event.
     /// </summary>
     /// <since_tizen> 3 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class BadgeEventArgs : EventArgs
     {
         internal BadgeEventArgs()
@@ -32,6 +33,7 @@ namespace Tizen.Applications
         /// Enumeration for the badge action.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public enum Action : int
         {
             /// <summary>
@@ -54,12 +56,14 @@ namespace Tizen.Applications
         /// The property for the badge object.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public Badge Badge { get; internal set; }
 
         /// <summary>
         /// The property for the action value.
         /// </summary>
         /// <since_tizen> 3 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public Action Reason { get; internal set; }
     }
 }