blob: c45583138295f8f34ab8aa74a904a94b9115dffb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
using System;
using System.Threading.Tasks;
using DevHive.Services.Models.ProfilePicture;
namespace DevHive.Services.Interfaces
{
public interface IProfilePictureService
{
/// <summary>
/// Inserts a user's profile picture in the database and cloud
/// </summary>
/// <param name="profilePictureServiceModel">User's Guid and his/hers profile picture as file</param>
/// <returns>The new profile picture's URL in the cloud</returns>
Task<string> InsertProfilePicture(ProfilePictureServiceModel profilePictureServiceModel);
/// <summary>
/// Get a profile picture by it's Guid
/// </summary>
/// <param name="id">Profile picture's Guid</param>
/// <returns>The profile picture's URL in the cloud</returns>
Task<string> GetProfilePictureById(Guid id);
/// <summary>
/// Uploads the given picture and assigns it's link to the user in the database
/// </summary>
/// <param name="profilePictureServiceModel">Contains User's Guid and the new picture to be updated</param>
/// <returns>The new profile picture's URL in the cloud</returns>
Task<string> UpdateProfilePicture(ProfilePictureServiceModel profilePictureServiceModel);
/// <summary>
/// Delete a profile picture from the cloud and the database
/// </summary>
/// <param name="id">The profile picture's Guid</param>
/// <returns>True if the picture is deleted, false otherwise</returns>
Task<bool> DeleteProfilePicture(Guid id);
}
}
|