Synchronize saves
This commit is contained in:
@@ -13,15 +13,23 @@ namespace OpenSaveCloudClient.Models
|
||||
private readonly int max;
|
||||
private int progress;
|
||||
private AsyncTaskStatus status;
|
||||
private readonly string uuid;
|
||||
private bool undefined;
|
||||
|
||||
public string Label { get { return label; } }
|
||||
public int Max { get { return max; } }
|
||||
public int Progress { get { return progress; } set { progress = value; } }
|
||||
public AsyncTaskStatus Status { get { return status; } set { status = value; } }
|
||||
|
||||
public AsyncTaskInformation(string label, int max)
|
||||
public bool Undefined { get { return undefined; } set { undefined = value; } }
|
||||
|
||||
public string Uuid { get { return uuid; } }
|
||||
|
||||
public AsyncTaskInformation(string uuid, string label, bool undefined, int max)
|
||||
{
|
||||
this.uuid = uuid;
|
||||
this.label = label;
|
||||
this.undefined = undefined;
|
||||
this.max = max;
|
||||
this.progress = 0;
|
||||
status = AsyncTaskStatus.Running;
|
||||
|
||||
22
OpenSaveCloudClient/Models/Log.cs
Normal file
22
OpenSaveCloudClient/Models/Log.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models
|
||||
{
|
||||
public enum LogSeverity
|
||||
{
|
||||
Error,
|
||||
Warning,
|
||||
Information
|
||||
}
|
||||
|
||||
public class Log
|
||||
{
|
||||
|
||||
public string Message { get; set; }
|
||||
public LogSeverity Severity { get; set; }
|
||||
}
|
||||
}
|
||||
32
OpenSaveCloudClient/Models/Remote/Game.cs
Normal file
32
OpenSaveCloudClient/Models/Remote/Game.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models.Remote
|
||||
{
|
||||
public class Game
|
||||
{
|
||||
|
||||
[JsonPropertyName("id")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[JsonPropertyName("revision")]
|
||||
public int Revision { get; set; }
|
||||
|
||||
[JsonPropertyName("hash")]
|
||||
public string Hash { get; set; }
|
||||
|
||||
[JsonPropertyName("last_update")]
|
||||
public string LastUpdate { get; set; }
|
||||
|
||||
[JsonPropertyName("available")]
|
||||
public bool Available { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
18
OpenSaveCloudClient/Models/Remote/GameUploadToken.cs
Normal file
18
OpenSaveCloudClient/Models/Remote/GameUploadToken.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models.Remote
|
||||
{
|
||||
public class GameUploadToken
|
||||
{
|
||||
[JsonPropertyName("upload_token")]
|
||||
public string UploadToken { get; set; }
|
||||
[JsonPropertyName("expire")]
|
||||
public string Expire { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudClient/Models/Remote/LockError.cs
Normal file
15
OpenSaveCloudClient/Models/Remote/LockError.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models.Remote
|
||||
{
|
||||
public class LockError
|
||||
{
|
||||
[JsonPropertyName("message")]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudClient/Models/Remote/NewGameInfo.cs
Normal file
15
OpenSaveCloudClient/Models/Remote/NewGameInfo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models.Remote
|
||||
{
|
||||
public class NewGameInfo
|
||||
{
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
15
OpenSaveCloudClient/Models/Remote/UploadGameInfo.cs
Normal file
15
OpenSaveCloudClient/Models/Remote/UploadGameInfo.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace OpenSaveCloudClient.Models.Remote
|
||||
{
|
||||
public class UploadGameInfo
|
||||
{
|
||||
[JsonPropertyName("game_id")]
|
||||
public int GameId { get; set; }
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user