library_manager Class Reference

#include <library_manager.h>

Inheritance diagram for library_manager:
service_base library_manager_v2 library_manager_v3

List of all members.

Classes

class  enum_callback
 Interface for use with library_manager::enum_items(). More...

Public Types

typedef library_manager t_interface_entrypoint
typedef library_manager t_interface
typedef service_base t_interface_parent

Public Member Functions

virtual bool is_item_in_library (const metadb_handle_ptr &p_item)=0
 Returns whether the specified item is in the Media Library or not.
virtual bool is_item_addable (const metadb_handle_ptr &p_item)=0
 Returns whether current user settings allow the specified item to be added to the Media Library or not.
virtual bool is_path_addable (const char *p_path)=0
 Returns whether current user settings allow the specified item path to be added to the Media Library or not.
virtual bool get_relative_path (const metadb_handle_ptr &p_item, pfc::string_base &p_out)=0
virtual void enum_items (enum_callback &p_callback)=0
 Calls callback method for every item in the Media Library. Note that order of items in Media Library is undefined.
virtual void add_items (const pfc::list_base_const_t< metadb_handle_ptr > &p_data)=0
 Deprecated, does nothing.
virtual void remove_items (const pfc::list_base_const_t< metadb_handle_ptr > &p_data)=0
 Deprecated, does nothing.
virtual void add_items_async (const pfc::list_base_const_t< metadb_handle_ptr > &p_data)=0
 Deprecated, does nothing.
virtual void on_files_deleted_sorted (const pfc::list_base_const_t< const char * > &p_data)=0
 Deprecated, does nothing.
virtual void get_all_items (pfc::list_base_t< metadb_handle_ptr > &p_out)=0
 Retrieves the entire Media Library content.
virtual bool is_library_enabled ()=0
 Returns whether Media Library functionality is enabled or not (to be exact: whether there's at least one Media Library folder present in settings), for e.g. notifying the user to change settings when trying to use a Media Library viewer without having configured the Media Library first.
virtual void show_preferences ()=0
 Pops up the Media Library preferences page.
virtual void rescan ()=0
 Deprecated, does nothing.
virtual void check_dead_entries (const pfc::list_base_t< metadb_handle_ptr > &p_list)=0
 Deprecated, does nothing.

Static Public Attributes

static const GUID class_guid

Detailed Description

This service implements methods allowing you to interact with the Media Library.
All methods are valid from main thread only, unless noted otherwise.
Usage: Use static_api_ptr_t<library_manager> to instantiate.


Member Typedef Documentation

Reimplemented from service_base.

Reimplemented in library_manager_v2, and library_manager_v3.

Reimplemented in library_manager_v2, and library_manager_v3.


Member Function Documentation

virtual void library_manager::add_items ( const pfc::list_base_const_t< metadb_handle_ptr > &  p_data  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::add_items_async ( const pfc::list_base_const_t< metadb_handle_ptr > &  p_data  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::check_dead_entries ( const pfc::list_base_t< metadb_handle_ptr > &  p_list  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::enum_items ( enum_callback p_callback  )  [pure virtual]

Calls callback method for every item in the Media Library. Note that order of items in Media Library is undefined.

virtual void library_manager::get_all_items ( pfc::list_base_t< metadb_handle_ptr > &  p_out  )  [pure virtual]

Retrieves the entire Media Library content.

virtual bool library_manager::get_relative_path ( const metadb_handle_ptr p_item,
pfc::string_base p_out 
) [pure virtual]

Retrieves path of the specified item relative to the Media Library folder it is in. Returns true on success, false when the item is not in the Media Library. SPECIAL WARNING: to allow multi-CPU optimizations to parse relative track paths, this API works in threads other than the main app thread. Main thread MUST be blocked while working in such scenarios, it's NOT safe to call from worker threads while the Media Library content/configuration might be getting altered.

virtual bool library_manager::is_item_addable ( const metadb_handle_ptr p_item  )  [pure virtual]

Returns whether current user settings allow the specified item to be added to the Media Library or not.

virtual bool library_manager::is_item_in_library ( const metadb_handle_ptr p_item  )  [pure virtual]

Returns whether the specified item is in the Media Library or not.

virtual bool library_manager::is_library_enabled (  )  [pure virtual]

Returns whether Media Library functionality is enabled or not (to be exact: whether there's at least one Media Library folder present in settings), for e.g. notifying the user to change settings when trying to use a Media Library viewer without having configured the Media Library first.

virtual bool library_manager::is_path_addable ( const char *  p_path  )  [pure virtual]

Returns whether current user settings allow the specified item path to be added to the Media Library or not.

virtual void library_manager::on_files_deleted_sorted ( const pfc::list_base_const_t< const char * > &  p_data  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::remove_items ( const pfc::list_base_const_t< metadb_handle_ptr > &  p_data  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::rescan (  )  [pure virtual]

Deprecated, does nothing.

virtual void library_manager::show_preferences (  )  [pure virtual]

Pops up the Media Library preferences page.


Member Data Documentation

const GUID library_manager::class_guid [static]
Initial value:
 
{ 0xfebd85b5, 0xc12d, 0x45b5, { 0xb5, 0x5d, 0xd, 0x3f, 0x43, 0x2b, 0xc, 0x6b } }

Reimplemented in library_manager_v2, and library_manager_v3.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

Generated by  doxygen 1.6.2