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