HydrogenAudio

Hosted Forums => foobar2000 => Development - (fb2k) => Topic started by: mixcherry on 2009-09-14 13:58:14

Title: Columns UI FCL import/export
Post by: mixcherry on 2009-09-14 13:58:14
I'd like to be able to export/import my global configuration to/from FCL. My component doesn't have any instance configuration data (ie. doesn't implement get/set_config). I've implemented my dataset:

Code: [Select]
class my_dataset : public cui::fcl::dataset {
public:
    void get_name (pfc::string_base & p_out) const { p_out = "My Scripts"; }
    const GUID & get_guid () const { return my_dataset_guid; }
    const GUID & get_group () const { return cui::fcl::groups::title_scripts; }
    void get_data (stream_writer * p_writer, t_uint32 type, cui::fcl::t_export_feedback & feedback, abort_callback & p_abort) const {}
    void set_data (stream_reader * p_reader, t_size size, t_uint32 type, cui::fcl::t_import_feedback & feedback, abort_callback & p_abort) {}
};

static cui::fcl::dataset_factory<my_dataset> g_playlists_dropdown_dataset_factory;


Still, I can't see my entry when I click on "FCL Export" button in Columns UI configuration page.
Title: Columns UI FCL import/export
Post by: T.P Wang on 2009-09-14 14:37:54
I think you also need to implement uie::fcl::group
Title: Columns UI FCL import/export
Post by: mixcherry on 2009-09-14 20:52:40
Oh... I see. So, if I have 2 title scripts to export then I have to create one group implementation and two dataset implementations?
Title: Columns UI FCL import/export
Post by: musicmusic on 2009-09-14 22:50:29
Create your own group if you want a new entry in the tree.

Probably one dataset would be fine. I think I was allowing for the possibility of listing the names of all datasets associated with a group when you selected it.