s3-docs: Fix typos.
[Samba/gbeck.git] / source3 / registry / reg_api.h
blob41c4792e590c5250c9a4ea78da6aef9f306bc1f6
1 /*
2 * Unix SMB/CIFS implementation.
4 * Virtual Windows Registry Layer
6 * Copyright (C) Volker Lendecke 2006
7 * Copyright (C) Michael Adam 2007-2010
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 3 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, see <http://www.gnu.org/licenses/>.
23 #ifndef _REG_API_H
24 #define _REG_API_H
26 WERROR reg_openhive(TALLOC_CTX *mem_ctx, const char *hive,
27 uint32 desired_access,
28 const struct security_token *token,
29 struct registry_key **pkey);
30 WERROR reg_openkey(TALLOC_CTX *mem_ctx, struct registry_key *parent,
31 const char *name, uint32 desired_access,
32 struct registry_key **pkey);
33 WERROR reg_enumkey(TALLOC_CTX *mem_ctx, struct registry_key *key,
34 uint32 idx, char **name, NTTIME *last_write_time);
35 WERROR reg_enumvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
36 uint32 idx, char **pname, struct registry_value **pval);
37 WERROR reg_queryvalue(TALLOC_CTX *mem_ctx, struct registry_key *key,
38 const char *name, struct registry_value **pval);
39 WERROR reg_querymultiplevalues(TALLOC_CTX *mem_ctx,
40 struct registry_key *key,
41 uint32_t num_names,
42 const char **names,
43 uint32_t *pnum_vals,
44 struct registry_value **pvals);
45 WERROR reg_queryinfokey(struct registry_key *key, uint32_t *num_subkeys,
46 uint32_t *max_subkeylen, uint32_t *max_subkeysize,
47 uint32_t *num_values, uint32_t *max_valnamelen,
48 uint32_t *max_valbufsize, uint32_t *secdescsize,
49 NTTIME *last_changed_time);
50 WERROR reg_createkey(TALLOC_CTX *ctx, struct registry_key *parent,
51 const char *subkeypath, uint32 desired_access,
52 struct registry_key **pkey,
53 enum winreg_CreateAction *paction);
54 WERROR reg_deletekey(struct registry_key *parent, const char *path);
55 WERROR reg_setvalue(struct registry_key *key, const char *name,
56 const struct registry_value *val);
57 WERROR reg_deletevalue(struct registry_key *key, const char *name);
58 WERROR reg_getkeysecurity(TALLOC_CTX *mem_ctx, struct registry_key *key,
59 struct security_descriptor **psecdesc);
60 WERROR reg_setkeysecurity(struct registry_key *key,
61 struct security_descriptor *psecdesc);
62 WERROR reg_getversion(uint32_t *version);
63 WERROR reg_deleteallvalues(struct registry_key *key);
64 WERROR reg_deletekey_recursive(struct registry_key *parent,
65 const char *path);
66 WERROR reg_deletesubkeys_recursive(struct registry_key *parent,
67 const char *path);
70 #endif /* _REG_API_H */