foobar2000 SDK  2015-08-03
Public Member Functions
core_version_info_v2abstract

#include <coreversion.h>

+ Inheritance diagram for core_version_info_v2:

Public Member Functions

 FB2K_MAKE_SERVICE_INTERFACE (core_version_info_v2, core_version_info)
 
virtual const char * get_name ()=0
 
virtual t_core_version_data get_version ()=0
 
virtual const char * get_version_as_text ()=0
 
bool test_version (t_uint32 major, t_uint32 minor1, t_uint32 minor2, t_uint32 minor3)
 
- Public Member Functions inherited from core_version_info
 FB2K_MAKE_SERVICE_INTERFACE_ENTRYPOINT (core_version_info)
 
virtual const char * get_version_string ()=0
 
- Public Member Functions inherited from service_base
template<typename outPtr_t >
bool cast (outPtr_t &outPtr)
 
virtual int service_add_ref ()=0 throw ()
 
virtual bool service_query (service_ptr_t< service_base > &p_out, const GUID &p_guid)
 
template<class T >
bool service_query_t (service_ptr_t< T > &p_out)
 
virtual int service_release ()=0 throw ()
 

Additional Inherited Members

- Public Types inherited from service_base
typedef service_base t_interface
 
- Static Public Member Functions inherited from core_version_info
static const char * g_get_version_string ()
 
- Protected Member Functions inherited from service_base
 service_base ()
 
 ~service_base ()
 

Detailed Description

New (0.9.4.2)

Definition at line 13 of file coreversion.h.

Member Function Documentation

core_version_info_v2::FB2K_MAKE_SERVICE_INTERFACE ( core_version_info_v2  ,
core_version_info   
)
virtual const char* core_version_info_v2::get_name ( )
pure virtual
virtual t_core_version_data core_version_info_v2::get_version ( )
pure virtual
virtual const char* core_version_info_v2::get_version_as_text ( )
pure virtual
bool core_version_info_v2::test_version ( t_uint32  major,
t_uint32  minor1,
t_uint32  minor2,
t_uint32  minor3 
)
inline

Determine whether running foobar2000 version is newer or equal to the specified version, eg. test_version(0,9,5,0) for 0.9.5.

Definition at line 20 of file coreversion.h.

20  {
21  const t_core_version_data v = get_version();
22  if (v.m_major < major) return false;
23  else if (v.m_major > major) return true;
24  // major version matches
25  else if (v.m_minor1 < minor1) return false;
26  else if (v.m_minor1 > minor1) return true;
27  // minor1 version matches
28  else if (v.m_minor2 < minor2) return false;
29  else if (v.m_minor2 > minor2) return true;
30  // minor2 version matches
31  else if (v.m_minor3 < minor3) return false;
32  else return true;
33  }
virtual t_core_version_data get_version()=0

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