Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TCSACR-602][Shortcut] Deprecate Shortcut apis #6319

Merged
merged 4 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +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 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;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +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 API12. Will be removed in API14.")]
public enum ShortcutWidgetSize
{
/// <summary>
Expand Down Expand Up @@ -96,6 +99,7 @@ public enum ShortcutWidgetSize
/// <summary>
/// Enumeration for the shortcut types.
/// </summary>
[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,28 +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 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -38,6 +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 API12. Will be removed in API14.")]
public static void Add(HomeShortcutInfo shortcut)
{
Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
Expand Down Expand Up @@ -79,6 +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 API12. Will be removed in API14.")]
public static void Add(WidgetShortcutInfo shortcut)
{
Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
Expand Down Expand Up @@ -114,6 +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 API12. Will be removed in API14.")]
public static void Delete(string shortcutName)
{
Interop.Shortcut.ErrorCode err = Interop.Shortcut.ErrorCode.None;
Expand Down Expand Up @@ -149,6 +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 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,28 +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 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +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 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +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 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +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 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; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +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 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,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>
Expand All @@ -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;
Expand Down Expand Up @@ -67,6 +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 API12. Will be removed in API14.")]
public static void RegisterEventHandler(ShortcutAdded addedEvent)
{
if (shortcutAddCallback == null)
Expand Down Expand Up @@ -103,6 +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 API12. Will be removed in API14.")]
public static void RegisterEventHandler(ShortcutDeleted deletedEvent)
{
if (shortcutDeleteCallback == null)
Expand Down Expand Up @@ -134,6 +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 API12. Will be removed in API14.")]
public static void UnregisterEventHandler(ShortcutAdded addedEvent)
{
if (shortcutAdded != null && shortcutAdded.Equals(addedEvent))
Expand Down Expand Up @@ -168,6 +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 API12. Will be removed in API14.")]
public static void UnregisterEventHandler(ShortcutDeleted deletedEvent)
{
if (shortcutDeleted != null && shortcutDeleted.Equals(deletedEvent))
Expand Down Expand Up @@ -205,6 +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 API12. Will be removed in API14.")]
public static IEnumerable<ShortcutTemplate> GetTemplateList(string appId)
{
shortcutTemplates.Clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,48 @@

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; }
}
}
Loading
Loading