foobar2000_io Namespace Reference

Contains various I/O related structures and interfaces. More...


Classes

class  abort_callback
class  abort_callback_impl
 Implementation of abort_callback interface. More...
struct  t_filestats
 Stores file stats (size and timestamp). More...
class  stream_reader
class  stream_writer
class  file
class  file_dynamicinfo
 Special hack for shoutcast metadata nonsense handling. Documentme. More...
class  file_readonly_t
 Implementation helper - contains dummy implementations of methods that modify the file. More...
class  directory_callback
class  filesystem
class  directory_callback_impl
class  archive_callback
class  archive
 Interface for archive reader services. When implementing, derive from archive_impl rather than from deriving from archive directly. More...
class  archive_impl
 Root class for archive implementations. Derive from this instead of from archive directly. More...
class  archive_factory_t
class  directory_callback_retrieveList
class  directory_callback_retrieveListEx
class  directory_callback_retrieveListRecur
class  format_filetimestamp
 Warning: this formats according to system timezone settings, created strings should be used for display only, never for storage. More...

Typedefs

typedef abort_callback_impl abort_callback_dummy
 Dummy abort_callback that never gets aborted. To be possibly optimized in the future.
typedef t_uint64 t_filesize
 Type used for file size related variables.
typedef t_int64 t_sfilesize
 Type used for file size related variables when signed value is needed.
typedef t_uint64 t_filetimestamp
 Type used for file timestamp related variables. 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601; 0 for invalid/unknown time.
typedef service_ptr_t< filefile_ptr
typedef file_readonly_t< filefile_readonly

Functions

 PFC_DECLARE_EXCEPTION (exception_aborted, pfc::exception,"User abort")
 PFC_DECLARE_EXCEPTION (exception_io, pfc::exception,"I/O error")
 Generic I/O error. Root class for I/O failure exception. See relevant default message for description of each derived exception class.
 PFC_DECLARE_EXCEPTION (exception_io_not_found, exception_io,"Object not found")
 Object not found.
 PFC_DECLARE_EXCEPTION (exception_io_denied, exception_io,"Access denied")
 Access denied.
 PFC_DECLARE_EXCEPTION (exception_io_data, exception_io,"Unsupported format or corrupted file")
 Unsupported format or corrupted file (unexpected data encountered).
 PFC_DECLARE_EXCEPTION (exception_io_data_truncation, exception_io_data,"Unsupported format or corrupted file")
 Unsupported format or corrupted file (truncation encountered).
 PFC_DECLARE_EXCEPTION (exception_io_unsupported_format, exception_io_data,"Unsupported file format")
 Unsupported format (a subclass of "unsupported format or corrupted file" exception).
 PFC_DECLARE_EXCEPTION (exception_io_object_is_remote, exception_io,"This operation is not supported on remote objects")
 Object is remote, while specific operation is supported only for local objects.
 PFC_DECLARE_EXCEPTION (exception_io_sharing_violation, exception_io,"Sharing violation")
 Sharing violation.
 PFC_DECLARE_EXCEPTION (exception_io_device_full, exception_io,"Device full")
 Device full.
 PFC_DECLARE_EXCEPTION (exception_io_seek_out_of_range, exception_io,"Seek offset out of range")
 Attempt to seek outside valid range.
 PFC_DECLARE_EXCEPTION (exception_io_object_not_seekable, exception_io,"Object is not seekable")
 This operation requires a seekable object.
 PFC_DECLARE_EXCEPTION (exception_io_no_length, exception_io,"Length of object is unknown")
 This operation requires an object with known length.
 PFC_DECLARE_EXCEPTION (exception_io_no_handler_for_path, exception_io,"Invalid path")
 Invalid path.
 PFC_DECLARE_EXCEPTION (exception_io_already_exists, exception_io,"Object already exists")
 Object already exists.
 PFC_DECLARE_EXCEPTION (exception_io_no_data, exception_io,"The process receiving or sending data has terminated")
 Pipe error.
 PFC_DECLARE_EXCEPTION (exception_io_network_not_reachable, exception_io,"Network not reachable")
 Network not reachable.
 PFC_DECLARE_EXCEPTION (exception_io_write_protected, exception_io_denied,"The media is write protected")
 Media is write protected.
 PFC_DECLARE_EXCEPTION (exception_io_file_corrupted, exception_io,"The file is corrupted")
 File is corrupted. This indicates filesystem call failure, not actual invalid data being read by the app.
 PFC_DECLARE_EXCEPTION (exception_io_disk_change, exception_io,"Disc not available")
 The disc required for requested operation is not available.
 PFC_DECLARE_EXCEPTION (exception_io_directory_not_empty, exception_io,"Directory not empty")
 The directory is not empty.
