ldb: Build lmdb backend also in non-AD case
[samba.git] / source3 / registry / reg_parse_internal.h
index 153d48cb3185517cff7143d5445080d6c796c8d7..a896372046bf928705a62f55575e6bcfb526731e 100644 (file)
@@ -1,4 +1,9 @@
-/* Samba Unix/Linux SMB client library
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * Registry helper routines
+ *
+ * Copyright (C) Gregor Beck 2010
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -16,7 +21,7 @@
 
 /**
  * @brief  Some stuff used by reg_parse and reg_format.
- * It might be usefull elsewehre but need some review of the interfaces.
+ * It might be useful elsewhere but need some review of the interfaces.
  * @file   reg_parse_internal.h
  * @author Gregor Beck <gb@sernet.de>
  * @date   Sep 2010
@@ -25,6 +30,7 @@
 #define __REG_PARSE_INTERNAL_H
 
 #include "includes.h"
+#include "system/iconv.h"
 
 struct cbuf;
 
@@ -32,7 +38,7 @@ struct cbuf;
 #if defined USE_NATIVE_ICONV && defined HAVE_NATIVE_ICONV
 #  define smb_iconv_t     iconv_t
 #  define smb_iconv(CD, IPTR, ILEN, OPTR, OLEN) \
-       iconv(CD, (char**)(IPTR), ILEN, OPTR, OLEN)
+       iconv(CD, discard_const_p(char*, (IPTR)), ILEN, OPTR, OLEN)
 #  define smb_iconv_open  iconv_open
 #  define smb_iconv_close iconv_close
 #endif
@@ -50,9 +56,24 @@ struct hive_info {
        size_t long_name_len;
 };
 
-const struct hive_info* hive_info(const char* name, int nlen);
+extern const struct hive_info HIVE_INFO_HKLM;
+extern const struct hive_info HIVE_INFO_HKCU;
+extern const struct hive_info HIVE_INFO_HKCR;
+extern const struct hive_info HIVE_INFO_HKU;
+extern const struct hive_info HIVE_INFO_HKCC;
+extern const struct hive_info HIVE_INFO_HKDD;
+extern const struct hive_info HIVE_INFO_HKPD;
+extern const struct hive_info HIVE_INFO_HKPT;
+extern const struct hive_info HIVE_INFO_HKPN;
+
+extern const struct hive_info* HIVE_INFO[];
+
+const struct hive_info* hive_info(const char* name);
+bool srprs_hive(const char** ptr, const struct hive_info** result);
+
+
 
-const char* get_charset(const char* c);
+const char *smbreg_get_charset(const char *c);
 
 bool set_iconv(smb_iconv_t* t, const char* to, const char* from);