Changeset 203 for trunk/include


Ignore:
Timestamp:
08/21/10 12:53:19 (14 years ago)
Author:
tim
Message:

misc fixes

stripped _REC from some data type names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/regfi.h

    r202 r203  
    553553   */
    554554  bool     data_in_offset;
    555 } REGFI_VK_REC;
     555} REGFI_VK;
    556556
    557557
     
    593593  /** The magic number for this record (should be "sk") */
    594594  uint8_t  magic[REGFI_CELL_MAGIC_SIZE];
    595 } REGFI_SK_REC;
     595} REGFI_SK;
    596596
    597597
     
    599599 * @ingroup regfiBase
    600600 */
    601 typedef struct
     601typedef struct _regfi_nk_rec
    602602{
    603603  /** Real offset of this record's cell in the file */
     
    688688  /** Virtual offset of SK record */
    689689  uint32_t sk_off;
    690 } REGFI_NK_REC;
     690} REGFI_NK;
    691691
    692692
     
    719719typedef struct _regfi_file
    720720{
    721   /* Run-time information */
    722   /************************/
    723   /* Functions for accessing the file */
    724   REGFI_RAW_FILE* cb;
    725 
    726   /* Mutex for all cb access.  This is done to prevent one thread from moving
    727    * the file offset while another thread is in the middle of a multi-read
    728    * parsing transaction */
    729   pthread_mutex_t cb_lock;
    730 
    731   /* For sanity checking (not part of the registry header) */
    732   uint32_t file_length;
    733 
    734   /* Metadata about hbins */
    735   range_list* hbins;
    736 
    737   /* Multiple read access allowed, write access is exclusive */
    738   pthread_rwlock_t hbins_lock;
    739 
    740   /* SK record cached since they're repeatedly reused */
    741   lru_cache* sk_cache;
    742 
    743   /* Need exclusive access for LRUs, since lookups make changes */
    744   pthread_mutex_t sk_lock;
    745 
    746721  /* Data parsed from file header */
    747722  /********************************/
     
    794769  uint8_t reserved2[REGFI_REGF_RESERVED2_SIZE];
    795770
     771
     772  /* Run-time information */
     773  /************************/
     774  /* Functions for accessing the file */
     775  REGFI_RAW_FILE* cb;
     776
     777  /* Mutex for all cb access.  This is done to prevent one thread from moving
     778   * the file offset while another thread is in the middle of a multi-read
     779   * parsing transaction */
     780  pthread_mutex_t cb_lock;
     781
     782  /* For sanity checking (not part of the registry header) */
     783  uint32_t file_length;
     784
     785  /* Metadata about hbins */
     786  range_list* hbins;
     787
     788  /* Multiple read access allowed, write access is exclusive */
     789  pthread_rwlock_t hbins_lock;
     790
     791  /* SK record cached since they're repeatedly reused */
     792  lru_cache* sk_cache;
     793
     794  /* Need exclusive access for LRUs, since lookups make changes */
     795  pthread_mutex_t sk_lock;
     796
    796797} REGFI_FILE;
    797798
     
    809810
    810811  /** The current key */
    811   REGFI_NK_REC* cur_key;
     812  REGFI_NK* cur_key;
    812813
    813814  /** The encoding that all strings are converted to as set during iterator
     
    826827typedef struct _regfi_iter_position
    827828{
    828   REGFI_NK_REC* nk;
     829  REGFI_NK* nk;
    829830  uint32_t cur_subkey;
    830831  /* We could store a cur_value here as well, but didn't see
     
    939940/** Frees a record previously returned by one of the API functions.
    940941 *
    941  * Can be used to free REGFI_NK_REC, REGFI_VK_REC, REGFI_SK_REC, REGFI_DATA, and
     942 * Can be used to free REGFI_NK, REGFI_VK, REGFI_SK, REGFI_DATA, and
    942943 * REGFI_CLASSNAME records.
    943944 *
     
    10701071 */
    10711072_EXPORT
    1072 const REGFI_NK_REC* regfi_iterator_cur_key(REGFI_ITERATOR* i);
     1073const REGFI_NK* regfi_iterator_cur_key(REGFI_ITERATOR* i);
    10731074
    10741075
     
    10821083 */
    10831084_EXPORT
    1084 const REGFI_SK_REC* regfi_iterator_cur_sk(REGFI_ITERATOR* i);
     1085const REGFI_SK* regfi_iterator_cur_sk(REGFI_ITERATOR* i);
    10851086
    10861087
     
    11091110 */
    11101111_EXPORT
    1111 const REGFI_NK_REC* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
     1112const REGFI_NK* regfi_iterator_cur_subkey(REGFI_ITERATOR* i);
    11121113
    11131114
     
    11631164 */
    11641165_EXPORT
    1165 const REGFI_VK_REC* regfi_iterator_cur_value(REGFI_ITERATOR* i);
     1166const REGFI_VK* regfi_iterator_cur_value(REGFI_ITERATOR* i);
    11661167
    11671168
     
    12051206_EXPORT
    12061207const REGFI_CLASSNAME* regfi_iterator_fetch_classname(REGFI_ITERATOR* i,
    1207                                                       const REGFI_NK_REC* key);
     1208                                                      const REGFI_NK* key);
    12081209
    12091210
     
    12201221_EXPORT
    12211222const REGFI_DATA* regfi_iterator_fetch_data(REGFI_ITERATOR* i,
    1222                                             const REGFI_VK_REC* value);
     1223                                            const REGFI_VK* value);
    12231224
    12241225
     
    12371238 */
    12381239_EXPORT
    1239 REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32_t offset,
     1240REGFI_NK* regfi_load_key(REGFI_FILE* file, uint32_t offset,
    12401241                             REGFI_ENCODING output_encoding,
    12411242                             bool strict);
     
    12491250 */
    12501251_EXPORT
    1251 REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32_t offset,
     1252REGFI_VK* regfi_load_value(REGFI_FILE* file, uint32_t offset,
    12521253                               REGFI_ENCODING output_encoding,
    12531254                               bool strict);
     
    13271328 */
    13281329_EXPORT
    1329 const REGFI_SK_REC* regfi_load_sk(REGFI_FILE* file, uint32_t offset,
     1330const REGFI_SK* regfi_load_sk(REGFI_FILE* file, uint32_t offset,
    13301331                                  bool strict);
    13311332
     
    13691370 */
    13701371_EXPORT
    1371 REGFI_NK_REC* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
     1372REGFI_NK* regfi_parse_nk(REGFI_FILE* file, uint32_t offset,
    13721373                             uint32_t max_size, bool strict);
    13731374
     
    13911392 */
    13921393_EXPORT
    1393 REGFI_VK_REC* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
     1394REGFI_VK* regfi_parse_vk(REGFI_FILE* file, uint32_t offset,
    13941395                             uint32_t max_size, bool strict);
    13951396
     
    14021403 */
    14031404_EXPORT
    1404 REGFI_SK_REC* regfi_parse_sk(REGFI_FILE* file, uint32_t offset,
     1405REGFI_SK* regfi_parse_sk(REGFI_FILE* file, uint32_t offset,
    14051406                             uint32_t max_size, bool strict);
    14061407
     
    14691470/*    Private Functions                                                       */
    14701471/******************************************************************************/
    1471 REGFI_NK_REC*         regfi_rootkey(REGFI_FILE* file,
     1472REGFI_NK*         regfi_rootkey(REGFI_FILE* file,
    14721473                                    REGFI_ENCODING output_encoding);
    14731474
     
    15051506void                  regfi_add_message(REGFI_FILE* file, uint16_t msg_type,
    15061507                                        const char* fmt, ...);
    1507 REGFI_NK_REC*         regfi_copy_nk(const REGFI_NK_REC* nk);
    1508 REGFI_VK_REC*         regfi_copy_vk(const REGFI_VK_REC* vk);
     1508REGFI_NK*         regfi_copy_nk(const REGFI_NK* nk);
     1509REGFI_VK*         regfi_copy_vk(const REGFI_VK* vk);
    15091510_EXPORT
    15101511int32_t               regfi_calc_maxsize(REGFI_FILE* file, uint32_t offset);
     
    15241525
    15251526_EXPORT
    1526 void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK_REC* nk,
     1527void regfi_interpret_keyname(REGFI_FILE* file, REGFI_NK* nk,
    15271528                             REGFI_ENCODING output_encoding, bool strict);
    15281529_EXPORT
    1529 void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK_REC* vk,
     1530void regfi_interpret_valuename(REGFI_FILE* file, REGFI_VK* vk,
    15301531                               REGFI_ENCODING output_encoding, bool strict);
    15311532
Note: See TracChangeset for help on using the changeset viewer.