using System;
using System.Threading.Tasks;
using Timeline.Helpers.Cache;
using Timeline.Models;
using Timeline.Services.Imaging;
namespace Timeline.Services.User.Avatar
{
    public interface IUserAvatarService
    {
        /// 
        /// Get avatar digest of a user.
        /// 
        /// User id.
        /// The avatar digest.
        /// Thrown when user does not exist.
        Task GetAvatarDigestAsync(long userId);
        /// 
        /// Get avatar of a user. If the user has no avatar set, a default one is returned.
        /// 
        /// User id.
        /// The avatar.
        /// Thrown when user does not exist.
        Task GetAvatarAsync(long userId);
        /// 
        /// Set avatar for a user.
        /// 
        /// User id.
        /// The new avatar data.
        /// The digest of the avatar.
        /// Thrown if  is null.
        /// Thrown when user does not exist.
        /// Thrown if avatar is of bad format.
        Task SetAvatarAsync(long userId, ByteData avatar);
        /// 
        /// Remove avatar of a user.
        /// 
        /// User id.
        /// Thrown when user does not exist.
        Task DeleteAvatarAsync(long userId);
    }
}