s3-lib Move sstring_sub() to it's only user and make static
[Samba.git] / source3 / registry / reg_objects.h
bloba84bc8a80bcb4ae596595673f191c2656d3e5719
1 /*
2 Samba's Internal Registry objects
4 SMB parameters and setup
5 Copyright (C) Gerald Carter 2002-2006.
6 Copyright (C) Michael Adam 2007-2010
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
22 #ifndef _REG_OBJECTS_H /* _REG_OBJECTS_H */
23 #define _REG_OBJECTS_H
25 /* low level structure to contain registry values */
27 struct regval_blob;
29 /* container for registry values */
31 struct regval_ctr;
33 /* container for registry subkey names */
35 struct regsubkey_ctr;
37 /* The following definitions come from registry/reg_objects.c */
39 WERROR regsubkey_ctr_init(TALLOC_CTX *mem_ctx, struct regsubkey_ctr **ctr);
40 WERROR regsubkey_ctr_reinit(struct regsubkey_ctr *ctr);
41 WERROR regsubkey_ctr_set_seqnum(struct regsubkey_ctr *ctr, int seqnum);
42 int regsubkey_ctr_get_seqnum(struct regsubkey_ctr *ctr);
43 WERROR regsubkey_ctr_addkey( struct regsubkey_ctr *ctr, const char *keyname );
44 WERROR regsubkey_ctr_delkey( struct regsubkey_ctr *ctr, const char *keyname );
45 bool regsubkey_ctr_key_exists( struct regsubkey_ctr *ctr, const char *keyname );
46 int regsubkey_ctr_numkeys( struct regsubkey_ctr *ctr );
47 char* regsubkey_ctr_specific_key( struct regsubkey_ctr *ctr, uint32_t key_index );
48 WERROR regval_ctr_init(TALLOC_CTX *mem_ctx, struct regval_ctr **ctr);
49 int regval_ctr_numvals(struct regval_ctr *ctr);
50 struct regval_blob* dup_registry_value(struct regval_blob *val);
51 void free_registry_value(struct regval_blob *val);
52 uint8_t* regval_data_p(struct regval_blob *val);
53 uint32_t regval_size(struct regval_blob *val);
54 char* regval_name(struct regval_blob *val);
55 uint32_t regval_type(struct regval_blob *val);
56 struct regval_blob* regval_ctr_specific_value(struct regval_ctr *ctr,
57 uint32_t idx);
58 bool regval_ctr_key_exists(struct regval_ctr *ctr, const char *value);
59 struct regval_blob *regval_compose(TALLOC_CTX *ctx, const char *name,
60 uint32_t type,
61 const uint8_t *data_p, size_t size);
62 int regval_ctr_addvalue(struct regval_ctr *ctr, const char *name, uint32_t type,
63 const uint8_t *data_p, size_t size);
64 int regval_ctr_addvalue_sz(struct regval_ctr *ctr, const char *name, const char *data);
65 int regval_ctr_addvalue_multi_sz(struct regval_ctr *ctr, const char *name, const char **data);
66 int regval_ctr_copyvalue(struct regval_ctr *ctr, struct regval_blob *val);
67 int regval_ctr_delvalue(struct regval_ctr *ctr, const char *name);
68 struct regval_blob* regval_ctr_getvalue(struct regval_ctr *ctr,
69 const char *name);
70 int regval_ctr_get_seqnum(struct regval_ctr *ctr);
71 WERROR regval_ctr_set_seqnum(struct regval_ctr *ctr, int seqnum);
72 uint32_t regval_dword(struct regval_blob *val);
73 const char *regval_sz(struct regval_blob *val);
76 #endif /* _REG_OBJECTS_H */