IChangesView.cs 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System.Collections.Generic;
  2. using JetBrains.Annotations;
  3. using Unity.Cloud.Collaborate.Models.Structures;
  4. using Unity.Cloud.Collaborate.Presenters;
  5. namespace Unity.Cloud.Collaborate.Views
  6. {
  7. internal interface IChangesView : IView<IChangesPresenter>
  8. {
  9. /// <summary>
  10. /// Set busy status in the view.
  11. /// </summary>
  12. /// <param name="busy">Whether or not the presenter is busy with a request.</param>
  13. void SetBusyStatus(bool busy);
  14. /// <summary>
  15. /// Set the search query in the view.
  16. /// </summary>
  17. /// <param name="query">Latest search query to set.</param>
  18. void SetSearchQuery([NotNull] string query);
  19. /// <summary>
  20. /// Set the revision summary in the view.
  21. /// </summary>
  22. /// <param name="message">Latest summary to set.</param>
  23. void SetRevisionSummary([NotNull] string message);
  24. /// <summary>
  25. /// Set the conflicts to be displayed.
  26. /// </summary>
  27. /// <param name="list">List of conflicts to display.</param>
  28. void SetConflicts([NotNull] IReadOnlyList<IChangeEntryData> list);
  29. /// <summary>
  30. /// Set the changes to be selected.
  31. /// </summary>
  32. void SetSelectedChanges();
  33. /// <summary>
  34. /// Set the changes to be displayed.
  35. /// </summary>
  36. /// <param name="list">List of changes to be displayed.</param>
  37. void SetChanges([NotNull] IReadOnlyList<IChangeEntryData> list);
  38. /// <summary>
  39. /// Set the count of toggled entries.
  40. /// </summary>
  41. /// <param name="count">Latest toggled count.</param>
  42. void SetToggledCount(int count);
  43. /// <summary>
  44. /// Enable or disable the publish button based on the provided values. The optional reason is to be used as a
  45. /// hint to users about why the functionality is blocked.
  46. /// </summary>
  47. /// <param name="enabled">Whether or not the publish is to be enabled.</param>
  48. /// <param name="reason">Reason for the publish to be disabled.</param>
  49. void SetPublishEnabled(bool enabled, [CanBeNull] string reason = null);
  50. /// <summary>
  51. /// Display a dialogue to the user.
  52. /// </summary>
  53. /// <param name="title">Title for the dialogue.</param>
  54. /// <param name="message">Message inside the dialogue.</param>
  55. /// <param name="affirmative">Affirmative button text.</param>
  56. /// <returns>True if affirmative is clicked.</returns>
  57. bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative);
  58. /// <summary>
  59. /// Display a dialogue to the user.
  60. /// </summary>
  61. /// <param name="title">Title for the dialogue.</param>
  62. /// <param name="message">Message inside the dialogue.</param>
  63. /// <param name="affirmative">Affirmative button text.</param>
  64. /// <param name="negative">Negative button text.</param>
  65. /// <returns>True if affirmative is clicked.</returns>
  66. bool DisplayDialogue([NotNull] string title, [NotNull] string message, [NotNull] string affirmative, [NotNull] string negative);
  67. }
  68. }