Refactor next() -> nextBatch()

This commit is contained in:
Alfonso Grillo
2023-01-24 10:46:38 +01:00
parent 7a5a5f4c93
commit 865f2c5245
5 changed files with 13 additions and 13 deletions
@@ -1,4 +1,4 @@
//
//
// Copyright 2023 New Vector Ltd
//
// Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,13 +18,13 @@ import Combine
protocol PollHistoryServiceProtocol {
/// Returns a Publisher publishing the polls in the next batch.
/// Implementations should return the same publisher if `next()` is called again before the previous publisher completes.
func next() -> AnyPublisher<TimelinePollDetails, Error>
/// Implementations should return the same publisher if `nextBatch()` is called again before the previous publisher completes.
func nextBatch() -> AnyPublisher<TimelinePollDetails, Error>
/// Publishes updates for the polls previously pusblished by the `next()` publishers.
/// Publishes updates for the polls previously pusblished by the `nextBatch()` publishers.
var updates: AnyPublisher<TimelinePollDetails, Never> { get }
/// Publishes errors regarding poll aggregations.
/// Note: `next()` will continue to publish new polls even if some poll isn't being aggregated correctly.
/// Note: `nextBatch()` will continue to publish new polls even if some poll isn't being aggregated correctly.
var pollErrors: AnyPublisher<Error, Never> { get }
}