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