foobar2000 SDK  2015-01-14
Private Member Functions
playlist_loader_callbackabstract

#include <playlist_loader.h>

+ Inheritance diagram for playlist_loader_callback:

Private Member Functions

virtual void handle_create (metadb_handle_ptr &p_out, const playable_location &p_location)=0
 
virtual bool is_path_wanted (const char *path, t_entry_type type)=0
 
virtual void on_browse_info (const metadb_handle_ptr &p_item, t_entry_type p_type, const file_info &info, t_filetimestamp ts)=0
 
virtual void on_entry (const metadb_handle_ptr &p_item, t_entry_type p_type, const t_filestats &p_stats, bool p_fresh)=0
 
virtual void on_entry_info (const metadb_handle_ptr &p_item, t_entry_type p_type, const t_filestats &p_stats, const file_info &p_info, bool p_fresh)=0
 
virtual FB2K_MAKE_SERVICE_INTERFACE(playlist_loader_callback, service_base) public void on_progress (const char *p_path)=0
 
virtual bool want_browse_info (const metadb_handle_ptr &p_item, t_entry_type p_type, t_filetimestamp ts)=0
 
virtual bool want_info (const metadb_handle_ptr &p_item, t_entry_type p_type, const t_filestats &p_stats, bool p_fresh)=0
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

Callback interface receiving item locations from playlist loader.
Typically, you call one of standard services such as playlist_incoming_item_filter instead of implementing this interface and calling playlist_loader methods directly.

Definition at line 4 of file playlist_loader.h.

Member Function Documentation

virtual void playlist_loader_callback::handle_create ( metadb_handle_ptr p_out,
const playable_location p_location 
)
privatepure virtual

Same as metadb::handle_create(); provided here to avoid repeated metadb instantiation bottleneck since calling code will need this function often.

virtual bool playlist_loader_callback::is_path_wanted ( const char *  path,
t_entry_type  type 
)
privatepure virtual

Returns whether further on_entry() calls for this file are wanted. Typically always returns true, can be used to optimize cases when directories are searched for files matching specific pattern only so unwanted files aren't parsed unnecessarily.

Parameters
pathCanonical path to the media file being processed.
virtual void playlist_loader_callback::on_browse_info ( const metadb_handle_ptr p_item,
t_entry_type  p_type,
const file_info info,
t_filetimestamp  ts 
)
privatepure virtual
virtual void playlist_loader_callback::on_entry ( const metadb_handle_ptr p_item,
t_entry_type  p_type,
const t_filestats &  p_stats,
bool  p_fresh 
)
privatepure virtual

Receives an item from one of playlist_loader functions.

Parameters
p_itemItem location, in form of metadb_handle pointer.
p_typeOrigin of this item - see t_entry_type for more info.
p_statsFile stats of this item; set to filestats_invalid if not available.
p_freshFresh flag; indicates whether stats are directly from filesystem (true) or as stored earlier in a playlist file (false).
virtual void playlist_loader_callback::on_entry_info ( const metadb_handle_ptr p_item,
t_entry_type  p_type,
const t_filestats &  p_stats,
const file_info p_info,
bool  p_fresh 
)
privatepure virtual

Receives an item from one of playlist_loader functions; including file_info data. Except for file_info to be typically used as hint for metadb backend, behavior of this method is same as on_entry().

Parameters
p_itemItem location, in form of metadb_handle pointer.
p_typeOrigin of this item - see t_entry_type for more info.
p_statsFile stats of this item; set to filestats_invalid if not available.
p_infoInformation about the item, read from the file directly (if p_fresh is set to true) or from e.g. playlist file (if p_fresh is set to false).
p_freshFresh flag; indicates whether stats are directly from filesystem (true) or as stored earlier in a playlist file (false).
virtual FB2K_MAKE_SERVICE_INTERFACE (playlist_loader_callback, service_base) public void playlist_loader_callback::on_progress ( const char *  p_path)
privatepure virtual

Indicates specified path being processed; provided for updating GUI. Note that optimally GUI should not be updated every time this is called because that could introduce a bottleneck.

virtual bool playlist_loader_callback::want_browse_info ( const metadb_handle_ptr p_item,
t_entry_type  p_type,
t_filetimestamp  ts 
)
privatepure virtual
virtual bool playlist_loader_callback::want_info ( const metadb_handle_ptr p_item,
t_entry_type  p_type,
const t_filestats &  p_stats,
bool  p_fresh 
)
privatepure virtual

Queries whether file_info for specified item is requested. In typical scenario, if want_info() returns false, on_entry() will be called with same parameters; otherwise caller will attempt to read info from the item and call on_entry_info() with same parameters and file_info read from the item.

Parameters
p_itemItem location, in form of metadb_handle pointer.
p_typeOrigin of this item - see t_entry_type for more info.
p_statsFile stats of this item; set to filestats_invalid if not available.
p_freshFresh flag; indicates whether stats are directly from filesystem (true) or as stored earlier in a playlist file (false).

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