The JUCE cross-platform C++ framework, with DISTRHO/KXStudio specific changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
4.7KB

  1. /*
  2. ==============================================================================
  3. This file is part of the JUCE library.
  4. Copyright (c) 2013 - Raw Material Software Ltd.
  5. Permission is granted to use this software under the terms of either:
  6. a) the GPL v2 (or any later version)
  7. b) the Affero GPL v3
  8. Details of these licenses can be found at: www.gnu.org/licenses
  9. JUCE is distributed in the hope that it will be useful, but WITHOUT ANY
  10. WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
  11. A PARTICULAR PURPOSE. See the GNU General Public License for more details.
  12. ------------------------------------------------------------------------------
  13. To release a closed-source product which uses JUCE, commercial licenses are
  14. available: visit www.juce.com for more information.
  15. ==============================================================================
  16. */
  17. #ifndef JUCE_PLUGINDESCRIPTION_H_INCLUDED
  18. #define JUCE_PLUGINDESCRIPTION_H_INCLUDED
  19. //==============================================================================
  20. /**
  21. A small class to represent some facts about a particular type of plug-in.
  22. This class is for storing and managing the details about a plug-in without
  23. actually having to load an instance of it.
  24. A KnownPluginList contains a list of PluginDescription objects.
  25. @see KnownPluginList
  26. */
  27. class JUCE_API PluginDescription
  28. {
  29. public:
  30. //==============================================================================
  31. PluginDescription();
  32. PluginDescription (const PluginDescription& other);
  33. PluginDescription& operator= (const PluginDescription& other);
  34. ~PluginDescription();
  35. //==============================================================================
  36. /** The name of the plug-in. */
  37. String name;
  38. /** A more descriptive name for the plug-in.
  39. This may be the same as the 'name' field, but some plug-ins may provide an
  40. alternative name.
  41. */
  42. String descriptiveName;
  43. /** The plug-in format, e.g. "VST", "AudioUnit", etc. */
  44. String pluginFormatName;
  45. /** A category, such as "Dynamics", "Reverbs", etc. */
  46. String category;
  47. /** The manufacturer. */
  48. String manufacturerName;
  49. /** The version. This string doesn't have any particular format. */
  50. String version;
  51. /** Either the file containing the plug-in module, or some other unique way
  52. of identifying it.
  53. E.g. for an AU, this would be an ID string that the component manager
  54. could use to retrieve the plug-in. For a VST, it's the file path.
  55. */
  56. String fileOrIdentifier;
  57. /** The last time the plug-in file was changed.
  58. This is handy when scanning for new or changed plug-ins.
  59. */
  60. Time lastFileModTime;
  61. /** A unique ID for the plug-in.
  62. Note that this might not be unique between formats, e.g. a VST and some
  63. other format might actually have the same id.
  64. @see createIdentifierString
  65. */
  66. int uid;
  67. /** True if the plug-in identifies itself as a synthesiser. */
  68. bool isInstrument;
  69. /** The number of inputs. */
  70. int numInputChannels;
  71. /** The number of outputs. */
  72. int numOutputChannels;
  73. /** True if the plug-in is part of a multi-type container, e.g. a VST Shell. */
  74. bool hasSharedContainer;
  75. /** Returns true if the two descriptions refer to the same plug-in.
  76. This isn't quite as simple as them just having the same file (because of
  77. shell plug-ins).
  78. */
  79. bool isDuplicateOf (const PluginDescription& other) const;
  80. //==============================================================================
  81. /** Returns a string that can be saved and used to uniquely identify the
  82. plugin again.
  83. This contains less info than the XML encoding, and is independent of the
  84. plug-in's file location, so can be used to store a plug-in ID for use
  85. across different machines.
  86. */
  87. String createIdentifierString() const;
  88. //==============================================================================
  89. /** Creates an XML object containing these details.
  90. @see loadFromXml
  91. */
  92. XmlElement* createXml() const;
  93. /** Reloads the info in this structure from an XML record that was previously
  94. saved with createXML().
  95. Returns true if the XML was a valid plug-in description.
  96. */
  97. bool loadFromXml (const XmlElement& xml);
  98. private:
  99. //==============================================================================
  100. JUCE_LEAK_DETECTOR (PluginDescription)
  101. };
  102. #endif // JUCE_PLUGINDESCRIPTION_H_INCLUDED