t_filetimestamp filetimestamp_from_system_timer ()
void generate_temp_location_for_file (pfc::string_base &p_out, const char *p_origpath, const char *p_extension, const char *p_magic)
static file_ptr fileOpen (const char *p_path, filesystem::t_open_mode p_mode, abort_callback &p_abort, double p_timeout)
static file_ptr fileOpenReadExisting (const char *p_path, abort_callback &p_abort, double p_timeout=0)
static file_ptr fileOpenWriteExisting (const char *p_path, abort_callback &p_abort, double p_timeout=0)
static file_ptr fileOpenWriteNew (const char *p_path, abort_callback &p_abort, double p_timeout=0)
template<typename t_list>
static void listFiles (const char *p_path, t_list &p_out, abort_callback &p_abort)
template<typename t_list>
static void listDirectories (const char *p_path, t_list &p_out, abort_callback &p_abort)
template<typename t_list>
static void listFilesAndDirectories (const char *p_path, t_list &p_files, t_list &p_directories, abort_callback &p_abort)
template<typename t_list>
static void listFilesRecur (const char *p_path, t_list &p_out, abort_callback &p_abort)
bool extract_native_path (const char *p_fspath, pfc::string_base &p_native)
bool _extract_native_path_ptr (const char *&p_fspath)
bool extract_native_path_ex (const char *p_fspath, pfc::string_base &p_native)
template<typename T>
pfc::string getPathDisplay (const T &source)
template<typename T>
pfc::string getPathCanonical (const T &source)
t_filetimestamp filetimestamp_from_string (const char *date)

Variables

const t_filetimestamp filetimestamp_invalid = 0
 Invalid/unknown file timestamp constant. Also see: t_filetimestamp.
static const t_filesize filesize_invalid = (t_filesize)(~0)
 Invalid/unknown file size constant. Also see: t_filesize.
static const t_filetimestamp filetimestamp_1second_increment = 10000000
static const t_filestats filestats_invalid = {filesize_invalid,filetimestamp_invalid}
 Invalid/unknown file stats constant. See: t_filestats.


Detailed Description

Contains various I/O related structures and interfaces.

Typedef Documentation

Dummy abort_callback that never gets aborted. To be possibly optimized in the future.

Type used for file size related variables.

Type used for file timestamp related variables. 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601; 0 for invalid/unknown time.

Type used for file size related variables when signed value is needed.


Function Documentation

bool foobar2000_io::_extract_native_path_ptr ( const char *&  p_fspath  ) 

bool foobar2000_io::extract_native_path ( const char *  p_fspath,
pfc::string_base p_native 
)

bool foobar2000_io::extract_native_path_ex ( const char *  p_fspath,
pfc::string_base p_native 
)

static file_ptr foobar2000_io::fileOpen ( const char *  p_path,
filesystem::t_open_mode  p_mode,
abort_callback p_abort,
double  p_timeout 
) [static]

static file_ptr foobar2000_io::fileOpenReadExisting ( const char *  p_path,
abort_callback p_abort,
double  p_timeout = 0 
) [static]

static file_ptr foobar2000_io::fileOpenWriteExisting ( const char *  p_path,
abort_callback p_abort,
double  p_timeout = 0 
) [static]

static file_ptr foobar2000_io::fileOpenWriteNew ( const char *  p_path,
abort_callback p_abort,
double  p_timeout = 0 
) [static]

