libcm is a C development framework with an emphasis on audio signal processing applications.
Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

cmLib.h 1.5KB

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