Prioritizes app refresh order

Tries to refresh apps that are about to expire first, and then always refreshes AltStore itself last, since refreshing AltStore means that the app will quit.
This commit is contained in:
Riley Testut
2019-06-21 11:20:03 -07:00
parent c096fd02b4
commit 39c84e623a
21 changed files with 1016 additions and 621 deletions

View File

@@ -13,8 +13,17 @@ public let ALTServerServiceType = "_altserver._tcp"
// Can only automatically conform ALTServerError.Code to Codable, not ALTServerError itself
extension ALTServerError.Code: Codable {}
public struct ServerRequest: Codable
protocol ServerMessage: Codable
{
var version: Int { get }
var identifier: String { get }
}
public struct PrepareAppRequest: ServerMessage
{
public var version = 1
public var identifier = "PrepareApp"
public var udid: String
public var contentSize: Int
@@ -25,8 +34,21 @@ public struct ServerRequest: Codable
}
}
public struct ServerResponse: Codable
public struct BeginInstallationRequest: ServerMessage
{
public var version = 1
public var identifier = "BeginInstallation"
public init()
{
}
}
public struct ServerResponse: ServerMessage
{
public var version = 1
public var identifier = "ServerResponse"
public var progress: Double
public var error: ALTServerError? {