2 * Samba Unix/Linux SMB client library
4 * Copyright (C) Christopher Davis 2012
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
23 struct registry_context
;
24 struct security_token
;
27 struct samba3_registry_key
{
28 struct registry_key
*key
;
31 WERROR
reg_openhive_wrap(TALLOC_CTX
*ctx
, const char *hive
,
32 struct samba3_registry_key
*key
);
33 WERROR
reg_openkey_wrap(TALLOC_CTX
*ctx
, struct samba3_registry_key
*parent
,
34 const char *name
, struct samba3_registry_key
*key
);
35 WERROR
reg_enumvalue_wrap(TALLOC_CTX
*ctx
, struct samba3_registry_key
*key
,
36 uint32_t idx
, char **name
, uint32_t *type
,
38 WERROR
reg_queryvalue_wrap(TALLOC_CTX
*ctx
, struct samba3_registry_key
*key
,
39 const char *name
, uint32_t *type
, DATA_BLOB
*data
);
40 WERROR
reg_enumkey_wrap(TALLOC_CTX
*ctx
, struct samba3_registry_key
*key
,
41 uint32_t idx
, char **name
, NTTIME
*last_write_time
);
42 WERROR
reg_createkey_wrap(TALLOC_CTX
*ctx
, struct samba3_registry_key
*parent
,
43 const char *subkeypath
,
44 struct samba3_registry_key
*pkey
);
45 WERROR
reg_deletekey_wrap(struct samba3_registry_key
*parent
,
47 WERROR
reg_deletevalue_wrap(struct samba3_registry_key
*key
, const char *name
);
48 WERROR
reg_queryinfokey_wrap(struct samba3_registry_key
*key
,
49 uint32_t *num_subkeys
, uint32_t *max_subkeylen
,
50 uint32_t *max_subkeysize
, uint32_t *num_values
,
51 uint32_t *max_valnamelen
,
52 uint32_t *max_valbufsize
, uint32_t *secdescsize
,
53 NTTIME
*last_changed_time
);
54 WERROR
reg_setvalue_wrap(struct samba3_registry_key
*key
, const char *name
,
55 uint32_t type
, const DATA_BLOB data
);
56 WERROR
reg_init_wrap(void);
58 WERROR
reg_open_samba3(TALLOC_CTX
*mem_ctx
, struct registry_context
**ctx
);
60 int regedit_getch(void);
62 typedef bool (*regedit_search_match_fn_t
)(const char *, const char *);
64 struct regedit_search_opts
{
66 regedit_search_match_fn_t match
;
69 bool search_recursive
;
73 #define PAIR_YELLOW_CYAN 1
74 #define PAIR_BLACK_CYAN 2
75 #define PAIR_YELLOW_BLUE 3