t_filetimestamp foobar2000_io::filetimestamp_from_string ( const char *  date  ) 

t_filetimestamp foobar2000_io::filetimestamp_from_system_timer (  ) 

void foobar2000_io::generate_temp_location_for_file ( pfc::string_base p_out,
const char *  p_origpath,
const char *  p_extension,
const char *  p_magic 
)

template<typename T>
pfc::string foobar2000_io::getPathCanonical ( const T &  source  )  [inline]

template<typename T>
pfc::string foobar2000_io::getPathDisplay ( const T &  source  )  [inline]

template<typename t_list>
static void foobar2000_io::listDirectories ( const char *  p_path,
t_list &  p_out,
abort_callback p_abort 
) [inline, static]

template<typename t_list>
static void foobar2000_io::listFiles ( const char *  p_path,
t_list &  p_out,
abort_callback p_abort 
) [inline, static]

template<typename t_list>
static void foobar2000_io::listFilesAndDirectories ( const char *  p_path,
t_list &  p_files,
t_list &  p_directories,
abort_callback p_abort 
) [inline, static]

template<typename t_list>
static void foobar2000_io::listFilesRecur ( const char *  p_path,
t_list &  p_out,
abort_callback p_abort 
) [inline, static]

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_directory_not_empty  ,
exception_io  ,
"Directory not empty"   
)

The directory is not empty.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_disk_change  ,
exception_io  ,
"Disc not available"   
)

The disc required for requested operation is not available.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_file_corrupted  ,
exception_io  ,
"The file is corrupted"   
)

File is corrupted. This indicates filesystem call failure, not actual invalid data being read by the app.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_write_protected  ,
exception_io_denied  ,
"The media is write protected"   
)

Media is write protected.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_network_not_reachable  ,
exception_io  ,
"Network not reachable"   
)

Network not reachable.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_no_data  ,
exception_io  ,
"The process receiving or sending data has terminated"   
)

Pipe error.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_already_exists  ,
exception_io  ,
"Object already exists"   
)

Object already exists.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_no_handler_for_path  ,
exception_io  ,
"Invalid path"   
)

Invalid path.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_no_length  ,
exception_io  ,
"Length of object is unknown"   
)

This operation requires an object with known length.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_object_not_seekable  ,
exception_io  ,
"Object is not seekable"   
)

This operation requires a seekable object.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_seek_out_of_range  ,
exception_io  ,
"Seek offset out of range"   
)

Attempt to seek outside valid range.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_device_full  ,
exception_io  ,
"Device full"   
)

Device full.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_sharing_violation  ,
exception_io  ,
"Sharing violation"   
)

Sharing violation.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_object_is_remote  ,
exception_io  ,
"This operation is not supported on remote objects"   
)

Object is remote, while specific operation is supported only for local objects.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_unsupported_format  ,
exception_io_data  ,
"Unsupported file format"   
)

Unsupported format (a subclass of "unsupported format or corrupted file" exception).

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_data_truncation  ,
exception_io_data  ,
"Unsupported format or corrupted file  
)

Unsupported format or corrupted file (truncation encountered).

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_data  ,
exception_io  ,
"Unsupported format or corrupted file  
)

Unsupported format or corrupted file (unexpected data encountered).

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_denied  ,
exception_io  ,
"Access denied"   
)

Access denied.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io_not_found  ,
exception_io  ,
"Object not found"   
)

Object not found.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_io  ,
pfc::exception  ,
"I/O error"   
)

Generic I/O error. Root class for I/O failure exception. See relevant default message for description of each derived exception class.

foobar2000_io::PFC_DECLARE_EXCEPTION ( exception_aborted  ,
pfc::exception  ,
"User abort"   
)


Variable Documentation

Invalid/unknown file size constant. Also see: t_filesize.

Invalid/unknown file stats constant. See: t_filestats.

Invalid/unknown file timestamp constant. Also see: t_filetimestamp.


Generated on Thu Aug 28 21:16:04 2008 for foobar2000 SDK by  doxygen 1.5.5