using ChaoXingAutoClass.Browser; using ChaoXingAutoClass.Core; namespace ChaoXingAutoClass.Interface.Services; public interface ILearningService : IAsyncDisposable, XFEExtension.NetCore.WinUIHelper.Interface.Services.IGlobalService { AppSettings Settings { get; } IReadOnlyList Courses { get; } IReadOnlyList Chapters { get; } CourseInfo? CurrentCourse { get; } LearningController? Controller { get; } IReadOnlyList Jobs { get; } int EffectiveConcurrency { get; } event Action? JobChanged; CourseJobSnapshot? GetJob(CourseInfo course); Task QueueCoursesAsync(IReadOnlyList courses, CancellationToken token); Task StartCourseAsync(CourseInfo course, int startIndex, int? chapterLimit, bool homeworkOnly, CancellationToken token, bool? includeHomework = null, IReadOnlySet? homeworkIds = null); Task RefreshCourseAsync(CourseInfo course, CancellationToken token); Task PauseOrResumeAsync(CourseInfo course); void Stop(CourseInfo course); event Action? Notice; Task InitializeAsync(CancellationToken token); Task> RefreshCoursesAsync(CancellationToken token); Task GetQrAsync(CancellationToken token); Task PollQrAsync(LoginQr qr, CancellationToken token); Task PasswordLoginAsync(string account, string password, CancellationToken token); Task OpenCourseAsync(CourseInfo course, CancellationToken token); Task StartAsync(int startIndex, int? chapterLimit, CancellationToken token); Task PauseOrResumeAsync(); void Stop(); void SaveSettings(); Task TestAgentAsync(CancellationToken token); }