libcm is a C development framework with an emphasis on audio signal processing applications.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //| Copyright: (C) 2009-2020 Kevin Larke <contact AT larke DOT org>
  2. //| License: GNU GPL version 3.0 or above. See the accompanying LICENSE file.
  3. #ifndef cmLib_h
  4. #define cmLib_h
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. //( { file_desc:"Manage shared-libraries and query them for known symbols." kw:[system]}
  9. enum
  10. {
  11. kOkLibRC = cmOkRC,
  12. kOpenFailLibRC,
  13. kCloseFailLibRC,
  14. kSymFailLibRC,
  15. kInvalidIdLibRC,
  16. kFileSysFailLibRC
  17. };
  18. typedef unsigned cmLibRC_t;
  19. typedef cmHandle_t cmLibH_t;
  20. extern cmLibH_t cmLibNullHandle;
  21. // Initialize a dynamic library manager and scan a directory for dynamic libraries
  22. // to load. 'dirStr' is optional.
  23. cmLibRC_t cmLibInitialize( cmCtx_t* ctx, cmLibH_t* hp, const cmChar_t* dirStr );
  24. // Release a dynamic library manager and close any open libraries it may own.
  25. cmLibRC_t cmLibFinalize( cmLibH_t* hp );
  26. // Return true if the dynamic library mgr. is initialized.
  27. bool cmLibIsValid( cmLibH_t h );
  28. // Open a dynamic library.
  29. // Return cmInvalidId on error.
  30. unsigned cmLibOpen( cmLibH_t h, const cmChar_t* libFn );
  31. // Close a dynamic library.
  32. cmLibRC_t cmLibClose( cmLibH_t h, unsigned libId );
  33. // Return a pointer to a symbol from a dynamic library.
  34. void* cmLibSym( cmLibH_t h, unsigned libId, const cmChar_t* fn );
  35. // Scan a directory for dynamic libraries.
  36. cmLibRC_t cmLibScan( cmLibH_t h, const cmChar_t* dirStr );
  37. // Return the count of open libraries.
  38. unsigned cmLibCount( cmLibH_t h );
  39. // Return a library id given an index
  40. unsigned cmLibIndexToId( cmLibH_t h, unsigned idx );
  41. // Return the libraries file name.
  42. const cmChar_t* cmLibName( cmLibH_t h, unsigned libId );
  43. //)
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif