// Copyright (c) Arlo Godfrey. All Rights Reserved. // Licensed under the GNU Lesser General Public License, Version 3.0 with additional terms. // See the LICENSE, LICENSE.LESSER and LICENSE.ADDITIONAL files in the project root for more information. using System; using System.Globalization; using System.Threading; using System.Threading.Tasks; namespace StrixMusic.Sdk.BaseModels { /// /// Describes a generic user profile. /// public interface IUserProfileBase : IImageCollectionBase, IAsyncDisposable { /// /// Identifier for the user /// string Id { get; } /// /// Username shown to the user or others /// string DisplayName { get; } /// /// The user's full name /// string? FullName { get; } /// /// The user's email /// string? Email { get; } /// /// The the user was born. /// /// /// If missing data, replace the day, month and/or year with part of 1/1/1970. /// DateTime? Birthdate { get; } /// /// The user's country or region of origin. /// CultureInfo Region { get; } /// /// If true, is supported. /// bool IsChangeDisplayNameAvailable { get; } /// /// If true, is supported. /// bool IsChangeBirthDateAsyncAvailable { get; } /// /// If true, is supported. /// bool IsChangeFullNameAsyncAsyncAvailable { get; } /// /// If true, is supported. /// bool IsChangeRegionAsyncAvailable { get; } /// /// If true, is supported. /// bool IsChangeEmailAsyncAvailable { get; } /// /// Changes the for this user. /// /// The new display name. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task ChangeDisplayNameAsync(string displayName, CancellationToken cancellationToken = default); /// /// Changes the for this user. /// /// The new birthdate. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task ChangeBirthDateAsync(DateTime birthdate, CancellationToken cancellationToken = default); /// /// Changes the for this user. /// /// The full name. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task ChangeFullNameAsync(string fullname, CancellationToken cancellationToken = default); /// /// Changes the for this user. /// /// The new region. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task ChangeRegionAsync(CultureInfo region, CancellationToken cancellationToken = default); /// /// Changes the for this user. /// /// The new email. /// A cancellation token that may be used to cancel the ongoing task. /// A representing the asynchronous operation. Task ChangeEmailAsync(string? email, CancellationToken cancellationToken = default); /// /// Fires when the has changed. /// event EventHandler? DisplayNameChanged; /// /// Fires when the has changed. /// event EventHandler? BirthDateChanged; /// /// Fires when the has changed. /// event EventHandler? FullNameChanged; /// /// Fires when the has changed. /// event EventHandler? RegionChanged; /// /// Fires when the has changed. /// event EventHandler? EmailChanged; } }