[TCSACR-602][Shortcut] Deprecate Shortcut apis (#6319)
authorsukhyungkang <35091460+sukhyungkang@users.noreply.github.com>
Thu, 26 Sep 2024 06:09:18 +0000 (15:09 +0900)
committerGitHub <noreply@github.com>
Thu, 26 Sep 2024 06:09:18 +0000 (15:09 +0900)
* Deprecate shortcut API

Signed-off-by: SukhyungKang <shine.kang@samsung.com>
* [TCSACR-602][Shortcut] Deprecate Shortcut apis

Signed-off-by: SukhyungKang <shine.kang@samsung.com>
---------

Signed-off-by: SukhyungKang <shine.kang@samsung.com>
13 files changed:
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj [changed mode: 0644->0755]
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs
src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs

index 5a344c372baca9f14098ab9516368cf6ae02dd65..c4e52328b5ec184baac33bf67bef025d58a5ca2f 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class that contains the shortcut information.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class HomeShortcutInfo : ShortcutInfo
     {
         /// <summary>
         /// Gets or sets the specific information delivered to the viewer for creating a shortcut.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string Uri { get; set; } = string.Empty;
     }
 }
\ No newline at end of file
index e735cfd182773e20f94e27abc1816a30270d34fa..0fd5adfb4311e609b458335ba85c5ab40e4352c5 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// Enumeration for the sizes of the shortcut widget.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public enum ShortcutWidgetSize
     {
         /// <summary>
@@ -96,6 +99,7 @@ namespace Tizen.Applications.Shortcut
     /// <summary>
     /// Enumeration for the shortcut types.
     /// </summary>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     internal enum ShortcutType
     {
         /// <summary>
index 5d95b2f4b879abdb540e05f22490d663d67aa49a..3351c2224f1735f1c275d0b9564c706e09f10621 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class to get the information of the shortcut.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class ShortcutInfo
     {
         /// <summary>
         /// Gets or sets the name of the created shortcut icon.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ShortcutName { get; set; } = string.Empty;
 
         /// <summary>
         /// Gets or sets the absolute path of an icon file for this shortcut.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string IconPath { get; set; } = string.Empty;
 
         /// <summary>
         /// Gets or sets a value indicating whether to allow or not allow duplication.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public bool IsAllowDuplicate { get; set; }
     }
 }
\ No newline at end of file
index 5d3fd7ba0ac851a95fb50a708004fa8c66a2a16d..f2be8aa5338eeee00d723999fb989fadc3d639f0 100755 (executable)
@@ -22,6 +22,7 @@ namespace Tizen.Applications.Shortcut
     /// This class provides some functions to add or delete a shortcut.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public static class ShortcutManager
     {
         private const string LogTag = "Tizen.Applications.Shortcut";
@@ -38,6 +39,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Add(HomeShortcutInfo shortcut)
         {
             Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
@@ -79,6 +81,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Add(WidgetShortcutInfo shortcut)
         {
             Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
@@ -114,6 +117,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Delete(string shortcutName)
         {
             Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
@@ -149,6 +153,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void Delete(ShortcutInfo shortcut)
         {
             if (shortcut == null)
index 1e0d6052574a964134ae78ca1a0d60f4873d4418..549944844ea38da381d8f39861267c1c0eac4e91 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class that contains the information about the widget.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class WidgetShortcutInfo : ShortcutInfo
     {
         /// <summary>
         /// Gets or sets the widget ID.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string WidgetId { get; set; } = string.Empty;
 
         /// <summary>
         /// Gets or sets the size of the widget.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public ShortcutWidgetSize WidgetSize { get; set; }
 
         /// <summary>
         /// Gets or sets the update period in seconds.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public double Period { get; set; }
     }
 }
\ No newline at end of file
index df1fe96c8465150ac504de1ca7847bb7b35b74c7..0e41bd067a80da02810e708973cebd7b87396403 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class that contains the shortcut information.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class HomeShortcutAddedInfo : ShortcutAddedInfo
     {
         /// <summary>
         /// Gets the name of the application.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string AppId { get; internal set; }
 
         /// <summary>
         /// Gets the specific information for creating a new shortcut.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string Uri { get; internal set; }
     }
 }
\ No newline at end of file
index 6eced613f5a2ecbae3d5db7710c79004df2be398..63955c6c8819ca5c8149a6a4f0c91540f7a1109a 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class for getting the information of the shortcut.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class ShortcutAddedInfo
     {
         /// <summary>
         /// Gets the name of the created shortcut icon.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ShortcutName { get; internal set; }
 
         /// <summary>
         /// Gets the absolute path of an icon file for this shortcut.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string IconPath { get; internal set; }
 
         /// <summary>
         /// Gets a value indicating whether to allow or not to allow duplication.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public bool IsAllowDuplicate { get; internal set; }
     }
 }
\ No newline at end of file
index dec0ec750d7d2873afe7ee32c2d805ceeab5c8f6..aa4ddb675c8707b58edab15115ba6501ec652785 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class for getting the information of the shortcut.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class ShortcutDeletedInfo
     {
         /// <summary>
         /// Gets the name of the package.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string AppId { get; internal set; }
 
         /// <summary>
         /// Gets the name of the created shortcut icon.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ShortcutName { get; internal set; }
     }
 }
\ No newline at end of file
index 34d72ef7497d4c1768f6bcc47fd1f8373cb27ecc..a0a18eb32d24b54683bc91d26b2a0018eb7a3276 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// Enumeration for values of the shortcut response types.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public enum ShortcutError
     {
         /// <summary>
index 7e6c57a16a7c9b8cb1a06f35c2117e137f0589d3..7e3e16dfb402b05c2002218b183a79552572534a 100755 (executable)
@@ -26,6 +26,7 @@ namespace Tizen.Applications.Shortcut
     /// <param name="args">Object that contains the shortcut information to add.</param>
     /// <returns>The result of handling a shortcut add request.</returns>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public delegate ShortcutError ShortcutAdded(ShortcutAddedInfo args);
 
     /// <summary>
@@ -34,12 +35,14 @@ namespace Tizen.Applications.Shortcut
     /// <param name="args">Object that contains the shortcut information to delete.</param>
     /// <returns>The result of handling a shortcut delete request.</returns>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public delegate ShortcutError ShortcutDeleted(ShortcutDeletedInfo args);
 
     /// <summary>
     /// This class provides a way to register the callback function for the shortcut add and delete events.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public static class ShortcutEventManager
     {
         private static Interop.Shortcut.AddCallback shortcutAddCallback;
@@ -67,6 +70,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void RegisterEventHandler(ShortcutAdded addedEvent)
         {
             if (shortcutAddCallback == null)
@@ -103,6 +107,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void RegisterEventHandler(ShortcutDeleted deletedEvent)
         {
             if (shortcutDeleteCallback == null)
@@ -134,6 +139,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="ArgumentException">Thrown when an argument is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case the permission is denied.</exception>
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void UnregisterEventHandler(ShortcutAdded addedEvent)
         {
             if (shortcutAdded != null && shortcutAdded.Equals(addedEvent))
@@ -168,6 +174,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="ArgumentException">Thrown when an argument is invalid.</exception>
         /// <exception cref="UnauthorizedAccessException">Thrown in case the permission is denied.</exception>
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static void UnregisterEventHandler(ShortcutDeleted deletedEvent)
         {
             if (shortcutDeleted != null && shortcutDeleted.Equals(deletedEvent))
@@ -205,6 +212,7 @@ namespace Tizen.Applications.Shortcut
         /// <exception cref="NotSupportedException">Thrown when the shortcut is not supported.</exception>
         /// <exception cref="OutOfMemoryException">Thrown in case of out of memory.</exception>
         /// <exception cref="InvalidOperationException">Thrown in case of any internal error.</exception>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public static IEnumerable<ShortcutTemplate> GetTemplateList(string appId)
         {
             shortcutTemplates.Clear();
index 0645e1457beb2c4fec5f9b622d59d032eb68c80d..1b073d33e8485884194440ce1e0ef96f8a5bf92b 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class that contains the preset list of the shortcut template from the installed package.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class ShortcutTemplate
     {
         /// <summary>
         /// Gets the application ID.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string AppId { get; internal set; }
 
         /// <summary>
         /// Gets the name of the created shortcut icon.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ShortcutName { get; internal set; }
 
         /// <summary>
         /// Gets the absolute path of an icon file for this shortcut.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string IconPath { get; internal set; }
 
         /// <summary>
         /// Gets the user data. A property of the shortcut element in the manifest file.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ExtraKey { get; internal set; }
 
         /// <summary>
         /// Gets the user data. A property of the shortcut element in the manifest file.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string ExtraData { get; internal set; }
     }
 }
\ No newline at end of file
index 39892e72178d99f2fc3316ec3d2e92bd604904c2..06e58fb28a8b512d55d3663b753707c775b8dc6e 100755 (executable)
 
 namespace Tizen.Applications.Shortcut
 {
+    using System;
+
     /// <summary>
     /// A class that contains the information about the widget.
     /// </summary>
     /// <since_tizen> 4 </since_tizen>
+    [Obsolete("Deprecated since API12. Will be removed in API14.")]
     public class WidgetShortcutAddedInfo : ShortcutAddedInfo
     {
         /// <summary>
         /// Gets the widget ID.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public string WidgetId { get; internal set; }
 
         /// <summary>
         /// Gets the size of the widget.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public ShortcutWidgetSize WidgetSize { get; internal set; }
 
         /// <summary>
         /// Gets the update period in seconds.
         /// </summary>
         /// <since_tizen> 4 </since_tizen>
+        [Obsolete("Deprecated since API12. Will be removed in API14.")]
         public double Period { get; internal set; }
     }
 }
\ No newline at end of file