IScheduledTaskWorker.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. #nullable disable
  2. using System;
  3. using System.Collections.Generic;
  4. using Jellyfin.Data.Events;
  5. namespace MediaBrowser.Model.Tasks
  6. {
  7. /// <summary>
  8. /// Interface IScheduledTaskWorker.
  9. /// </summary>
  10. public interface IScheduledTaskWorker : IDisposable
  11. {
  12. /// <summary>
  13. /// Occurs when [task progress].
  14. /// </summary>
  15. event EventHandler<GenericEventArgs<double>> TaskProgress;
  16. /// <summary>
  17. /// Gets the scheduled task.
  18. /// </summary>
  19. /// <value>The scheduled task.</value>
  20. IScheduledTask ScheduledTask { get; }
  21. /// <summary>
  22. /// Gets the last execution result.
  23. /// </summary>
  24. /// <value>The last execution result.</value>
  25. TaskResult LastExecutionResult { get; }
  26. /// <summary>
  27. /// Gets the name.
  28. /// </summary>
  29. /// <value>The name.</value>
  30. string Name { get; }
  31. /// <summary>
  32. /// Gets the description.
  33. /// </summary>
  34. /// <value>The description.</value>
  35. string Description { get; }
  36. /// <summary>
  37. /// Gets the category.
  38. /// </summary>
  39. /// <value>The category.</value>
  40. string Category { get; }
  41. /// <summary>
  42. /// Gets the state.
  43. /// </summary>
  44. /// <value>The state.</value>
  45. TaskState State { get; }
  46. /// <summary>
  47. /// Gets the current progress.
  48. /// </summary>
  49. /// <value>The current progress.</value>
  50. double? CurrentProgress { get; }
  51. /// <summary>
  52. /// Gets or sets the triggers that define when the task will run.
  53. /// </summary>
  54. /// <value>The triggers.</value>
  55. IReadOnlyList<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. }