using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using ZB.MOM.WW.CBDDC.Core.Network;
namespace ZB.MOM.WW.CBDDC.Core.Management;
///
/// Service for managing remote peer configurations.
/// Provides CRUD operations for adding, removing, enabling/disabling remote cloud nodes.
///
public interface IPeerManagementService
{
///
/// Adds a static remote peer with simple authentication.
///
/// Unique identifier for the remote peer.
/// Network address (hostname:port) of the remote peer.
/// Cancellation token.
Task AddStaticPeerAsync(string nodeId, string address, CancellationToken cancellationToken = default);
///
/// Removes a remote peer configuration.
///
/// Unique identifier of the peer to remove.
/// Cancellation token.
Task RemoveRemotePeerAsync(string nodeId, CancellationToken cancellationToken = default);
///
/// Removes confirmation tracking for a peer and optionally removes static remote configuration.
///
/// Unique identifier of the peer to untrack.
/// When true, also removes static remote peer configuration.
/// Cancellation token.
Task RemovePeerTrackingAsync(
string nodeId,
bool removeRemoteConfig = true,
CancellationToken cancellationToken = default);
///
/// Retrieves all configured remote peers.
///
/// Cancellation token.
/// Collection of remote peer configurations.
Task> GetAllRemotePeersAsync(CancellationToken cancellationToken = default);
///
/// Enables synchronization with a remote peer.
///
/// Unique identifier of the peer to enable.
/// Cancellation token.
Task EnablePeerAsync(string nodeId, CancellationToken cancellationToken = default);
///
/// Disables synchronization with a remote peer (keeps configuration).
///
/// Unique identifier of the peer to disable.
/// Cancellation token.
Task DisablePeerAsync(string nodeId, CancellationToken cancellationToken = default);
}