-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathRomMSave.cs
More file actions
71 lines (54 loc) · 2.04 KB
/
Copy pathRomMSave.cs
File metadata and controls
71 lines (54 loc) · 2.04 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
namespace RomM.Models.RomM.Save
{
/// <summary>
/// Per-device sync state attached to a save. Returned by the server (see PR #3479) so the
/// client can tell which devices already hold a copy and which one is current.
/// </summary>
public class RomMDeviceSync
{
[JsonProperty("device_id")]
public string DeviceId { get; set; }
[JsonProperty("device_name")]
public string DeviceName { get; set; }
[JsonProperty("last_synced_at")]
public DateTime? LastSyncedAt { get; set; }
[JsonProperty("is_untracked")]
public bool IsUntracked { get; set; }
[JsonProperty("is_current")]
public bool IsCurrent { get; set; }
}
/// <summary>
/// Subset of the server's SaveSchema that the plugin needs. The server returns many more
/// fields (file paths, screenshot, tags) which we deliberately ignore.
/// </summary>
public class RomMSave
{
[JsonProperty("id")]
public int Id { get; set; }
[JsonProperty("rom_id")]
public int RomId { get; set; }
[JsonProperty("file_name")]
public string FileName { get; set; }
[JsonProperty("file_size_bytes")]
public long FileSizeBytes { get; set; }
[JsonProperty("download_path")]
public string DownloadPath { get; set; }
[JsonProperty("emulator")]
public string Emulator { get; set; }
[JsonProperty("slot")]
public string Slot { get; set; }
[JsonProperty("content_hash")]
public string ContentHash { get; set; }
[JsonProperty("origin_device_id")]
public string OriginDeviceId { get; set; }
[JsonProperty("created_at")]
public DateTime CreatedAt { get; set; }
[JsonProperty("updated_at")]
public DateTime UpdatedAt { get; set; }
[JsonProperty("device_syncs")]
public List<RomMDeviceSync> DeviceSyncs { get; set; } = new List<RomMDeviceSync>();
}
}