file_wrapper_simple.h

Go to the documentation of this file.
00001 class file_wrapper_simple
00002 {
00003 public:
00004         explicit file_wrapper_simple(const service_ptr_t<file> & p_file,abort_callback & p_abort) : m_file(p_file), m_abort(p_abort), m_has_failed(false) {}
00005 
00006         inline bool has_failed() const {return m_has_failed;}
00007         inline void reset_status() {m_has_failed = false;}
00008 
00009 
00010         t_size read(void * p_buffer,t_size p_bytes);
00011         t_size write(const void * p_buffer,t_size p_bytes);
00012         bool seek(t_filesize p_offset);
00013         t_filesize get_position();
00014         t_filesize get_size();
00015         bool can_seek();
00016         bool truncate();
00017 private:
00018         service_ptr_t<file> m_file;
00019         abort_callback & m_abort;
00020         bool m_has_failed;
00021 };

Generated on Thu Aug 28 21:15:31 2008 for foobar2000 SDK by  doxygen 1.5.5