config_io_callback Class Reference

#include <config_io_callback.h>

Inheritance diagram for config_io_callback:

service_base

List of all members.

Public Types

typedef config_io_callback t_interface_entrypoint
typedef config_io_callback t_interface
typedef service_base t_interface_parent

Public Member Functions

virtual void on_read ()=0
virtual void on_write (bool reset)=0

Static Public Attributes

static const GUID class_guid


Detailed Description

Implementing this interface lets you maintain your own configuration files rather than depending on the cfg_var system.
Note that you must not make assumptions about what happens first: config_io_callback::on_read(), initialization of cfg_var values or config_io_callback::on_read() in other components. Order of these things is undefined and will change with each run.
Use service_factory_single_t<myclass> to register your implementations. Do not call other people's implementations, core is responsible for doing that when appropriate.

Member Typedef Documentation

Reimplemented from service_base.


Member Function Documentation

virtual void config_io_callback::on_read (  )  [pure virtual]

Called on startup. You can read your configuration file from here.
Hint: use core_api::get_profile_path() to retrieve the path of the folder where foobar2000 configuration files are stored.

virtual void config_io_callback::on_write ( bool  reset  )  [pure virtual]

Called on shutdown. You can write your configuration file from here. Hint: use core_api::get_profile_path() to retrieve the path of the folder where foobar2000 configuration files are stored.

Parameters:
reset If set to true, our configuration is being reset, so you should wipe your files rather than rewrite them with current configuration.


Member Data Documentation

const GUID config_io_callback::class_guid [static]

Initial value:

{ 0x74497d81, 0x6158, 0x48ba, { 0x96, 0x57, 0x38, 0x6a, 0x55, 0x20, 0xd0, 0xff } }


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

Generated on Thu Aug 28 21:15:45 2008 for foobar2000 SDK by  doxygen 1.5.5