foobar2000 SDK  2015-08-03
advconfig.cpp
Go to the documentation of this file.
1 #include "foobar2000.h"
2 
3 
5  {
6  advconfig_entry_string_v2::ptr ex;
7  if (service_query_t(ex)) return ex->get_preferences_flags();
8  }
9  {
10  advconfig_entry_checkbox_v2::ptr ex;
11  if (service_query_t(ex)) return ex->get_preferences_flags();
12  }
13  return 0;
14 }
15 
17  {
18  advconfig_entry_checkbox_v2::ptr ex;
19  if (service_query_t(ex)) return ex->get_default_state();
20  }
21 
22  bool backup = get_state();
23  reset();
24  bool rv = get_state();
25  set_state(backup);
26  return rv;
27 }
28 
30  {
31  advconfig_entry_string_v2::ptr ex;
32  if (service_query_t(ex)) {ex->get_default_state(out); return;}
33  }
34  pfc::string8 backup;
35  get_state(backup);
36  reset();
37  get_state(out);
38  set_state(backup);
39 }
t_uint32 get_preferences_flags_()
Definition: advconfig.cpp:4
bool get_default_state_()
Definition: advconfig.cpp:16
virtual void reset()=0
bool service_query_t(service_ptr_t< T > &p_out)
Queries whether the object supports specific interface and retrieves a pointer to that interface...
Definition: service.h:350
void get_default_state_(pfc::string_base &out)
Definition: advconfig.cpp:29
uint32_t t_uint32
Definition: int_types.h:5