buffer.h 680 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /* $Id$
  2. *
  3. * buffer.h
  4. *
  5. * See the COPYING file for the terms of usage and distribution.
  6. */
  7. #ifndef __log4c_buffer_h
  8. #define __log4c_buffer_h
  9. /**
  10. * @file buffer.h
  11. *
  12. * @brief log4c buffer
  13. *
  14. **/
  15. #include <log4c/defs.h>
  16. #include <stddef.h>
  17. __LOG4C_BEGIN_DECLS
  18. /**
  19. * @brief buffer object
  20. *
  21. * Attributes description:
  22. *
  23. * @li @c size current size of the buffer
  24. * @li @c maxsize maximum size of the buffer. 0 means no limitation.
  25. * @li @c data raw data
  26. **/
  27. typedef struct
  28. {
  29. size_t buf_size;
  30. size_t buf_maxsize;
  31. char* buf_data;
  32. } log4c_buffer_t;
  33. #define LOG4C_BUFFER_SIZE_DEFAULT 1024
  34. #define LOG4C_BUFFER_SIZE_MAX 1024*10
  35. __LOG4C_END_DECLS
  36. #endif