IScheduledTaskWorker.cs 2.0 KB

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