IDevice.cs 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. using MediaBrowser.Model.Devices;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Threading;
  5. using System.Threading.Tasks;
  6. namespace MediaBrowser.Model.ApiClient
  7. {
  8. public interface IDevice
  9. {
  10. /// <summary>
  11. /// Occurs when [resume from sleep].
  12. /// </summary>
  13. event EventHandler<EventArgs> ResumeFromSleep;
  14. /// <summary>
  15. /// Gets the name of the device.
  16. /// </summary>
  17. /// <value>The name of the device.</value>
  18. string DeviceName { get; }
  19. /// <summary>
  20. /// Gets the device identifier.
  21. /// </summary>
  22. /// <value>The device identifier.</value>
  23. string DeviceId { get; }
  24. /// <summary>
  25. /// Gets the local images.
  26. /// </summary>
  27. /// <returns>IEnumerable&lt;LocalFileInfo&gt;.</returns>
  28. Task<IEnumerable<LocalFileInfo>> GetLocalPhotos();
  29. /// <summary>
  30. /// Gets the local videos.
  31. /// </summary>
  32. /// <returns>IEnumerable&lt;LocalFileInfo&gt;.</returns>
  33. Task<IEnumerable<LocalFileInfo>> GetLocalVideos();
  34. /// <summary>
  35. /// Uploads the file.
  36. /// </summary>
  37. /// <param name="file">The file.</param>
  38. /// <param name="apiClient">The API client.</param>
  39. /// <param name="cancellationToken">The cancellation token.</param>
  40. /// <returns>Task.</returns>
  41. Task UploadFile(LocalFileInfo file, IApiClient apiClient, CancellationToken cancellationToken);
  42. }
  43. }