#include <playlist_loader.h>
|
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 |
|
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.
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
-
path | Canonical 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_item | Item location, in form of metadb_handle pointer. |
p_type | Origin of this item - see t_entry_type for more info. |
p_stats | File stats of this item; set to filestats_invalid if not available. |
p_fresh | Fresh 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_item | Item location, in form of metadb_handle pointer. |
p_type | Origin of this item - see t_entry_type for more info. |
p_stats | File stats of this item; set to filestats_invalid if not available. |
p_info | Information 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_fresh | Fresh flag; indicates whether stats are directly from filesystem (true) or as stored earlier in a playlist file (false). |
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_item | Item location, in form of metadb_handle pointer. |
p_type | Origin of this item - see t_entry_type for more info. |
p_stats | File stats of this item; set to filestats_invalid if not available. |
p_fresh | Fresh 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: