aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
committerShlomo Hecht <shlomo@twine-s.com>2020-01-27 09:19:11 +0200
commitddda6089bff56e80703c8d2dce297919edc58bf1 (patch)
tree7702c5cf169124d522eacc7f1a9e0878373baedd /Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web
parent1d4d327571d4c0c9f4e17411551bd4dae1e2aed0 (diff)
parentbf2f3245339b9fd9148a2ad25b5ba3320e970cc1 (diff)
downloadTango-ddda6089bff56e80703c8d2dce297919edc58bf1.tar.gz
Tango-ddda6089bff56e80703c8d2dce297919edc58bf1.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web')
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/CheckForUpdatesResponse.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionRequest.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionResponse.cs21
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestVersionResponse.cs2
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginMethod.cs17
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginRequest.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginResponse.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs27
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenRequest.cs14
-rw-r--r--Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenResponse.cs15
10 files changed, 114 insertions, 0 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/CheckForUpdatesResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/CheckForUpdatesResponse.cs
index 51608e6c4..b78047c85 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/CheckForUpdatesResponse.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/CheckForUpdatesResponse.cs
@@ -17,5 +17,7 @@ namespace Tango.MachineStudio.Common.Web
public String Comments { get; set; }
public String BlobAddress { get; set; }
+
+ public String CdnAddress { get; set; }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionRequest.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionRequest.cs
new file mode 100644
index 000000000..24d465e69
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionRequest.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Transport.Web;
+
+namespace Tango.MachineStudio.Common.Web
+{
+ public class DownloadLatestPPCVersionRequest : WebRequestMessage
+ {
+ public String SerialNumber { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionResponse.cs
new file mode 100644
index 000000000..2cc6b731a
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestPPCVersionResponse.cs
@@ -0,0 +1,21 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Core;
+using Tango.Transport.Web;
+
+namespace Tango.MachineStudio.Common.Web
+{
+ public class DownloadLatestPPCVersionResponse : WebResponseMessage
+ {
+ public String Version { get; set; }
+
+ public String BlobAddress { get; set; }
+
+ public String CdnAddress { get; set; }
+
+ public DataSource DataSource { get; set; }
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestVersionResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestVersionResponse.cs
index 3209b9a2f..60251d455 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestVersionResponse.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/DownloadLatestVersionResponse.cs
@@ -12,5 +12,7 @@ namespace Tango.MachineStudio.Common.Web
public String Version { get; set; }
public String BlobAddress { get; set; }
+
+ public String CdnAddress { get; set; }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginMethod.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginMethod.cs
new file mode 100644
index 000000000..83f1c0850
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginMethod.cs
@@ -0,0 +1,17 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Tango.MachineStudio.Common.Web
+{
+ public enum LoginMethod
+ {
+ [Description("Active Directory")]
+ ActiveDirectory,
+ [Description("Standard User")]
+ StandardUser,
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginRequest.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginRequest.cs
index 577f5e208..1727a2c6e 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginRequest.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginRequest.cs
@@ -12,5 +12,6 @@ namespace Tango.MachineStudio.Common.Web
public String Version { get; set; }
public String Email { get; set; }
public String Password { get; set; }
+ public LoginMethod Method { get; set; }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginResponse.cs
index 4ae22fa93..3515c32d1 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginResponse.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/LoginResponse.cs
@@ -14,5 +14,6 @@ namespace Tango.MachineStudio.Common.Web
public DataSource DataSource { get; set; }
public bool VersionChangeRequired { get; set; }
public String RequiredVersion { get; set; }
+ public bool PasswordChangeRequired { get; set; }
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs
index 665d25ccb..72eb4acaa 100644
--- a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/MachineStudioWebClientBase.cs
@@ -41,6 +41,15 @@ namespace Tango.MachineStudio.Common.Web
}
/// <summary>
+ /// Initializes a new instance of the <see cref="MachineStudioWebClientBase"/> class.
+ /// </summary>
+ /// <param name="cloned">Other instance.</param>
+ public MachineStudioWebClientBase(MachineStudioWebClientBase cloned) : base(cloned)
+ {
+
+ }
+
+ /// <summary>
/// Executes the CheckForUpdates action and returns Tango.MachineStudio.Common.Web.CheckForUpdatesResponse.
/// </summary>
/// <returns></returns>
@@ -85,5 +94,23 @@ namespace Tango.MachineStudio.Common.Web
return Post<Tango.MachineStudio.Common.Web.LatestVersionRequest, Tango.MachineStudio.Common.Web.LatestVersionResponse>("GetLatestVersion", request);
}
+ /// <summary>
+ /// Executes the RefreshToken action and returns Tango.MachineStudio.Common.Web.RefreshTokenResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.MachineStudio.Common.Web.RefreshTokenResponse> RefreshToken(Tango.MachineStudio.Common.Web.RefreshTokenRequest request)
+ {
+ return Post<Tango.MachineStudio.Common.Web.RefreshTokenRequest, Tango.MachineStudio.Common.Web.RefreshTokenResponse>("RefreshToken", request);
+ }
+
+ /// <summary>
+ /// Executes the DownloadLatestPPCVersion action and returns Tango.MachineStudio.Common.Web.DownloadLatestPPCVersionResponse.
+ /// </summary>
+ /// <returns></returns>
+ public Task<Tango.MachineStudio.Common.Web.DownloadLatestPPCVersionResponse> DownloadLatestPPCVersion(Tango.MachineStudio.Common.Web.DownloadLatestPPCVersionRequest request)
+ {
+ return Post<Tango.MachineStudio.Common.Web.DownloadLatestPPCVersionRequest, Tango.MachineStudio.Common.Web.DownloadLatestPPCVersionResponse>("DownloadLatestPPCVersion", request);
+ }
+
}
}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenRequest.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenRequest.cs
new file mode 100644
index 000000000..3745cbae1
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenRequest.cs
@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Transport.Web;
+
+namespace Tango.MachineStudio.Common.Web
+{
+ public class RefreshTokenRequest : WebRequestMessage
+ {
+
+ }
+}
diff --git a/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenResponse.cs b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenResponse.cs
new file mode 100644
index 000000000..c7fcef5cb
--- /dev/null
+++ b/Software/Visual_Studio/MachineStudio/Tango.MachineStudio.Common/Web/RefreshTokenResponse.cs
@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using Tango.Transport.Web;
+
+namespace Tango.MachineStudio.Common.Web
+{
+ public class RefreshTokenResponse : WebResponseMessage
+ {
+ public String AccessToken { get; set; }
+ public DateTime Expiration { get; set; }
+ }
+}