IvCloudTerminal.cs 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. using System;
  2. using System.Collections.Generic;
  3. namespace Vinno.vCloud.Common.FIS
  4. {
  5. public enum RegisterType
  6. {
  7. Success,
  8. Error,
  9. Failed
  10. }
  11. public interface IvCloudTerminal : IDisposable
  12. {
  13. /// <summary>
  14. /// Get device code.
  15. /// </summary>
  16. string DeviceCode { get; }
  17. string Url { get; }
  18. /// <summary>
  19. /// The uniqueId create when terminal created, used to add terminal for client user.
  20. /// </summary>
  21. string UniqueId { get; }
  22. /// <summary>
  23. /// Gets the status of the Terminal
  24. /// </summary>
  25. TerminalStatus Status { get; }
  26. /// <summary>
  27. /// Raised when the status is changed.
  28. /// </summary>
  29. event EventHandler StatusChanged;
  30. /// <summary>
  31. /// Get the feature instance by feature enum.
  32. /// </summary>
  33. /// <typeparam name="T">The interface of the feature</typeparam>
  34. /// <param name="featureType">The feature type</param>
  35. /// <returns>The instance of the feature</returns>
  36. /// <remarks>
  37. /// If the feature doesn't exist, this method will return null.
  38. /// </remarks>
  39. T GetFeature<T>(TerminalFeatureType featureType) where T : IFeature;
  40. IEnumerable<string> GetOrganizations(string keyWord);
  41. /// <summary>
  42. /// Disconnect to server.
  43. /// </summary>
  44. void Disconnect();
  45. /// <summary>
  46. /// Status == TerminalStatus.OrganizationMissing;
  47. /// </summary>
  48. /// <returns></returns>
  49. bool IsTerminalOrganizationMissging();
  50. /// <summary>
  51. /// update terminal account organization name to server
  52. /// </summary>
  53. /// <param name="organizationName"></param>
  54. /// <param name="createNewOrganization"></param>
  55. /// <returns> update success or yfailed</returns>
  56. bool UpdatelTerminalOrganizationName(string organizationName, bool createNewOrganization);
  57. /// <summary>
  58. /// get terminal Organization name after this must login successed
  59. /// </summary>
  60. /// <returns></returns>
  61. string GetOrganizationName();
  62. /// <summary>
  63. /// Update enabled feature types.
  64. /// </summary>
  65. /// <param name="enabledFeatureTypes">The enabled feature types.</param>
  66. void UpdateFeatures(IEnumerable<TerminalFeatureType> enabledFeatureTypes);
  67. }
  68. }