2020-04-15 19:28:42 +00:00
|
|
|
using System;
|
|
|
|
|
|
|
|
namespace MediaBrowser.Model.QuickConnect
|
|
|
|
{
|
|
|
|
/// <summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
/// Stores the state of an quick connect request.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
|
|
|
public class QuickConnectResult
|
|
|
|
{
|
|
|
|
/// <summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
/// Initializes a new instance of the <see cref="QuickConnectResult"/> class.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
/// <param name="secret">The secret used to query the request state.</param>
|
|
|
|
/// <param name="code">The code used to allow the request.</param>
|
|
|
|
/// <param name="dateAdded">The time when the request was created.</param>
|
2021-06-24 03:07:08 +00:00
|
|
|
/// <param name="deviceId">The requesting device id.</param>
|
|
|
|
/// <param name="deviceName">The requesting device name.</param>
|
|
|
|
/// <param name="appName">The requesting app name.</param>
|
|
|
|
/// <param name="appVersion">The requesting app version.</param>
|
|
|
|
public QuickConnectResult(
|
|
|
|
string secret,
|
|
|
|
string code,
|
|
|
|
DateTime dateAdded,
|
|
|
|
string deviceId,
|
|
|
|
string deviceName,
|
|
|
|
string appName,
|
|
|
|
string appVersion)
|
2021-06-18 17:31:47 +00:00
|
|
|
{
|
|
|
|
Secret = secret;
|
|
|
|
Code = code;
|
|
|
|
DateAdded = dateAdded;
|
2021-06-24 03:07:08 +00:00
|
|
|
DeviceId = deviceId;
|
|
|
|
DeviceName = deviceName;
|
|
|
|
AppName = appName;
|
|
|
|
AppVersion = appVersion;
|
2021-06-18 17:31:47 +00:00
|
|
|
}
|
2020-04-15 19:28:42 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2021-06-24 03:07:08 +00:00
|
|
|
/// Gets or sets a value indicating whether this request is authorized.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
2021-06-24 03:07:08 +00:00
|
|
|
public bool Authenticated { get; set; }
|
2020-04-15 19:28:42 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
/// Gets the secret value used to uniquely identify this request. Can be used to retrieve authentication information.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
public string Secret { get; }
|
2020-04-15 19:28:42 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
/// Gets the user facing code used so the user can quickly differentiate this request from others.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
public string Code { get; }
|
2020-04-15 19:28:42 +00:00
|
|
|
|
|
|
|
/// <summary>
|
2021-06-24 03:07:08 +00:00
|
|
|
/// Gets the requesting device id.
|
2020-04-15 19:28:42 +00:00
|
|
|
/// </summary>
|
2021-06-24 03:07:08 +00:00
|
|
|
public string DeviceId { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the requesting device name.
|
|
|
|
/// </summary>
|
|
|
|
public string DeviceName { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the requesting app name.
|
|
|
|
/// </summary>
|
|
|
|
public string AppName { get; }
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the requesting app version.
|
|
|
|
/// </summary>
|
|
|
|
public string AppVersion { get; }
|
2020-04-15 19:28:42 +00:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets or sets the DateTime that this request was created.
|
|
|
|
/// </summary>
|
2021-06-18 17:31:47 +00:00
|
|
|
public DateTime DateAdded { get; set; }
|
2020-04-15 19:28:42 +00:00
|
|
|
}
|
|
|
|
}
|