foobar2000 SDK  2015-08-03
Data Structures | Public Member Functions | Private Attributes
metadb_io_hintlist

#include <metadb_io_hintlist.h>

Data Structures

class  metadb_io_hintlist_wrapper_part1
 
class  metadb_io_hintlist_wrapper_part2
 
class  metadb_io_hintlist_wrapper_part3
 
class  metadb_io_hintlist_wrapper_part4
 
struct  t_entry
 

Public Member Functions

void add (metadb_handle_ptr const &p_handle, const file_info &p_info, t_filestats const &p_stats, bool p_fresh)
 
t_size get_pending_count () const
 
void hint_reader (service_ptr_t< input_info_reader > p_reader, const char *p_path, abort_callback &p_abort)
 
void run ()
 

Private Attributes

pfc::list_t< t_entry, pfc::alloc_fastm_entries
 

Detailed Description

Definition at line 2 of file metadb_io_hintlist.h.


Data Structure Documentation

struct metadb_io_hintlist::t_entry

Definition at line 9 of file metadb_io_hintlist.h.

Data Fields
bool m_fresh
metadb_handle_ptr m_handle
rcptr_t< file_info_const_impl > m_info
t_filestats m_stats

Member Function Documentation

void metadb_io_hintlist::add ( metadb_handle_ptr const &  p_handle,
const file_info p_info,
t_filestats const &  p_stats,
bool  p_fresh 
)

Definition at line 15 of file metadb_io_hintlist.cpp.

15  {
16  t_entry entry;
17  entry.m_handle = p_handle;
18  entry.m_info.new_t(p_info);
19  entry.m_stats = p_stats;
20  entry.m_fresh = p_fresh;
21  m_entries.add_item(entry);
22 }
pfc::list_t< t_entry, pfc::alloc_fast > m_entries
t_size metadb_io_hintlist::get_pending_count ( ) const
inline

Definition at line 7 of file metadb_io_hintlist.h.

7 {return m_entries.get_count();}
pfc::list_t< t_entry, pfc::alloc_fast > m_entries
void metadb_io_hintlist::hint_reader ( service_ptr_t< input_info_reader p_reader,
const char *  p_path,
abort_callback p_abort 
)

Definition at line 24 of file metadb_io_hintlist.cpp.

24  {
26  const t_uint32 subsongcount = p_reader->get_subsong_count();
27  t_filestats stats = p_reader->get_file_stats(p_abort);
28  for(t_uint32 subsong = 0; subsong < subsongcount; subsong++) {
29  t_uint32 subsong_id = p_reader->get_subsong(subsong);
30  metadb_handle_ptr handle;
31  api->handle_create(handle,make_playable_location(p_path,subsong_id));
32  if (handle->should_reload(stats,true)) {
33  file_info_impl temp;
34  p_reader->get_info(subsong_id,temp,p_abort);
35 
36  add(handle,temp,stats,true);
37  }
38  }
39 }
Implements file_info.
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533
void add(metadb_handle_ptr const &p_handle, const file_info &p_info, t_filestats const &p_stats, bool p_fresh)
uint32_t t_uint32
Definition: int_types.h:5
void metadb_io_hintlist::run ( )

Definition at line 3 of file metadb_io_hintlist.cpp.

3  {
4  if (m_entries.get_count() > 0) {
5  static_api_ptr_t<metadb_io>()->hint_multi_async(
6  metadb_io_hintlist_wrapper_part1(m_entries),
7  metadb_io_hintlist_wrapper_part2(m_entries),
8  metadb_io_hintlist_wrapper_part3(m_entries),
9  metadb_io_hintlist_wrapper_part4(m_entries)
10  );
11  }
12  m_entries.remove_all();
13 }
Helper template used to easily access core services. Usage: static_api_ptr_t<myclass> api; api->doso...
Definition: service.h:533
pfc::list_t< t_entry, pfc::alloc_fast > m_entries

Field Documentation

pfc::list_t<t_entry,pfc::alloc_fast> metadb_io_hintlist::m_entries
private

Definition at line 48 of file metadb_io_hintlist.h.


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