|
|
|
@ -32,7 +32,6 @@ namespace DepotDownloader
|
|
|
|
|
public Dictionary<uint, byte[]> AppTickets { get; private set; }
|
|
|
|
|
public Dictionary<uint, ulong> AppTokens { get; private set; }
|
|
|
|
|
public Dictionary<uint, byte[]> DepotKeys { get; private set; }
|
|
|
|
|
public Dictionary<Tuple<uint, string>, SteamApps.CDNAuthTokenCallback> CDNAuthTokens { get; private set; }
|
|
|
|
|
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> AppInfo { get; private set; }
|
|
|
|
|
public Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo> PackageInfo { get; private set; }
|
|
|
|
|
|
|
|
|
@ -68,7 +67,6 @@ namespace DepotDownloader
|
|
|
|
|
this.AppTickets = new Dictionary<uint, byte[]>();
|
|
|
|
|
this.AppTokens = new Dictionary<uint, ulong>();
|
|
|
|
|
this.DepotKeys = new Dictionary<uint, byte[]>();
|
|
|
|
|
this.CDNAuthTokens = new Dictionary<Tuple<uint, string>, SteamApps.CDNAuthTokenCallback>();
|
|
|
|
|
this.AppInfo = new Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo>();
|
|
|
|
|
this.PackageInfo = new Dictionary<uint, SteamApps.PICSProductInfoCallback.PICSProductInfo>();
|
|
|
|
|
|
|
|
|
@ -281,34 +279,6 @@ namespace DepotDownloader
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void RequestCDNAuthToken(uint appid, string host)
|
|
|
|
|
{
|
|
|
|
|
if (CDNAuthTokens.ContainsKey(Tuple.Create(appid, host)) || bAborted)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
Action<SteamApps.CDNAuthTokenCallback, JobID> cbMethod = (cdnAuth, jobId) =>
|
|
|
|
|
{
|
|
|
|
|
Console.WriteLine("Got CDN auth token for {0} result: {1}", host, cdnAuth.Result);
|
|
|
|
|
|
|
|
|
|
if (cdnAuth.Result != EResult.OK)
|
|
|
|
|
{
|
|
|
|
|
Abort();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
CDNAuthTokens[Tuple.Create(appid, host)] = cdnAuth;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
using (var cdnAuthCallback = new JobCallback<SteamApps.CDNAuthTokenCallback>(cbMethod, callbacks, steamApps.GetCDNAuthToken(appid, host)))
|
|
|
|
|
{
|
|
|
|
|
do
|
|
|
|
|
{
|
|
|
|
|
WaitForCallbacks();
|
|
|
|
|
}
|
|
|
|
|
while (!cdnAuthCallback.Completed && !bAborted);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void Connect()
|
|
|
|
|
{
|
|
|
|
|
bAborted = false;
|
|
|
|
|