PluginInfo.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #nullable enable
  2. using System;
  3. namespace MediaBrowser.Model.Plugins
  4. {
  5. /// <summary>
  6. /// This is a serializable stub class that is used by the api to provide information about installed plugins.
  7. /// </summary>
  8. public class PluginInfo
  9. {
  10. /// <summary>
  11. /// Initializes a new instance of the <see cref="PluginInfo"/> class.
  12. /// </summary>
  13. /// <param name="name">The plugin name.</param>
  14. /// <param name="version">The plugin <see cref="Version"/>.</param>
  15. /// <param name="description">The plugin description.</param>
  16. /// <param name="id">The <see cref="Guid"/>.</param>
  17. /// <param name="canUninstall">True if this plugin can be uninstalled.</param>
  18. public PluginInfo(string name, Version version, string description, Guid id, bool canUninstall)
  19. {
  20. Name = name;
  21. Version = version;
  22. Description = description;
  23. Id = id;
  24. CanUninstall = canUninstall;
  25. }
  26. /// <summary>
  27. /// Gets or sets the name.
  28. /// </summary>
  29. public string Name { get; set; }
  30. /// <summary>
  31. /// Gets or sets the version.
  32. /// </summary>
  33. public Version Version { get; set; }
  34. /// <summary>
  35. /// Gets or sets the name of the configuration file.
  36. /// </summary>
  37. public string? ConfigurationFileName { get; set; }
  38. /// <summary>
  39. /// Gets or sets the description.
  40. /// </summary>
  41. public string Description { get; set; }
  42. /// <summary>
  43. /// Gets or sets the unique id.
  44. /// </summary>
  45. public Guid Id { get; set; }
  46. /// <summary>
  47. /// Gets or sets a value indicating whether the plugin can be uninstalled.
  48. /// </summary>
  49. public bool CanUninstall { get; set; }
  50. /// <summary>
  51. /// Gets or sets a value indicating whether this plugin has a valid image.
  52. /// </summary>
  53. public bool HasImage { get; set; }
  54. /// <summary>
  55. /// Gets or sets a value indicating the status of the plugin.
  56. /// </summary>
  57. public PluginStatus Status { get; set; }
  58. }
  59. }