libcm is a C development framework with an emphasis on audio signal processing applications.
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.

cmStrStream.h 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #ifndef cmStrStream_h
  2. #define cmStrStream_h
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. enum
  7. {
  8. kOkSsRC = cmOkRC,
  9. kLHeapMemFailSsRC
  10. };
  11. typedef cmHandle_t cmStrStreamH_t;
  12. typedef cmRC_t cmSsRC_t;
  13. extern cmStrStreamH_t cmStrStreamNullHandle;
  14. // If 'dfltBlkByteCnt' 'is set to 0 then the dfltBlkByteCnt is internally set to 4096.
  15. cmSsRC_t cmOStrStreamCreate( cmCtx_t* ctx, cmStrStreamH_t* hp, unsigned dfltBlkByteCnt );
  16. cmSsRC_t cmOStrStreamDestroy( cmStrStreamH_t* hp );
  17. bool cmOStrStreamIsValid( cmStrStreamH_t h );
  18. cmSsRC_t cmOStrStreamWrite( cmStrStreamH_t h, const void* dp, unsigned byteCnt );
  19. cmSsRC_t cmOStrStreamWriteStr( cmStrStreamH_t h, const cmChar_t* str );
  20. cmSsRC_t cmOStrStreamWriteStrN( cmStrStreamH_t h, const cmChar_t* str, unsigned n );
  21. cmSsRC_t cmOStrStreamVPrintf( cmStrStreamH_t h, const cmChar_t* fmt, va_list vl );
  22. cmSsRC_t cmOStrStreamPrintf( cmStrStreamH_t h, const cmChar_t* fmt, ... );
  23. unsigned cmOStrStreamByteCount( cmStrStreamH_t h );
  24. void* cmOStrStreamAllocBuf( cmStrStreamH_t h );
  25. cmChar_t* cmOStrStreamAllocText( cmStrStreamH_t h );
  26. #ifdef __cplusplus
  27. }
  28. #endif
  29. #endif