libcm is a C development framework with an emphasis on audio signal processing applications.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

cmLib.h 1.6KB

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