foobar2000 SDK  2015-08-03
Public Member Functions | Private Member Functions
fullFileBuffer

#include <fullFileBuffer.h>

Public Member Functions

 fullFileBuffer ()
 
 ~fullFileBuffer ()
 
file::ptr open (const char *path, abort_callback &abort, file::ptr hint, t_filesize sizeMax=1024 *1024 *256)
 

Private Member Functions

 fullFileBuffer (const fullFileBuffer &)
 
void operator= (const fullFileBuffer &)
 

Detailed Description

Definition at line 1 of file fullFileBuffer.h.

Constructor & Destructor Documentation

fullFileBuffer::fullFileBuffer ( )
inline

Definition at line 3 of file fullFileBuffer.h.

3  {
4  //hMutex = CreateMutex(NULL, FALSE, pfc::stringcvt::string_os_from_utf8(pfc::string_formatter() << "{3ABC4D98-2510-431C-A720-26BEB45F0278}-" << (uint32_t) GetCurrentProcessId()));
5  }
fullFileBuffer::~fullFileBuffer ( )
inline

Definition at line 6 of file fullFileBuffer.h.

6  {
7  //CloseHandle(hMutex);
8  }
fullFileBuffer::fullFileBuffer ( const fullFileBuffer )
private

Member Function Documentation

file::ptr fullFileBuffer::open ( const char *  path,
abort_callback abort,
file::ptr  hint,
t_filesize  sizeMax = 1024*1024*256 
)
inline

Definition at line 9 of file fullFileBuffer.h.

9  {
10  //mutexScope scope(hMutex, abort);
11 
12  file::ptr f;
13  if (hint.is_valid()) f = hint;
14  else filesystem::g_open_read( f, path, abort );
15  t_filesize fs = f->get_size(abort);
16  if (fs < sizeMax) /*rejects size-unknown too*/ {
17  try {
19  r->init( f, abort );
20  f = r;
21  } catch(std::bad_alloc) {}
22  }
23  return f;
24  }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
t_uint64 t_filesize
Type used for file size related variables.
Definition: filesystem.h:8
Autopointer class to be used with all services. Manages reference counter calls behind-the-scenes.
Definition: service.h:55
void fullFileBuffer::operator= ( const fullFileBuffer )
private

The documentation for this class was generated from the following file: