Files
bundesmessenger-ios/Riot/Modules/Common/Recents/Service/RecentsListServiceProtocol.swift
T
Frank Rotermund 67df1a3e95 chore: FOSS Merge 1.27.11 (MESSENGER-7276)
Merge commit 'af0b6d4be985d9f26e5111d3fa01389c7321949f' into feature/7276_FOSS_Merge_1_27_11

# Conflicts:
#	Config/AppVersion.xcconfig
#	Gemfile.lock
#	IDETemplateMacros.plist
#	Podfile
#	Podfile.lock
#	README.md
#	Riot/Modules/Authentication/AuthenticationCoordinator.swift
#	Riot/Modules/Room/CellData/RoomBubbleCellData.m
#	Riot/target.yml
#	RiotNSE/NotificationService.swift
#	RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionModels.swift
#	RiotSwiftUI/Modules/Authentication/ServerSelection/AuthenticationServerSelectionViewModel.swift
#	RiotSwiftUI/Modules/Authentication/ServerSelection/Coordinator/AuthenticationServerSelectionCoordinator.swift
#	RiotSwiftUI/Modules/Authentication/ServerSelection/View/AuthenticationServerSelectionScreen.swift
#	RiotSwiftUI/Modules/Room/CompletionSuggestion/Service/CompletionSuggestionService.swift
#	fastlane/Fastfile
2025-05-16 14:06:20 +02:00

108 lines
3.0 KiB
Swift

//
// Copyright 2021-2024 New Vector Ltd.
//
// SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial
// Please see LICENSE files in the repository root for full details.
//
import Foundation
@objc
public protocol RecentsListServiceProtocol {
// MARK: - Properties
/// Current mode
var mode: RecentsDataSourceMode { get }
/// Query to filter rooms
var query: String? { get }
/// Current space
var space: MXSpace? { get }
// MARK: - Data
/// Invited rooms for current mode
var invitedRoomListData: MXRoomListData? { get }
/// Favorited rooms for current mode
var favoritedRoomListData: MXRoomListData? { get }
/// Direct rooms for current mode
var peopleRoomListData: MXRoomListData? { get }
/// Rooms for current mode
var conversationRoomListData: MXRoomListData? { get }
/// Low priority rooms for current mode
var lowPriorityRoomListData: MXRoomListData? { get }
/// Server notice rooms for current mode
var serverNoticeRoomListData: MXRoomListData? { get }
/// Suggested rooms for current mode
var suggestedRoomListData: MXRoomListData? { get }
/// Breadcrumbs
var breadcrumbsRoomListData: MXRoomListData? { get }
/// All Chats room for current mode
var allChatsRoomListData: MXRoomListData? { get }
// MARK: Discussion counts
/// Counts for favorite screen
var favoritedMissedDiscussionsCount: DiscussionsCount { get }
/// Counts for people screen
var peopleMissedDiscussionsCount: DiscussionsCount { get }
/// Counts for rooms screen
var conversationMissedDiscussionsCount: DiscussionsCount { get }
/// Total number of rooms visible in one screen. Can be used to display an empty view
var totalVisibleItemCount: Int { get }
// MARK: - Methods
/// Upte mode function
/// - Parameter mode: new mode
func updateMode(_ mode: RecentsDataSourceMode)
/// Update query to filter rooms
/// - Parameter query: new query
func updateQuery(_ query: String?)
/// Update current space
/// - Parameter space: new space
func updateSpace(_ space: MXSpace?)
/// Refresh recents
func refresh()
/// Stop service. Do not use after stopping.
func stop()
// MARK: Pagination
/// Paginate in the given section.
func paginate(inSection section: RecentsListServiceSection)
// MARK: - Delegate
/// Add delegate instance for the service
/// - Parameter delegate: new delegate
func addDelegate(_ delegate: RecentsListServiceDelegate)
/// Remove given delegate instance
/// - Parameter delegate: delegate to be removed
func removeDelegate(_ delegate: RecentsListServiceDelegate)
/// Remove all delegates
func removeAllDelegates()
// bwi: should personal notes room be shown
var shouldShowBWIPersonalNotes: Bool { get }
}