foobar2000 SDK
2015-08-03
|
#include <metadb.h>
Public Types | |
enum | { case_sensitive = true } |
typedef pfc::comparator_strcmp | path_comparator |
Public Types inherited from service_base | |
typedef service_base | t_interface |
Public Member Functions | |
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (metadb) | |
virtual void | handle_create (metadb_handle_ptr &p_out, const playable_location &p_location)=0 |
metadb_handle_ptr | handle_create (playable_location const &l) |
metadb_handle_ptr | handle_create (const char *path, uint32_t subsong) |
void | handle_create_replace_path (metadb_handle_ptr &p_out, const metadb_handle_ptr &p_source, const char *p_new_path) |
void | handle_create_replace_path_canonical (metadb_handle_ptr &p_out, const metadb_handle_ptr &p_source, const char *p_new_path) |
void | handle_replace_path_canonical (metadb_handle_ptr &p_out, const char *p_new_path) |
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 () |
Static Public Member Functions | |
static bool | g_get_random_handle (metadb_handle_ptr &p_out) |
static int | path_compare (const char *p1, const char *p2) |
static int | path_compare_ex (const char *p1, t_size len1, const char *p2, t_size len2) |
static int | path_compare_metadb_handle (const metadb_handle_ptr &p1, const metadb_handle_ptr &p2) |
static int | path_compare_nc (const char *p1, size_t len1, const char *p2, size_t len2) |
Protected Member Functions | |
virtual void | database_lock ()=0 |
virtual void | database_unlock ()=0 |
Protected Member Functions inherited from service_base | |
service_base () | |
~service_base () | |
Entrypoint service for metadb_handle related operations.
Implemented only by core, do not reimplement.
Use static_api_ptr_t template to access it, e.g. static_api_ptr_t<metadb>()->handle_create(myhandle,mylocation);.
anonymous enum |
|
protectedpure virtual |
OBSOLETE, DO NOT CALL.
|
protectedpure virtual |
OBSOLETE, DO NOT CALL.
metadb::FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT | ( | metadb | ) |
|
static |
Helper function; attempts to retrieve a handle to any known playable location to be used for e.g. titleformatting script preview.
.
Definition at line 39 of file metadb.cpp.
|
pure virtual |
Returns a metadb_handle object referencing the specified location. If one doesn't exist yet a new one is created. There can be only one metadb_handle object referencing specific location.
This function should never fail unless there's something critically wrong (can't allocate memory for the new object, etc).
Speed: O(log(n)) to total number of metadb_handles present. It's recommended to pass metadb_handles around whenever possible rather than pass playable_locations then retrieve metadb_handles on demand when needed.
p_out | Receives the metadb_handle pointer. |
p_location | Location to create a metadb_handle for. |
|
inline |
|
inline |
Definition at line 249 of file metadb.h.
void metadb::handle_create_replace_path | ( | metadb_handle_ptr & | p_out, |
const metadb_handle_ptr & | p_source, | ||
const char * | p_new_path | ||
) |
Definition at line 8 of file metadb.cpp.
void metadb::handle_create_replace_path_canonical | ( | metadb_handle_ptr & | p_out, |
const metadb_handle_ptr & | p_source, | ||
const char * | p_new_path | ||
) |
Definition at line 4 of file metadb.cpp.
void metadb::handle_replace_path_canonical | ( | metadb_handle_ptr & | p_out, |
const char * | p_new_path | ||
) |
Definition at line 14 of file metadb.cpp.
|
inlinestatic |
Definition at line 245 of file metadb.h.
|
inlinestatic |
Definition at line 243 of file metadb.h.
|
inlinestatic |
|
inlinestatic |
Definition at line 244 of file metadb.h.