Changeset 80 for trunk/include


Ignore:
Timestamp:
01/16/07 20:46:07 (18 years ago)
Author:
tim
Message:

Major API updates for regfi, and started porting reglookup to the API.

Code is non-functional, but should be soon.

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r79 r80  
    6868/* XXX: Has MS defined a REG_QWORD_BE? */
    6969/* Not a real type in the registry */
    70 #define REG_KEY                        255
     70#define REG_KEY                        0xFFFFFFFF
    7171
    7272
     
    258258
    259259
    260 
    261260typedef struct {
    262261  REGF_FILE* f;
    263   void_stack* keys;
     262  void_stack* key_positions;
     263  REGF_NK_REC* cur_key;
    264264  uint32 cur_subkey;
    265265  uint32 cur_value;
    266266} REGFI_ITERATOR;
    267267
     268
     269typedef struct {
     270  REGF_NK_REC* nk;
     271  uint32 cur_subkey;
     272  /* We could store a cur_value here as well, but didn't see
     273   * the use in it right now.
     274   */
     275} REGFI_ITER_POSITION;
     276
     277
    268278/******************************************************************************/
    269279/* Function Declarations */
     
    272282int           regfi_type_str2val(const char* str);
    273283
    274 char*         regfi_get_sacl(SEC_DESC *sec_desc);
    275 char*         regfi_get_dacl(SEC_DESC *sec_desc);
    276 char*         regfi_get_owner(SEC_DESC *sec_desc);
    277 char*         regfi_get_group(SEC_DESC *sec_desc);
    278 
    279 REGF_FILE*    regfi_open( const char *filename );
    280 int           regfi_close( REGF_FILE *r );
    281 
    282 REGF_NK_REC*  regfi_rootkey( REGF_FILE *file );
    283 /* REGF_NK_REC*  regfi_fetch_subkey( REGF_FILE *file, REGF_NK_REC *nk ); */
    284 
    285 REGFI_ITERATOR* regfi_iterator_create(REGF_FILE* fh);
    286 bool            regfi_iterator_down(REGFI_ITERATOR* i, const char* subkey_name);
     284char*         regfi_get_sacl(SEC_DESC* sec_desc);
     285char*         regfi_get_dacl(SEC_DESC* sec_desc);
     286char*         regfi_get_owner(SEC_DESC* sec_desc);
     287char*         regfi_get_group(SEC_DESC* sec_desc);
     288
     289REGF_FILE*    regfi_open(const char* filename);
     290int           regfi_close(REGF_FILE* r);
     291
     292REGF_NK_REC*  regfi_rootkey( REGF_FILE* file );
     293/* REGF_NK_REC*  regfi_fetch_subkey( REGF_FILE* file, REGF_NK_REC* nk ); */
     294
     295void            regfi_key_free(REGF_NK_REC* nk);
     296void            regfi_value_free(REGF_VK_REC* vk);
     297
     298REGFI_ITERATOR* regfi_iterator_new(REGF_FILE* fh);
     299void            regfi_iterator_free(REGFI_ITERATOR* i);
     300bool            regfi_iterator_down(REGFI_ITERATOR* i);
    287301bool            regfi_iterator_up(REGFI_ITERATOR* i);
     302bool            regfi_iterator_to_root(REGFI_ITERATOR* i);
     303
     304bool            regfi_iterator_find_subkey(REGFI_ITERATOR* i, const char* subkey_name)
     305bool            regfi_iterator_walk_path(REGFI_ITERATOR* i, const char** path);
     306REGF_NK_REC*    regfi_iterator_cur_key(REGFI_ITERATOR* i);
     307REGF_NK_REC*    regfi_iterator_first_subkey(REGFI_ITERATOR* i);
     308REGF_NK_REC*    regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
    288309REGF_NK_REC*    regfi_iterator_next_subkey(REGFI_ITERATOR* i);
     310
     311bool            regfi_iterator_find_value(REGFI_ITERATOR* i, const char* value_name);
     312REGF_VK_REC*    regfi_iterator_first_value(REGFI_ITERATOR* i);
     313REGF_VK_REC*    regfi_iterator_cur_value(REGFI_ITERATOR* i);
    289314REGF_VK_REC*    regfi_iterator_next_value(REGFI_ITERATOR* i);
    290 REGF_VK_REC*    regfi_iterator_fetch_value(REGFI_ITERATOR* i, const char* value_name);
    291 char*           regfi_iterator_curpath(REGFI_ITERATOR* i);
    292315
    293316#endif  /* _REGFI_H */
  • trunk/include/void_stack.h

    r79 r80  
    3939
    4040
     41/* XXX: need to document these interfaces */
    4142void_stack* void_stack_new(unsigned short max_size);
    4243void_stack* void_stack_copy(const void_stack* v);
    4344void_stack* void_stack_copy_reverse(const void_stack* v);
    44 void void_stack_destroy(void_stack* stack);
    45 void void_stack_destroy_deep(void_stack* stack);
     45void void_stack_free(void_stack* stack);
     46void void_stack_free_deep(void_stack* stack);
    4647unsigned short void_stack_size(void_stack* stack);
    4748void* void_stack_pop(void_stack* stack);
     
    4950const void* void_stack_cur(void_stack* stack);
    5051void_stack_iterator* void_stack_iterator_new(void_stack* stack);
    51 void void_stack_iterator_destroy(void_stack_iterator* iter);
     52void void_stack_iterator_free(void_stack_iterator* iter);
    5253const void* void_stack_iterator_next(void_stack_iterator* iter);
    5354
Note: See TracChangeset for help on using the changeset viewer.