Skip to content

Commit

Permalink
[TCSACR-602][Shortcut] Deprecate Shortcut apis
Browse files Browse the repository at this point in the history
Signed-off-by: SukhyungKang <[email protected]>
  • Loading branch information
sukhyungkang committed Sep 11, 2024
1 parent 5d34d9f commit cc95a03
Show file tree
Hide file tree
Showing 13 changed files with 66 additions and 46 deletions.
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@

namespace Tizen.Applications.Shortcut
{
using System;

/// <summary>
/// A class that contains the shortcut information.
/// </summary>
/// <since_tizen> 4 </since_tizen>
[Obsolete("Deprecated since API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public string Uri { get; set; } = string.Empty;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

namespace Tizen.Applications.Shortcut
{
using System;

/// <summary>
/// Enumeration for the sizes of the shortcut widget.
/// </summary>
/// <since_tizen> 4 </since_tizen>
[Obsolete("Deprecated since API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public enum ShortcutWidgetSize
{
/// <summary>
Expand Down Expand Up @@ -97,7 +99,7 @@ public enum ShortcutWidgetSize
/// <summary>
/// Enumeration for the shortcut types.
/// </summary>
[Obsolete("Deprecated since API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
internal enum ShortcutType
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@

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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public bool IsAllowDuplicate { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +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 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";
Expand All @@ -39,7 +39,7 @@ public static class ShortcutManager
/// <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 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;
Expand Down Expand Up @@ -81,7 +81,7 @@ public static void Add(HomeShortcutInfo 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 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;
Expand Down Expand Up @@ -117,7 +117,7 @@ public static void Add(WidgetShortcutInfo 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 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;
Expand Down Expand Up @@ -153,7 +153,7 @@ public static void Delete(string shortcutName)
/// <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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public static void Delete(ShortcutInfo shortcut)
{
if (shortcut == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@

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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public double Period { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@

namespace Tizen.Applications.Shortcut
{
using System;

/// <summary>
/// A class that contains the shortcut information.
/// </summary>
/// <since_tizen> 4 </since_tizen>
[Obsolete("Deprecated since API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public string Uri { get; internal set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,32 +16,34 @@

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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public bool IsAllowDuplicate { get; internal set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,27 @@

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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public string ShortcutName { get; internal set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@

namespace Tizen.Applications.Shortcut
{
using System;

/// <summary>
/// Enumeration for values of the shortcut response types.
/// </summary>
/// <since_tizen> 4 </since_tizen>
[Obsolete("Deprecated since API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public enum ShortcutError
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public delegate ShortcutError ShortcutAdded(ShortcutAddedInfo args);

/// <summary>
Expand All @@ -35,14 +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 API10. Will be removed in API12.")]
[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 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;
Expand Down Expand Up @@ -70,7 +70,7 @@ public static class ShortcutEventManager
/// <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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public static void RegisterEventHandler(ShortcutAdded addedEvent)
{
if (shortcutAddCallback == null)
Expand Down Expand Up @@ -107,7 +107,7 @@ public static void RegisterEventHandler(ShortcutAdded addedEvent)
/// <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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public static void RegisterEventHandler(ShortcutDeleted deletedEvent)
{
if (shortcutDeleteCallback == null)
Expand Down Expand Up @@ -139,7 +139,7 @@ public static void RegisterEventHandler(ShortcutDeleted deletedEvent)
/// <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 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))
Expand Down Expand Up @@ -174,7 +174,7 @@ public static void UnregisterEventHandler(ShortcutAdded addedEvent)
/// <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 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))
Expand Down Expand Up @@ -212,7 +212,7 @@ public static void UnregisterEventHandler(ShortcutDeleted deletedEvent)
/// <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 API10. Will be removed in API12.")]
[Obsolete("Deprecated since API12. Will be removed in API14.")]
public static IEnumerable<ShortcutTemplate> GetTemplateList(string appId)
{
shortcutTemplates.Clear();
Expand Down
Loading

0 comments on commit cc95a03

Please sign in to comment.