-/* 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
/**
* @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
#define __REG_PARSE_INTERNAL_H
#include "includes.h"
+#include "system/iconv.h"
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
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);