IScheduledTaskWorker.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #nullable disable
  2. using System;
  3. using Jellyfin.Data.Events;
  4. namespace MediaBrowser.Model.Tasks
  5. {
  6. /// <summary>
  7. /// Interface IScheduledTaskWorker.
  8. /// </summary>
  9. public interface IScheduledTaskWorker : IDisposable
  10. {
  11. /// <summary>
  12. /// Occurs when [task progress].
  13. /// </summary>
  14. event EventHandler<GenericEventArgs<double>> TaskProgress;
  15. /// <summary>
  16. /// Gets or sets the scheduled task.
  17. /// </summary>
  18. /// <value>The scheduled task.</value>
  19. IScheduledTask ScheduledTask { get; }
  20. /// <summary>
  21. /// Gets the last execution result.
  22. /// </summary>
  23. /// <value>The last execution result.</value>
  24. TaskResult LastExecutionResult { get; }
  25. /// <summary>
  26. /// Gets the name.
  27. /// </summary>
  28. /// <value>The name.</value>
  29. string Name { get; }
  30. /// <summary>
  31. /// Gets the description.
  32. /// </summary>
  33. /// <value>The description.</value>
  34. string Description { get; }
  35. /// <summary>
  36. /// Gets the category.
  37. /// </summary>
  38. /// <value>The category.</value>
  39. string Category { get; }
  40. /// <summary>
  41. /// Gets the state.
  42. /// </summary>
  43. /// <value>The state.</value>
  44. TaskState State { get; }
  45. /// <summary>
  46. /// Gets the current progress.
  47. /// </summary>
  48. /// <value>The current progress.</value>
  49. double? CurrentProgress { get; }
  50. /// <summary>
  51. /// Gets the triggers that define when the task will run.
  52. /// </summary>
  53. /// <value>The triggers.</value>
  54. /// <exception cref="ArgumentNullException">value</exception>
  55. TaskTriggerInfo[] Triggers { get; set; }
  56. /// <summary>
  57. /// Gets the unique id.
  58. /// </summary>
  59. /// <value>The unique id.</value>
  60. string Id { get; }
  61. /// <summary>
  62. /// Reloads the trigger events.
  63. /// </summary>
  64. void ReloadTriggerEvents();
  65. }
  66. }