foobar2000 SDK  2015-01-14
Public Member Functions | Protected Member Functions | Private Member Functions
tag_write_callbackabstract

#include <tag_processor.h>

+ Inheritance diagram for tag_write_callback:

Public Member Functions

virtual bool open_temp_file (service_ptr_t< file > &p_out, abort_callback &p_abort)=0
 

Protected Member Functions

 tag_write_callback ()
 
 ~tag_write_callback ()
 

Private Member Functions

 tag_write_callback (const tag_write_callback &)
 
const tag_write_callbackoperator= (const tag_write_callback &)
 

Detailed Description

Callback interface for write-tags-to-temp-file-and-swap scheme, used for ID3v2 tag updates and such where entire file needs to be rewritten. As a speed optimization, file content can be copied to a temporary file in the same directory as the file being updated, and then source file can be swapped for the newly created file with updated tags. This also gives better security against data loss on crash compared to rewriting the file in place and using memory or generic temporary file APIs to store content being rewritten.

Definition at line 6 of file tag_processor.h.

Constructor & Destructor Documentation

tag_write_callback::tag_write_callback ( )
inlineprotected

Definition at line 12 of file tag_processor.h.

12 {}
tag_write_callback::~tag_write_callback ( )
inlineprotected

Definition at line 13 of file tag_processor.h.

13 {}
tag_write_callback::tag_write_callback ( const tag_write_callback )
inlineprivate

Definition at line 15 of file tag_processor.h.

15 {throw pfc::exception_not_implemented();}

Member Function Documentation

virtual bool tag_write_callback::open_temp_file ( service_ptr_t< file > &  p_out,
abort_callback p_abort 
)
pure virtual

Called only once per operation (or not called at all when operation being performed can be done in-place). Requests a temporary file to be created in the same directory.

Implemented in tag_write_callback_dummy.

const tag_write_callback& tag_write_callback::operator= ( const tag_write_callback )
inlineprivate

Definition at line 16 of file tag_processor.h.

16 {throw pfc::exception_not_implemented();}

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