IGR.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. ** Command & Conquer Generals(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. // IGR.h - A class used to access the IGR registry settings.
  20. //
  21. // JeffB 7/5/00
  22. //
  23. //
  24. // Registry Path
  25. //
  26. #define WOLAPI_REG_KEY_TOP "HKEY_LOCAL_MACHINE"
  27. #define WOLAPI_REG_KEY_WOLAPI "SOFTWARE\\Westwood\\WOLAPI"
  28. #define WOLAPI_REG_KEY_BOTTOM WOLAPI_REG_KEY_WOLAPI "\\"
  29. #define WOLAPI_REG_KEY_OPTIONS "Options"
  30. #define WOLAPI_REG_KEY WOLAPI_REG_KEY_TOP "\\" WOLAPI_REG_KEY_BOTTOM
  31. #define WOLAPI_KEY "WOLAPI"
  32. //
  33. // Option Bits for Options key
  34. //
  35. #define IGR_NO_AUTO_LOGIN 0x01
  36. #define IGR_NEVER_STORE_NICKS 0x02
  37. #define IGR_NEVER_RUN_REG_APP 0x04
  38. #define IGR_ALL IGR_NO_AUTO_LOGIN | IGR_NEVER_STORE_NICKS | IGR_NEVER_RUN_REG_APP
  39. #define IGR_NONE 0x00
  40. typedef unsigned int IGROptionsType;
  41. class IGROptionsClass
  42. {
  43. public:
  44. // Constructor
  45. IGROptionsClass( void ) : valid( false ), options( 0 ) {};
  46. // Destructor
  47. ~IGROptionsClass( void ) {};
  48. // Initialize. Read value(s) from registry
  49. bool Init( void );
  50. // Check various options
  51. bool Is_Auto_Login_Allowed( void );
  52. bool Is_Storing_Nicks_Allowed( void );
  53. bool Is_Running_Reg_App_Allowed( void );
  54. // Set various options
  55. bool Set_Options( IGROptionsType options );
  56. private:
  57. // Private options
  58. IGROptionsType options;
  59. // Is the data valid?
  60. bool valid;
  61. };
  62. extern IGROptionsClass *OnlineOptions;