2005-05-23 20:25:31 +04:00
/*
2006-09-27 23:03:54 +04:00
Samba ' s Internal Registry objects
2005-05-23 20:25:31 +04:00
SMB parameters and setup
2006-09-27 23:03:54 +04:00
Copyright ( C ) Gerald Carter 2002 - 2006.
2010-05-25 12:53:17 +04:00
Copyright ( C ) Michael Adam 2007 - 2010
2005-05-23 20:25:31 +04:00
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
2007-07-09 23:25:36 +04:00
the Free Software Foundation ; either version 3 of the License , or
2005-05-23 20:25:31 +04:00
( at your option ) any later version .
This program is distributed in the hope that it will be useful ,
but WITHOUT ANY WARRANTY ; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE . See the
GNU General Public License for more details .
You should have received a copy of the GNU General Public License
2007-07-10 04:52:41 +04:00
along with this program . If not , see < http : //www.gnu.org/licenses/>.
2005-05-23 20:25:31 +04:00
*/
# ifndef _REG_OBJECTS_H /* _REG_OBJECTS_H */
# define _REG_OBJECTS_H
2009-03-24 01:18:26 +03:00
/* low level structure to contain registry values */
2005-05-23 20:25:31 +04:00
2010-05-24 02:05:26 +04:00
struct regval_blob ;
2005-05-23 20:25:31 +04:00
/* container for registry values */
2010-05-24 02:05:26 +04:00
struct regval_ctr ;
2005-05-23 20:25:31 +04:00
/* container for registry subkey names */
2009-02-25 02:33:24 +03:00
struct regsubkey_ctr ;
2005-05-23 20:25:31 +04:00
2009-10-02 02:17:06 +04:00
/* The following definitions come from registry/reg_objects.c */
WERROR regsubkey_ctr_init ( TALLOC_CTX * mem_ctx , struct regsubkey_ctr * * ctr ) ;
WERROR regsubkey_ctr_reinit ( struct regsubkey_ctr * ctr ) ;
WERROR regsubkey_ctr_set_seqnum ( struct regsubkey_ctr * ctr , int seqnum ) ;
int regsubkey_ctr_get_seqnum ( struct regsubkey_ctr * ctr ) ;
WERROR regsubkey_ctr_addkey ( struct regsubkey_ctr * ctr , const char * keyname ) ;
WERROR regsubkey_ctr_delkey ( struct regsubkey_ctr * ctr , const char * keyname ) ;
bool regsubkey_ctr_key_exists ( struct regsubkey_ctr * ctr , const char * keyname ) ;
int regsubkey_ctr_numkeys ( struct regsubkey_ctr * ctr ) ;
2010-05-25 12:32:51 +04:00
char * regsubkey_ctr_specific_key ( struct regsubkey_ctr * ctr , uint32_t key_index ) ;
2010-05-24 00:47:53 +04:00
WERROR regval_ctr_init ( TALLOC_CTX * mem_ctx , struct regval_ctr * * ctr ) ;
2009-10-02 02:17:06 +04:00
int regval_ctr_numvals ( struct regval_ctr * ctr ) ;
2010-05-25 12:32:51 +04:00
uint8_t * regval_data_p ( struct regval_blob * val ) ;
uint32_t regval_size ( struct regval_blob * val ) ;
2009-10-02 02:17:06 +04:00
char * regval_name ( struct regval_blob * val ) ;
2010-05-25 12:32:51 +04:00
uint32_t regval_type ( struct regval_blob * val ) ;
2009-10-02 02:17:06 +04:00
struct regval_blob * regval_ctr_specific_value ( struct regval_ctr * ctr ,
2010-05-25 12:32:51 +04:00
uint32_t idx ) ;
2012-03-30 16:39:50 +04:00
struct regval_blob * regval_ctr_value_byname ( struct regval_ctr * ctr ,
const char * value ) ;
2012-03-30 16:33:39 +04:00
bool regval_ctr_value_exists ( struct regval_ctr * ctr , const char * value ) ;
2009-10-02 02:17:06 +04:00
struct regval_blob * regval_compose ( TALLOC_CTX * ctx , const char * name ,
2010-07-01 13:22:20 +04:00
uint32_t type ,
2010-05-25 12:32:51 +04:00
const uint8_t * data_p , size_t size ) ;
2010-07-01 13:22:20 +04:00
int regval_ctr_addvalue ( struct regval_ctr * ctr , const char * name , uint32_t type ,
2010-05-25 12:32:51 +04:00
const uint8_t * data_p , size_t size ) ;
2009-10-02 02:17:06 +04:00
int regval_ctr_addvalue_sz ( struct regval_ctr * ctr , const char * name , const char * data ) ;
int regval_ctr_addvalue_multi_sz ( struct regval_ctr * ctr , const char * name , const char * * data ) ;
int regval_ctr_copyvalue ( struct regval_ctr * ctr , struct regval_blob * val ) ;
int regval_ctr_delvalue ( struct regval_ctr * ctr , const char * name ) ;
struct regval_blob * regval_ctr_getvalue ( struct regval_ctr * ctr ,
const char * name ) ;
2010-05-24 00:53:44 +04:00
int regval_ctr_get_seqnum ( struct regval_ctr * ctr ) ;
2010-05-24 00:55:12 +04:00
WERROR regval_ctr_set_seqnum ( struct regval_ctr * ctr , int seqnum ) ;
2009-10-02 02:17:06 +04:00
2006-12-01 23:01:09 +03:00
# endif /* _REG_OBJECTS_H */