From cc95a030be3fdccb23bcb71fb8b3f5459bb1454f Mon Sep 17 00:00:00 2001 From: SukhyungKang Date: Wed, 11 Sep 2024 09:00:15 +0900 Subject: [PATCH] [TCSACR-602][Shortcut] Deprecate Shortcut apis Signed-off-by: SukhyungKang --- .../Tizen.Applications.Shortcut.csproj | 0 .../HomeShortcutInfo.cs | 6 ++++-- .../ShortcutEnumerations.cs | 6 ++++-- .../Tizen.Applications.Shortcut/ShortcutInfo.cs | 10 ++++++---- .../ShortcutManager.cs | 10 +++++----- .../WidgetShortcutInfo.cs | 10 ++++++---- .../HomeShortcutAddedInfo.cs | 8 +++++--- .../ShortcutAddedInfo.cs | 10 ++++++---- .../ShortcutDeletedInfo.cs | 8 +++++--- .../ShortcutEventEnumerations.cs | 4 +++- .../ShortcutEventManager.cs | 16 ++++++++-------- .../ShortcutTemplate.cs | 14 ++++++++------ .../WidgetShortcutAddedInfo.cs | 10 ++++++---- 13 files changed, 66 insertions(+), 46 deletions(-) mode change 100644 => 100755 src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut.csproj old mode 100644 new mode 100755 diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs index 901cb7adbbb..c4e52328b5e 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/HomeShortcutInfo.cs @@ -16,18 +16,20 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the shortcut information. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class HomeShortcutInfo : ShortcutInfo { /// /// Gets or sets the specific information delivered to the viewer for creating a shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string Uri { get; set; } = string.Empty; } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs index 63e41d70709..0fd5adfb431 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutEnumerations.cs @@ -16,11 +16,13 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// Enumeration for the sizes of the shortcut widget. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public enum ShortcutWidgetSize { /// @@ -97,7 +99,7 @@ public enum ShortcutWidgetSize /// /// Enumeration for the shortcut types. /// - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] internal enum ShortcutType { /// diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs index 5f6c67f48a5..3351c2224f1 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutInfo.cs @@ -16,32 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class to get the information of the shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutInfo { /// /// Gets or sets the name of the created shortcut icon. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; set; } = string.Empty; /// /// Gets or sets the absolute path of an icon file for this shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; set; } = string.Empty; /// /// Gets or sets a value indicating whether to allow or not allow duplication. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public bool IsAllowDuplicate { get; set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs index a999fec5c45..f2be8aa5338 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/ShortcutManager.cs @@ -22,7 +22,7 @@ namespace Tizen.Applications.Shortcut /// This class provides some functions to add or delete a shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static class ShortcutManager { private const string LogTag = "Tizen.Applications.Shortcut"; @@ -39,7 +39,7 @@ public static class ShortcutManager /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Add(HomeShortcutInfo shortcut) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -81,7 +81,7 @@ public static void Add(HomeShortcutInfo shortcut) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Add(WidgetShortcutInfo shortcut) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -117,7 +117,7 @@ public static void Add(WidgetShortcutInfo shortcut) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Delete(string shortcutName) { Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None; @@ -153,7 +153,7 @@ public static void Delete(string shortcutName) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void Delete(ShortcutInfo shortcut) { if (shortcut == null) diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs index bddf0835ea6..549944844ea 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.Shortcut/WidgetShortcutInfo.cs @@ -16,32 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the information about the widget. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class WidgetShortcutInfo : ShortcutInfo { /// /// Gets or sets the widget ID. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string WidgetId { get; set; } = string.Empty; /// /// Gets or sets the size of the widget. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public ShortcutWidgetSize WidgetSize { get; set; } /// /// Gets or sets the update period in seconds. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public double Period { get; set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs index 675036b50d2..0e41bd067a8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/HomeShortcutAddedInfo.cs @@ -16,25 +16,27 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the shortcut information. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class HomeShortcutAddedInfo : ShortcutAddedInfo { /// /// Gets the name of the application. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the specific information for creating a new shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string Uri { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs index 22c287a68e6..63955c6c881 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutAddedInfo.cs @@ -16,32 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class for getting the information of the shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutAddedInfo { /// /// Gets the name of the created shortcut icon. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } /// /// Gets the absolute path of an icon file for this shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; internal set; } /// /// Gets a value indicating whether to allow or not to allow duplication. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public bool IsAllowDuplicate { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs index f73abc20400..aa4ddb675c8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutDeletedInfo.cs @@ -16,25 +16,27 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class for getting the information of the shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutDeletedInfo { /// /// Gets the name of the package. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the name of the created shortcut icon. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs index b1cd87635ce..a0a18eb32d2 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventEnumerations.cs @@ -16,11 +16,13 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// Enumeration for values of the shortcut response types. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public enum ShortcutError { /// diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs index a75eee20963..7e3e16dfb40 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutEventManager.cs @@ -26,7 +26,7 @@ namespace Tizen.Applications.Shortcut /// Object that contains the shortcut information to add. /// The result of handling a shortcut add request. /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public delegate ShortcutError ShortcutAdded(ShortcutAddedInfo args); /// @@ -35,14 +35,14 @@ namespace Tizen.Applications.Shortcut /// Object that contains the shortcut information to delete. /// The result of handling a shortcut delete request. /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public delegate ShortcutError ShortcutDeleted(ShortcutDeletedInfo args); /// /// This class provides a way to register the callback function for the shortcut add and delete events. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static class ShortcutEventManager { private static Interop.Shortcut.AddCallback shortcutAddCallback; @@ -70,7 +70,7 @@ public static class ShortcutEventManager /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void RegisterEventHandler(ShortcutAdded addedEvent) { if (shortcutAddCallback == null) @@ -107,7 +107,7 @@ public static void RegisterEventHandler(ShortcutAdded addedEvent) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void RegisterEventHandler(ShortcutDeleted deletedEvent) { if (shortcutDeleteCallback == null) @@ -139,7 +139,7 @@ public static void RegisterEventHandler(ShortcutDeleted deletedEvent) /// Thrown when an argument is invalid. /// Thrown in case the permission is denied. /// Thrown when the shortcut is not supported. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void UnregisterEventHandler(ShortcutAdded addedEvent) { if (shortcutAdded != null && shortcutAdded.Equals(addedEvent)) @@ -174,7 +174,7 @@ public static void UnregisterEventHandler(ShortcutAdded addedEvent) /// Thrown when an argument is invalid. /// Thrown in case the permission is denied. /// Thrown when the shortcut is not supported. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static void UnregisterEventHandler(ShortcutDeleted deletedEvent) { if (shortcutDeleted != null && shortcutDeleted.Equals(deletedEvent)) @@ -212,7 +212,7 @@ public static void UnregisterEventHandler(ShortcutDeleted deletedEvent) /// Thrown when the shortcut is not supported. /// Thrown in case of out of memory. /// Thrown in case of any internal error. - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public static IEnumerable GetTemplateList(string appId) { shortcutTemplates.Clear(); diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs index 555a9ca8544..1b073d33e84 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/ShortcutTemplate.cs @@ -16,46 +16,48 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the preset list of the shortcut template from the installed package. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class ShortcutTemplate { /// /// Gets the application ID. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string AppId { get; internal set; } /// /// Gets the name of the created shortcut icon. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ShortcutName { get; internal set; } /// /// Gets the absolute path of an icon file for this shortcut. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string IconPath { get; internal set; } /// /// Gets the user data. A property of the shortcut element in the manifest file. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ExtraKey { get; internal set; } /// /// Gets the user data. A property of the shortcut element in the manifest file. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string ExtraData { get; internal set; } } } \ No newline at end of file diff --git a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs index cbb3876eff3..06e58fb28a8 100755 --- a/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs +++ b/src/Tizen.Applications.Shortcut/Tizen.Applications.ShortcutEvent/WidgetShortcutAddedInfo.cs @@ -16,32 +16,34 @@ namespace Tizen.Applications.Shortcut { + using System; + /// /// A class that contains the information about the widget. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public class WidgetShortcutAddedInfo : ShortcutAddedInfo { /// /// Gets the widget ID. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public string WidgetId { get; internal set; } /// /// Gets the size of the widget. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public ShortcutWidgetSize WidgetSize { get; internal set; } /// /// Gets the update period in seconds. /// /// 4 - [Obsolete("Deprecated since API10. Will be removed in API12.")] + [Obsolete("Deprecated since API12. Will be removed in API14.")] public double Period { get; internal set; } } } \ No newline at end of file