Guest User

Untitled

a guest
Apr 26th, 2014
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.25 KB | None | 0 0
  1. /**
  2. Prototype for plugin accessor function.
  3.  
  4. Plugins are discovered by hosts using RDF data (not by loading libraries).
  5. See http://lv2plug.in for details on the discovery process, though most
  6. hosts should use an existing library to implement this functionality.
  7.  
  8. This is the simple plugin discovery API, suitable for most statically
  9. defined plugins. Advanced plugins that need access to their bundle during
  10. discovery can use lv2_lib_descriptor() instead. Plugin libraries MUST
  11. include a function called "lv2_descriptor" or "lv2_lib_descriptor" with
  12. C-style linkage, but SHOULD provide "lv2_descriptor" wherever possible.
  13.  
  14. When it is time to load a plugin (designated by its URI), the host loads the
  15. plugin's library, gets the lv2_descriptor() function from it, and uses this
  16. function to find the LV2_Descriptor for the desired plugin. Plugins are
  17. accessed by index using values from 0 upwards. This function MUST return
  18. NULL for out of range indices, so the host can enumerate plugins by
  19. increasing @p index until NULL is returned.
  20.  
  21. Note that @p index has no meaning, hosts MUST NOT depend on it remaining
  22. consistent between loads of the plugin library.
  23. */
  24. LV2_SYMBOL_EXPORT
  25. const LV2_Descriptor * lv2_descriptor(uint32_t index);
  26.  
  27.  
  28. /**
  29. Prototype for library accessor function.
  30.  
  31. This is the more advanced discovery API, which allows plugin libraries to
  32. access their bundles during discovery, which makes it possible for plugins to
  33. be dynamically defined by files in their bundle. This API also has an
  34. explicit cleanup function, removing any need for non-portable shared library
  35. destructors. Simple plugins that do not require these features may use
  36. lv2_descriptor() instead.
  37.  
  38. This is the entry point for a plugin library. Hosts load this symbol from
  39. the library and call this function to obtain a library descriptor which can
  40. be used to access all the contained plugins. The returned object must not
  41. be destroyed (using LV2_Lib_Descriptor::cleanup()) until all plugins loaded
  42. from that library have been destroyed.
  43. */
  44. const LV2_Lib_Descriptor *
  45. lv2_lib_descriptor(const char * bundle_path,
  46. const LV2_Feature *const * features);
Advertisement
Add Comment
Please, Sign In to add comment