openshot-audio  0.1.5
juce_WindowsRegistry.h
Go to the documentation of this file.
1 /*
2  ==============================================================================
3 
4  This file is part of the juce_core module of the JUCE library.
5  Copyright (c) 2015 - ROLI Ltd.
6 
7  Permission to use, copy, modify, and/or distribute this software for any purpose with
8  or without fee is hereby granted, provided that the above copyright notice and this
9  permission notice appear in all copies.
10 
11  THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD
12  TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN
13  NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
14  DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
15  IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
16  CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 
18  ------------------------------------------------------------------------------
19 
20  NOTE! This permissive ISC license applies ONLY to files within the juce_core module!
21  All other JUCE modules are covered by a dual GPL/commercial license, so if you are
22  using any other modules, be sure to check that you also comply with their license.
23 
24  For more details, visit www.juce.com
25 
26  ==============================================================================
27 */
28 
29 #ifndef JUCE_WINDOWSREGISTRY_H_INCLUDED
30 #define JUCE_WINDOWSREGISTRY_H_INCLUDED
31 
32 #if JUCE_WINDOWS || DOXYGEN
33 
38 class JUCE_API WindowsRegistry
39 {
40 public:
44  enum WoW64Mode
45  {
48  WoW64_Default = 0,
49 
51  WoW64_64bit = 0x100,
52 
54  WoW64_32bit = 0x200
55  };
56 
57  //==============================================================================
62  static String JUCE_CALLTYPE getValue (const String& regValuePath,
63  const String& defaultValue = String::empty,
64  WoW64Mode mode = WoW64_Default);
65 
71  static uint32 JUCE_CALLTYPE getBinaryValue (const String& regValuePath, MemoryBlock& resultData, WoW64Mode mode = WoW64_Default);
72 
76  static bool JUCE_CALLTYPE setValue (const String& regValuePath, const String& value, WoW64Mode mode = WoW64_Default);
77 
81  static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint32 value, WoW64Mode mode = WoW64_Default);
82 
86  static bool JUCE_CALLTYPE setValue (const String& regValuePath, uint64 value, WoW64Mode mode = WoW64_Default);
87 
91  static bool JUCE_CALLTYPE setValue (const String& regValuePath, const MemoryBlock& value, WoW64Mode mode = WoW64_Default);
92 
94  static bool JUCE_CALLTYPE valueExists (const String& regValuePath, WoW64Mode mode = WoW64_Default);
95 
97  static bool JUCE_CALLTYPE keyExists (const String& regValuePath, WoW64Mode mode = WoW64_Default);
98 
100  static void JUCE_CALLTYPE deleteValue (const String& regValuePath, WoW64Mode mode = WoW64_Default);
101 
103  static void JUCE_CALLTYPE deleteKey (const String& regKeyPath, WoW64Mode mode = WoW64_Default);
104 
122  static bool JUCE_CALLTYPE registerFileAssociation (const String& fileExtension,
123  const String& symbolicDescription,
124  const String& fullDescription,
125  const File& targetExecutable,
126  int iconResourceNumber,
127  bool registerForCurrentUserOnly,
128  WoW64Mode mode = WoW64_Default);
129 
130  // DEPRECATED: use the other methods with a WoW64Mode parameter of WoW64_64bit instead.
131  JUCE_DEPRECATED (static String getValueWow64 (const String&, const String& defaultValue = String::empty));
132  JUCE_DEPRECATED (static bool valueExistsWow64 (const String&));
133  JUCE_DEPRECATED (static bool keyExistsWow64 (const String&));
134 
135 private:
136  WindowsRegistry() JUCE_DELETED_FUNCTION;
137  JUCE_DECLARE_NON_COPYABLE (WindowsRegistry)
138 };
139 
140 #endif
141 #endif // JUCE_WINDOWSREGISTRY_H_INCLUDED
static const String empty
Definition: juce_String.h:152
Definition: juce_MemoryBlock.h:38
#define JUCE_CALLTYPE
Definition: juce_PlatformDefs.h:50
Definition: juce_String.h:43
#define JUCE_API
Definition: juce_StandardHeader.h:139
unsigned long long uint64
Definition: juce_MathsFunctions.h:62
unsigned int uint32
Definition: juce_MathsFunctions.h:51
#define JUCE_DELETED_FUNCTION
Definition: juce_CompilerSupport.h:133
#define JUCE_DEPRECATED(functionDef)
Definition: juce_PlatformDefs.h:319
#define JUCE_DECLARE_NON_COPYABLE(className)
Definition: juce_PlatformDefs.h:191
Definition: juce_File.h:45