foobar2000 SDK  2015-08-03
Public Types | Public Member Functions
metadb_io_v2abstract

#include <metadb.h>

+ Inheritance diagram for metadb_io_v2:

Public Types

enum  { op_flag_no_errors = 1 << 0, op_flag_background = 1 << 1, op_flag_delay_ui = 1 << 2, op_flag_partial_info_aware = 1 << 3 }
 
- Public Types inherited from metadb_io
enum  t_load_info_state { load_info_success, load_info_aborted, load_info_errors }
 
enum  t_load_info_type { load_info_default, load_info_force, load_info_check_if_changed }
 
enum  t_update_info_state { update_info_success, update_info_aborted, update_info_errors }
 
- Public Types inherited from service_base
typedef service_base t_interface
 

Public Member Functions

virtual metadb_hint_list::ptr create_hint_list ()=0
 
 FB2K_MAKE_SERVICE_INTERFACE (metadb_io_v2, metadb_io)
 
virtual void load_info_async (metadb_handle_list_cref p_list, t_load_info_type p_type, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)=0
 
virtual void remove_info_async (metadb_handle_list_cref p_list, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)=0
 
virtual void rewrite_info_async (metadb_handle_list_cref p_list, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)=0
 
virtual void update_info_async (metadb_handle_list_cref p_list, service_ptr_t< file_info_filter > p_filter, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)=0
 
void update_info_async_simple (metadb_handle_list_cref p_list, const pfc::list_base_const_t< const file_info * > &p_new_info, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)
 
