foobar2000 SDK  2015-08-03
icon_remap.h
Go to the documentation of this file.
1 class icon_remapping : public service_base {
4 public:
8  virtual bool query(const char * p_extension,pfc::string_base & p_iconname) = 0;
9 
11 };
12 
15 public:
16  icon_remapping_impl(const char * p_extension,const char * p_iconname) : m_extension(p_extension), m_iconname(p_iconname) {}
17  bool query(const char * p_extension,pfc::string_base & p_iconname) {
18  if (pfc::stricmp_ascii(p_extension,m_extension) == 0) {
19  p_iconname = m_iconname; return true;
20  } else {
21  return false;
22  }
23  }
24 private:
25  pfc::string8 m_extension,m_iconname;
26 };
New in 0.9.5; allows your file format to use another icon than <extension>.ico when registering the f...
Definition: icon_remap.h:3
pfc::string8 m_iconname
Definition: icon_remap.h:25
FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT(icon_remapping)
Base class for all service classes. Provides interfaces for reference counter and querying for differ...
Definition: service.h:333
bool query(const char *p_extension, pfc::string_base &p_iconname)
Definition: icon_remap.h:17
int stricmp_ascii(const char *s1, const char *s2)
Standard implementation of icon_remapping.
Definition: icon_remap.h:14
icon_remapping_impl(const char *p_extension, const char *p_iconname)
Definition: icon_remap.h:16
virtual bool query(const char *p_extension, pfc::string_base &p_iconname)=0