00001 #ifndef _COMPONENT_H_ 00002 #define _COMPONENT_H_ 00003 00004 #include "foobar2000.h" 00005 00006 class NOVTABLE foobar2000_client 00007 { 00008 public: 00009 typedef service_factory_base* pservice_factory_base; 00010 00011 enum {FOOBAR2000_CLIENT_VERSION_COMPATIBLE = 70, FOOBAR2000_CLIENT_VERSION = 72}; //changes everytime global compatibility is broken 00012 virtual t_uint32 FB2KAPI get_version() = 0; 00013 virtual pservice_factory_base FB2KAPI get_service_list() = 0; 00014 00015 virtual void FB2KAPI get_config(stream_writer * p_stream,abort_callback & p_abort) = 0; 00016 virtual void FB2KAPI set_config(stream_reader * p_stream,abort_callback & p_abort) = 0; 00017 virtual void FB2KAPI set_library_path(const char * path,const char * name) = 0; 00018 virtual void FB2KAPI services_init(bool val) = 0; 00019 virtual bool is_debug() = 0; 00020 protected: 00021 foobar2000_client() {} 00022 ~foobar2000_client() {} 00023 }; 00024 00025 class NOVTABLE foobar2000_api 00026 { 00027 public: 00028 virtual service_class_ref FB2KAPI service_enum_find_class(const GUID & p_guid) = 0; 00029 virtual bool FB2KAPI service_enum_create(service_ptr_t<service_base> & p_out,service_class_ref p_class,t_size p_index) = 0; 00030 virtual t_size FB2KAPI service_enum_get_count(service_class_ref p_class) = 0; 00031 virtual HWND FB2KAPI get_main_window()=0; 00032 virtual bool FB2KAPI assert_main_thread()=0; 00033 virtual bool FB2KAPI is_main_thread()=0; 00034 virtual bool FB2KAPI is_shutting_down()=0; 00035 virtual pcchar FB2KAPI get_profile_path()=0; 00036 virtual bool FB2KAPI is_initializing() = 0; 00037 protected: 00038 foobar2000_api() {} 00039 ~foobar2000_api() {} 00040 }; 00041 00042 extern foobar2000_api * g_api; 00043 00044 #endif
1.5.5