file_output.h 700 B

1234567891011121314151617181920212223242526272829303132
  1. /*
  2. * This file is part of the FreeStreamer project,
  3. * (C)Copyright 2011-2018 Matias Muhonen <mmu@iki.fi> 穆马帝
  4. * See the file ''LICENSE'' for using the code.
  5. *
  6. * https://github.com/muhku/FreeStreamer
  7. */
  8. #ifndef ASTREAMER_FILE_OUTPUT_H
  9. #define ASTREAMER_FILE_OUTPUT_H
  10. #import <CoreFoundation/CoreFoundation.h>
  11. namespace astreamer {
  12. class File_Output {
  13. private:
  14. File_Output(const File_Output&);
  15. File_Output& operator=(const File_Output&);
  16. CFWriteStreamRef m_writeStream;
  17. public:
  18. File_Output(CFURLRef fileURL);
  19. ~File_Output();
  20. CFIndex write(const UInt8 *buffer, CFIndex bufferLength);
  21. };
  22. } // namespace astreamer
  23. #endif // ASTREAMER_FILE_OUTPUT_H