QuickConnectResult.cs 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. using System;
  2. namespace MediaBrowser.Model.QuickConnect
  3. {
  4. /// <summary>
  5. /// Stores the state of an quick connect request.
  6. /// </summary>
  7. public class QuickConnectResult
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="QuickConnectResult"/> class.
  11. /// </summary>
  12. /// <param name="secret">The secret used to query the request state.</param>
  13. /// <param name="code">The code used to allow the request.</param>
  14. /// <param name="dateAdded">The time when the request was created.</param>
  15. /// <param name="deviceId">The requesting device id.</param>
  16. /// <param name="deviceName">The requesting device name.</param>
  17. /// <param name="appName">The requesting app name.</param>
  18. /// <param name="appVersion">The requesting app version.</param>
  19. public QuickConnectResult(
  20. string secret,
  21. string code,
  22. DateTime dateAdded,
  23. string deviceId,
  24. string deviceName,
  25. string appName,
  26. string appVersion)
  27. {
  28. Secret = secret;
  29. Code = code;
  30. DateAdded = dateAdded;
  31. DeviceId = deviceId;
  32. DeviceName = deviceName;
  33. AppName = appName;
  34. AppVersion = appVersion;
  35. }
  36. /// <summary>
  37. /// Gets or sets a value indicating whether this request is authorized.
  38. /// </summary>
  39. public bool Authenticated { get; set; }
  40. /// <summary>
  41. /// Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
  42. /// </summary>
  43. public string Secret { get; }
  44. /// <summary>
  45. /// Gets the user facing code used so the user can quickly differentiate this request from others.
  46. /// </summary>
  47. public string Code { get; }
  48. /// <summary>
  49. /// Gets the requesting device id.
  50. /// </summary>
  51. public string DeviceId { get; }
  52. /// <summary>
  53. /// Gets the requesting device name.
  54. /// </summary>
  55. public string DeviceName { get; }
  56. /// <summary>
  57. /// Gets the requesting app name.
  58. /// </summary>
  59. public string AppName { get; }
  60. /// <summary>
  61. /// Gets the requesting app version.
  62. /// </summary>
  63. public string AppVersion { get; }
  64. /// <summary>
  65. /// Gets or sets the DateTime that this request was created.
  66. /// </summary>
  67. public DateTime DateAdded { get; set; }
  68. }
  69. }