- Public Member Functions inherited from metadb_io
 __declspec (deprecated) virtual bool is_busy()=0
 
 __declspec (deprecated) virtual bool is_updating_disabled()=0
 
 __declspec (deprecated) virtual bool is_file_updating_blocked()=0
 
 __declspec (deprecated) virtual void highlight_running_process()=0
 
 __declspec (deprecated) virtual t_load_info_state load_info_multi(metadb_handle_list_cref p_list
 
 __declspec (deprecated) virtual t_update_info_state update_info_multi(metadb_handle_list_cref p_list
 
 __declspec (deprecated) virtual t_update_info_state rewrite_info_multi(metadb_handle_list_cref p_list
 
 __declspec (deprecated) virtual t_update_info_state remove_info_multi(metadb_handle_list_cref p_list
 
 __declspec (deprecated) t_load_info_state load_info(metadb_handle_ptr p_item
 
 __declspec (deprecated) t_update_info_state update_info(metadb_handle_ptr p_item
 
virtual void dispatch_refresh (metadb_handle_list_cref p_list)=0
 
void dispatch_refresh (metadb_handle_ptr const &handle)
 
 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (metadb_io)
 
void hint_async (metadb_handle_ptr p_item, const file_info &p_info, const t_filestats &p_stats, bool p_fresh)
 
virtual void hint_multi (metadb_handle_list_cref p_list, const pfc::list_base_const_t< const file_info * > &p_infos, const pfc::list_base_const_t< t_filestats > &p_stats, const bit_array &p_fresh_mask)=0
 
virtual void hint_multi_async (metadb_handle_list_cref p_list, const pfc::list_base_const_t< const file_info * > &p_infos, const pfc::list_base_const_t< t_filestats > &p_stats, const bit_array &p_fresh_mask)=0
 
virtual void hint_reader (service_ptr_t< class input_info_reader > p_reader, const char *p_path, abort_callback &p_abort)=0
 
virtual void path_to_handles_simple (const char *p_path, metadb_handle_list_ref p_out)=0
 
- 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 ()
 

Additional Inherited Members

- Data Fields inherited from metadb_io
file_infop_info
 
const pfc::list_base_const_t< file_info * > & p_new_info
 
t_load_info_type HWND p_parent_window
 
const pfc::list_base_const_t< file_info * > HWND p_parent_window
 
HWND p_parent_window
 
file_info HWND p_parent_window
 
t_load_info_type HWND bool p_show_errors = 0
 
const pfc::list_base_const_t< file_info * > HWND bool p_show_errors = 0
 
HWND bool p_show_errors = 0
 
file_info HWND bool p_show_errors
 
t_load_info_type p_type
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

New in 0.9.3. Extends metadb_io functionality with nonblocking versions of tag read/write functions, and some other utility features.

Definition at line 113 of file metadb.h.

Member Enumeration Documentation

anonymous enum
Enumerator
op_flag_no_errors 

By default, when some part of requested operation could not be performed for reasons other than user abort, a popup dialog with description of the problem is spawned.
Set this flag to disable error notification.

op_flag_background 

Set this flag to make the progress dialog not steal focus on creation.

op_flag_delay_ui 

Set this flag to delay the progress dialog becoming visible, so it does not appear at all during short operations. Also implies op_flag_background effect.

op_flag_partial_info_aware 
Since
1.3 Indicates that the caller is aware of the metadb partial info feature introduced at v1.3. When not specified, affected info will be quietly preserved when updating tags.

Definition at line 115 of file metadb.h.

115  {
118  op_flag_no_errors = 1 << 0,
120  op_flag_background = 1 << 1,
122  op_flag_delay_ui = 1 << 2,
123 
128  };
Set this flag to delay the progress dialog becoming visible, so it does not appear at all during shor...
Definition: metadb.h:122
By default, when some part of requested operation could not be performed for reasons other than user ...
Definition: metadb.h:118
Set this flag to make the progress dialog not steal focus on creation.
Definition: metadb.h:120

Member Function Documentation

virtual metadb_hint_list::ptr metadb_io_v2::create_hint_list ( )
pure virtual

Creates a metadb_hint_list object.

metadb_io_v2::FB2K_MAKE_SERVICE_INTERFACE ( metadb_io_v2  ,
metadb_io   
)
virtual void metadb_io_v2::load_info_async ( metadb_handle_list_cref  p_list,
t_load_info_type  p_type,
HWND  p_parent_window,
t_uint32  p_op_flags,
completion_notify_ptr  p_notify 
)
pure virtual

Preloads information from the specified tracks.

Parameters
p_listList of items to process.
p_op_flagsCan be null, or one or more of op_flag_* enum values combined, altering behaviors of the operation.
p_notifyCalled when the task is completed. Status code is one of t_load_info_state values. Can be null if caller doesn't care.
virtual void metadb_io_v2::remove_info_async ( metadb_handle_list_cref  p_list,
HWND  p_parent_window,
t_uint32  p_op_flags,
completion_notify_ptr  p_notify 
)
pure virtual

Strips all tags / metadata fields from the specified tracks.

Parameters
p_listList of items to process.
p_op_flagsCan be null, or one or more of op_flag_* enum values combined, altering behaviors of the operation.
p_notifyCalled when the task is completed. Status code is one of t_update_info values. Can be null if caller doesn't care.
virtual void metadb_io_v2::rewrite_info_async ( metadb_handle_list_cref  p_list,
HWND  p_parent_window,
t_uint32  p_op_flags,
completion_notify_ptr  p_notify 
)
pure virtual

Rewrites tags of the specified tracks; similar to update_info_async() but using last known/cached file_info values rather than values passed by caller.

Parameters
p_listList of items to process.
p_op_flagsCan be null, or one or more of op_flag_* enum values combined, altering behaviors of the operation.
p_notifyCalled when the task is completed. Status code is one of t_update_info values. Can be null if caller doesn't care.
virtual void metadb_io_v2::update_info_async ( metadb_handle_list_cref  p_list,
service_ptr_t< file_info_filter p_filter,
HWND  p_parent_window,
t_uint32  p_op_flags,
completion_notify_ptr  p_notify 
)
pure virtual

Updates tags of the specified tracks.

Parameters
p_listList of items to process.
p_op_flagsCan be null, or one or more of op_flag_* enum values combined, altering behaviors of the operation.
p_notifyCalled when the task is completed. Status code is one of t_update_info values. Can be null if caller doesn't care.
p_filterCallback handling actual file_info alterations. Typically used to replace entire meta part of file_info, or to alter something else such as ReplayGain while leaving meta intact.
void metadb_io_v2::update_info_async_simple ( metadb_handle_list_cref  p_list,
const pfc::list_base_const_t< const file_info * > &  p_new_info,
HWND  p_parent_window,
t_uint32  p_op_flags,
completion_notify_ptr  p_notify 
)

Updates tags of the specified tracks. Helper; uses update_info_async internally.

Parameters
p_listList of items to process.
p_op_flagsCan be null, or one or more of op_flag_* enum values combined, altering behaviors of the operation.
p_notifyCalled when the task is completed. Status code is one of t_update_info values. Can be null if caller doesn't care.
p_new_infoNew infos to write to specified items.

Definition at line 74 of file metadb.cpp.

74  {
75  update_info_async(p_list,new service_impl_t<file_info_filter_impl>(p_list,p_new_info),p_parent_window,p_op_flags,p_notify);
76 }
Template implementing reference-counting features of service_base. Intended for dynamic instantiation...
Definition: service_impl.h:4
t_load_info_type HWND p_parent_window
Definition: metadb.h:35
virtual void update_info_async(metadb_handle_list_cref p_list, service_ptr_t< file_info_filter > p_filter, HWND p_parent_window, t_uint32 p_op_flags, completion_notify_ptr p_notify)=0
Updates tags of the specified tracks.

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