HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: KCEII on 2008-10-16 07:11:19

Title: How to scan database?
Post by: KCEII on 2008-10-16 07:11:19
Hi. I'm somewhat new to coding - made some C++ plugins for games (HL) a few years back. I've been studying the SDK and the sample plugins.

Sorry for the newb question but how do you scan the database? I'm trying to retrieve the rg values from all the files in the database. All I know is it involves metadb...
Title: How to scan database?
Post by: Yirkha on 2008-10-16 11:06:48
library_manager::enum_items() or library_manager::get_all_items().
Title: How to scan database?
Post by: KCEII on 2008-10-17 02:27:24
Thanks. One more thing:

I'm trying to show a popup box but I can't figure out the last argument, the icon.

Code: [Select]
static_api_ptr_t<popup_message>()->g_show(s, "Information", ?);
Title: How to scan database?
Post by: foosion on 2008-10-17 07:07:45
The g_show method is static, so you should leave static_api_ptr_t out of this, i.e. just do popup_message::g_show(...). As for the icon parameter, look at the method signature in the SDK:
static void g_show(const char* p_msg, const char* p_title, t_icon p_icon) (http://foosion.foobar2000.org/doxygen/0.9.5.4/classpopup__message.html#894375544fe9efa21f2f5414bbf5da6b).

Hint: Follow the links to the type of p_icon.

Hint 2: "Information" is such a non-descriptive title for a popup message. You didn't use "Topic" as the title of this forum thread, did you? Perhaps you can think of something better.