2
0

RegistryManager.h 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. /*
  2. ** Command & Conquer Renegade(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. /***********************************************************************************************
  19. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Installer *
  23. * *
  24. * $Archive:: /Commando/Code/Installer/RegistryManager.h $*
  25. * *
  26. * $Author:: Ian_l $*
  27. * *
  28. * $Modtime:: 11/25/01 2:35p $*
  29. * *
  30. * $Revision:: 6 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #ifndef _REGISTRY_MANAGER_H
  36. #define _REGISTRY_MANAGER_H
  37. // Includes
  38. #include "Registry.h"
  39. // Forward declarations.
  40. class StringClass;
  41. class RegistryManagerClass {
  42. public:
  43. enum WOLComponentEnum {
  44. COMPONENT_FIRST = 0,
  45. WOLAPI_COMPONENT = COMPONENT_FIRST,
  46. WOLREGISTER_COMPONENT,
  47. WOLBROWSER_COMPONENT,
  48. COMPONENT_COUNT
  49. };
  50. RegistryManagerClass();
  51. bool Get_Folder_Path (WideStringClass &path);
  52. bool Get_Desktop_Path (WideStringClass &path);
  53. bool Get_Target_Game_Pathname (WideStringClass &path);
  54. bool Get_Target_Game_Path (WideStringClass &path);
  55. bool Get_Target_Game_Folder (WideStringClass &folder);
  56. bool Get_Target_WOL_Pathname (WOLComponentEnum wolcomponent, WideStringClass &pathname);
  57. bool Get_Target_WOL_Path (WOLComponentEnum wolcomponent, WideStringClass &path);
  58. bool Get_Target_WOL_Folder (WOLComponentEnum wolcomponent, WideStringClass &folder);
  59. bool Get_Target_WOL_Version (WOLComponentEnum wolcomponent, DWORD &version);
  60. bool Use_IGR_Settings (bool &useigrsettings);
  61. void Register_Game (const WideStringClass &name,
  62. const WideStringClass &installpathname,
  63. const WideStringClass &folderpath,
  64. const WideStringClass &desktopshortcutpathname,
  65. DWORD languageid,
  66. const StringClass &serialnumber,
  67. DWORD sku,
  68. DWORD version);
  69. void Register_WOLAPI (const WideStringClass &folderpath,
  70. const WideStringClass &installpathname,
  71. const WideStringClass &name,
  72. DWORD sku,
  73. DWORD version,
  74. bool useigrsettings);
  75. void Update_WOLAPI();
  76. void Register_WOLRegister (const WideStringClass &folderpath,
  77. const WideStringClass &installpathname,
  78. const WideStringClass &name,
  79. DWORD sku,
  80. DWORD version);
  81. void Register_WOLBrowser (const WideStringClass &installpathname,
  82. const WideStringClass &name,
  83. DWORD version);
  84. bool Get_WOL_Account (unsigned index, WideStringClass &name, WideStringClass &password);
  85. void Set_Preferred_WOL_Account (const WideStringClass &accountname);
  86. bool Get_Document_Application_Pathname (WideStringClass &pathname);
  87. protected:
  88. bool _cdecl Get_String (HKEY rootkey, WideStringClass *string, ...);
  89. bool _cdecl Get_Value (HKEY rootkey, DWORD *value, ...);
  90. bool _cdecl Set_String (HKEY rootkey, const WCHAR *string, ...);
  91. bool _cdecl Set_Value (HKEY rootkey, DWORD value, ...);
  92. bool _cdecl Get_Key (HKEY rootkey, DWORD keyindex, StringClass *keyname, ...);
  93. char *WOLKeys [COMPONENT_COUNT];
  94. };
  95. // Singleton.
  96. extern RegistryManagerClass _RegistryManager;
  97. #endif // REGISTRY_MANAGER_H