libtorrent::file::impl Struct Reference

List of all members.

Public Types

enum  open_flags { read_flag = 1, write_flag = 2 }
enum  seek_mode { seek_begin = FILE_BEGIN, seek_from_here = FILE_CURRENT, seek_end = FILE_END }

Public Member Functions

 impl ()
 impl (fs::path const &path, int mode)
 ~impl ()
void open (fs::path const &path, int mode)
void close ()
size_type read (char *buf, size_type num_bytes)
size_type write (const char *buf, size_type num_bytes)
size_type seek (size_type offset, int m)
size_type tell ()
 impl ()
void open (const char *file_name, open_flags flags)
void close ()
 ~impl ()
size_type write (const char *buffer, size_type num_bytes)
size_type read (char *buffer, size_type num_bytes)
size_type seek (size_type pos, seek_mode from_where)
size_type tell ()

Public Attributes

int m_fd
int m_open_mode

Private Attributes

HANDLE m_file_handle


Detailed Description

Definition at line 110 of file file.cpp.


Member Enumeration Documentation

Enumerator:
read_flag 
write_flag 

Definition at line 93 of file file_win.cpp.

Enumerator:
seek_begin 
seek_from_here 
seek_end 

Definition at line 99 of file file_win.cpp.


Constructor & Destructor Documentation

libtorrent::file::impl::impl (  )  [inline]

Definition at line 112 of file file.cpp.

libtorrent::file::impl::impl ( fs::path const &  path,
int  mode 
) [inline]

Definition at line 117 of file file.cpp.

References open().

libtorrent::file::impl::~impl (  )  [inline]

Definition at line 124 of file file.cpp.

References close().

libtorrent::file::impl::impl (  )  [inline]

Definition at line 106 of file file_win.cpp.

References m_file_handle.

libtorrent::file::impl::~impl (  )  [inline]

Definition at line 164 of file file_win.cpp.

References close().


Member Function Documentation

void libtorrent::file::impl::open ( fs::path const &  path,
int  mode 
) [inline]

Definition at line 129 of file file.cpp.

References close(), m_fd, m_open_mode, map_open_mode(), and utf8_native().

Referenced by impl().

void libtorrent::file::impl::close (  )  [inline]

Definition at line 163 of file file.cpp.

References m_fd, and m_open_mode.

Referenced by open(), and ~impl().

size_type libtorrent::file::impl::read ( char *  buf,
size_type  num_bytes 
) [inline]

Definition at line 176 of file file.cpp.

References m_fd, m_open_mode, and mode_in.

size_type libtorrent::file::impl::write ( const char *  buf,
size_type  num_bytes 
) [inline]

Definition at line 195 of file file.cpp.

References m_fd, m_open_mode, and mode_out.

size_type libtorrent::file::impl::seek ( size_type  offset,
int  m 
) [inline]

Definition at line 217 of file file.cpp.

References m_fd, m_open_mode, SEEK_END, and SEEK_SET.

size_type libtorrent::file::impl::tell (  )  [inline]

Definition at line 244 of file file.cpp.

References m_fd, m_open_mode, and SEEK_CUR.

void libtorrent::file::impl::open ( const char *  file_name,
open_flags  flags 
) [inline]

void libtorrent::file::impl::close (  )  [inline]

Definition at line 155 of file file_win.cpp.

References m_file_handle.

size_type libtorrent::file::impl::write ( const char *  buffer,
size_type  num_bytes 
) [inline]

Definition at line 169 of file file_win.cpp.

References FALSE, m_file_handle, and throw_exception().

size_type libtorrent::file::impl::read ( char *  buffer,
size_type  num_bytes 
) [inline]

Definition at line 189 of file file_win.cpp.

References FALSE, m_file_handle, and throw_exception().

size_type libtorrent::file::impl::seek ( size_type  pos,
seek_mode  from_where 
) [inline]

size_type libtorrent::file::impl::tell (  )  [inline]

Definition at line 228 of file file_win.cpp.

References FALSE, m_file_handle, pos(), LARGE_INTEGER::QuadPart, and throw_exception().


Member Data Documentation

Definition at line 256 of file file.cpp.

Referenced by close(), open(), read(), seek(), tell(), and write().

Definition at line 257 of file file.cpp.

Referenced by close(), open(), read(), seek(), tell(), and write().

Definition at line 250 of file file_win.cpp.

Referenced by close(), impl(), open(), read(), seek(), tell(), and write().


The documentation for this struct was generated from the following files:

Generated on Sun May 25 00:21:41 2008 by  doxygen 1.5.6