Audacity  3.0.3
ConfigInterface.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  ConfigInterface.h
6 
7  Leland Lucius
8 
9  Copyright (c) 2014, Audacity Team
10  All rights reserved.
11 
12  Redistribution and use in source and binary forms, with or without
13  modification, are permitted provided that the following conditions
14  are met:
15 
16  1. Redistributions of source code must retain the above copyright
17  notice, this list of conditions and the following disclaimer.
18 
19  2. Redistributions in binary form must reproduce the above copyright
20  notice, this list of conditions and the following disclaimer in the
21  documentation and/or other materials provided with the distribution.
22 
23  3. Neither the name of the copyright holder nor the names of its
24  contributors may be used to endorse or promote products derived from
25  this software without specific prior written permission.
26 
27  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
30  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
31  COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
34  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
35  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
37  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38  POSSIBILITY OF SUCH DAMAGE.
39 
40 **********************************************************************/
41 
42 #ifndef __AUDACITY_CONFIGINTERFACE_H__
43 #define __AUDACITY_CONFIGINTERFACE_H__
44 
45 #include "Identifier.h"
46 
47 /*************************************************************************************/
56 class AUDACITY_DLL_API ConfigClientInterface /* not final */
57 {
58 public:
59  virtual ~ConfigClientInterface() {};
60 
61  virtual bool HasSharedConfigGroup(const RegistryPath & group) = 0;
62  virtual bool GetSharedConfigSubgroups(const RegistryPath & group, RegistryPaths & subgroups) = 0;
63 
64  virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval) = 0;
65  virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, int & value, int defval) = 0;
66  virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, bool & value, bool defval) = 0;
67  virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, float & value, float defval) = 0;
68  virtual bool GetSharedConfig(const RegistryPath & group, const RegistryPath & key, double & value, double defval) = 0;
69 
70  virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
71  virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
72  virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
73  virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
74  virtual bool SetSharedConfig(const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
75 
76  virtual bool RemoveSharedConfigSubgroup(const RegistryPath & group) = 0;
77  virtual bool RemoveSharedConfig(const RegistryPath & group, const RegistryPath & key) = 0;
78 
79  virtual bool HasPrivateConfigGroup(const RegistryPath & group) = 0;
80  virtual bool GetPrivateConfigSubgroups(const RegistryPath & group, RegistryPaths &subgroups) = 0;
81 
82  virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, wxString & value, const wxString & defval) = 0;
83  virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, int & value, int defval) = 0;
84  virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, bool & value, bool defval) = 0;
85  virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, float & value, float defval) = 0;
86  virtual bool GetPrivateConfig(const RegistryPath & group, const RegistryPath & key, double & value, double defval) = 0;
87 
88  virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const wxString & value) = 0;
89  virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const int & value) = 0;
90  virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const bool & value) = 0;
91  virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const float & value) = 0;
92  virtual bool SetPrivateConfig(const RegistryPath & group, const RegistryPath & key, const double & value) = 0;
93 
94  virtual bool RemovePrivateConfigSubgroup(const RegistryPath & group) = 0;
95  virtual bool RemovePrivateConfig(const RegistryPath & group, const RegistryPath & key) = 0;
96 };
97 
98 #if 0
99 /*************************************************************************************/
106 class ConfigHostInterface
107 {
108 public:
109  virtual ~ConfigHostInterface() {};
110 
111 };
112 #endif
113 
114 #endif // __AUDACITY_CONFIGINTERFACE_H__
ConfigClientInterface::GetSharedConfigSubgroups
virtual bool GetSharedConfigSubgroups(const RegistryPath &group, RegistryPaths &subgroups)=0
ConfigClientInterface::SetPrivateConfig
virtual bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const double &value)=0
RegistryPaths
std::vector< RegistryPath > RegistryPaths
Definition: Identifier.h:219
ConfigClientInterface::~ConfigClientInterface
virtual ~ConfigClientInterface()
Definition: ConfigInterface.h:59
ConfigClientInterface::HasSharedConfigGroup
virtual bool HasSharedConfigGroup(const RegistryPath &group)=0
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, int &value, int defval)=0
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const double &value)=0
ConfigClientInterface::SetPrivateConfig
virtual bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const float &value)=0
ConfigClientInterface
ConfigClientInterface is an unholy get/set configuration class, which differentiates between private ...
Definition: ConfigInterface.h:57
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const bool &value)=0
ConfigClientInterface::RemoveSharedConfigSubgroup
virtual bool RemoveSharedConfigSubgroup(const RegistryPath &group)=0
ConfigClientInterface::RemovePrivateConfigSubgroup
virtual bool RemovePrivateConfigSubgroup(const RegistryPath &group)=0
Identifier.h
ConfigClientInterface::SetPrivateConfig
virtual bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const bool &value)=0
ConfigClientInterface::GetPrivateConfig
virtual bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, double &value, double defval)=0
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval)=0
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const int &value)=0
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, bool &value, bool defval)=0
RegistryPath
wxString RegistryPath
Definition: Identifier.h:218
ConfigClientInterface::RemovePrivateConfig
virtual bool RemovePrivateConfig(const RegistryPath &group, const RegistryPath &key)=0
ConfigClientInterface::HasPrivateConfigGroup
virtual bool HasPrivateConfigGroup(const RegistryPath &group)=0
key
static const AudacityProject::AttachedObjects::RegisteredFactory key
Definition: CommandManager.cpp:196
ConfigClientInterface::SetPrivateConfig
virtual bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const wxString &value)=0
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const float &value)=0
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, float &value, float defval)=0
ConfigClientInterface::SetSharedConfig
virtual bool SetSharedConfig(const RegistryPath &group, const RegistryPath &key, const wxString &value)=0
ConfigClientInterface::GetSharedConfig
virtual bool GetSharedConfig(const RegistryPath &group, const RegistryPath &key, double &value, double defval)=0
ConfigClientInterface::GetPrivateConfig
virtual bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, bool &value, bool defval)=0
ConfigClientInterface::GetPrivateConfig
virtual bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, int &value, int defval)=0
ConfigClientInterface::SetPrivateConfig
virtual bool SetPrivateConfig(const RegistryPath &group, const RegistryPath &key, const int &value)=0
ConfigClientInterface::GetPrivateConfigSubgroups
virtual bool GetPrivateConfigSubgroups(const RegistryPath &group, RegistryPaths &subgroups)=0
ConfigClientInterface::GetPrivateConfig
virtual bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, wxString &value, const wxString &defval)=0
ConfigClientInterface::GetPrivateConfig
virtual bool GetPrivateConfig(const RegistryPath &group, const RegistryPath &key, float &value, float defval)=0
ConfigClientInterface::RemoveSharedConfig
virtual bool RemoveSharedConfig(const RegistryPath &group, const RegistryPath &key)=0