00001 #ifndef REGISTRY_CONFIGURATOR_CLASS
00002 #define REGISTRY_CONFIGURATOR_CLASS
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include "opsysdll.h"
00019
00020 #include <basis/object_base.h>
00021 #include <data_struct/configurator.h>
00022
00023
00024 class byte_filer;
00025 class filename;
00026
00028
00029 class OPSYSTEM_CLASS_STYLE registry_configurator : public configurator
00030 {
00031 public:
00033 enum registry_hives {
00034 hkey_classes_root,
00035 hkey_current_user,
00036 hkey_local_machine,
00037 hkey_users,
00038 hkey_current_config,
00039
00040 HKCR = hkey_classes_root,
00041 HKCU = hkey_current_user,
00042 HKLM = hkey_local_machine,
00043 HKU = hkey_users,
00044 HKCC = hkey_current_config
00045 };
00046
00047 registry_configurator(registry_hives hive, treatment_of_defaults behavior);
00049
00051 virtual ~registry_configurator();
00052
00053 IMPLEMENT_CLASS_NAME("registry_configurator");
00054
00055 virtual bool get(const istring §ion, const istring &entry,
00056 istring &found);
00058
00061 virtual bool section_exists(const istring §ion);
00063
00064 virtual bool put(const istring §ion, const istring &entry,
00065 const istring &to_store);
00067
00070 virtual bool delete_section(const istring §ion);
00072
00073 virtual bool delete_entry(const istring §ion, const istring &entry);
00075
00076 virtual bool get_section(const istring §ion, string_table &info);
00078
00080 virtual bool put_section(const istring §ion, const string_table &info);
00082
00085 void *translate_hive(registry_hives hive);
00087
00088 istring fix_section(const istring §ion);
00090
00093 private:
00094 registry_hives _hive;
00095
00096
00097 registry_configurator(const registry_configurator &);
00098 registry_configurator &operator =(const registry_configurator &);
00099
00100 static const istring_object ®_str_fake_default();
00101 };
00102
00103 #endif
00104