Changeset 161 for trunk/include
- Timestamp:
- 12/07/09 12:01:22 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfi.h
r160 r161 60 60 #define REGFI_MSG_WARN 0x0004 61 61 #define REGFI_MSG_ERROR 0x0010 62 63 typedef uint8 REGFI_ENCODING; 64 /* regfi library supported character encodings */ 65 #define REGFI_ENCODING_ASCII 0 66 #define REGFI_ENCODING_UTF8 1 67 #define REGFI_ENCODING_DEFAULT REGFI_ENCODING_ASCII 68 /* UTF16LE is not supported for output */ 69 #define REGFI_ENCODING_UTF16LE 2 70 71 #define REGFI_NUM_ENCODINGS 3 62 72 63 73 /* Windows is lame */ … … 360 370 361 371 /* header information */ 362 uint16 key_type;372 uint16 flags; 363 373 uint8 magic[REGFI_CELL_MAGIC_SIZE]; 364 374 NTTIME mtime; … … 479 489 void_stack* key_positions; 480 490 REGFI_NK_REC* cur_key; 481 const char*string_encoding;491 REGFI_ENCODING string_encoding; 482 492 uint32 cur_subkey; 483 493 uint32 cur_value; … … 529 539 * file -- The opened registry file the iterator should be 530 540 * created for. 531 * output_encoding -- An integer representing the output string encoding.532 * These integers currently map to a specific set of533 * iconv(3) encodings.541 * output_encoding -- Character encoding that strings should be returned in. 542 * Only supply the REGFI_ENCODING_* constants, as others 543 * will be rejected. 534 544 * The following values are currently accepted: 535 * 0 - default (currently US-ASCII//TRANSLIT)536 * 1 - US-ASCII//TRANSLIT537 * 2 - UTF-8//TRANSLIT545 * REGFI_ENCODING_DEFAULT (currently REGFI_ENCODING_ASCII) 546 * REGFI_ENCODING_ASCII 547 * REGFI_ENCODING_UTF8 538 548 * 539 549 * XXX: This encoding only applies to specific data … … 545 555 */ 546 556 REGFI_ITERATOR* regfi_iterator_new(REGFI_FILE* file, 547 uint32output_encoding);557 REGFI_ENCODING output_encoding); 548 558 void regfi_iterator_free(REGFI_ITERATOR* i); 549 559 bool regfi_iterator_down(REGFI_ITERATOR* i); … … 578 588 /********************************************************/ 579 589 REGFI_NK_REC* regfi_load_key(REGFI_FILE* file, uint32 offset, 590 REGFI_ENCODING output_encoding, 580 591 bool strict); 581 592 REGFI_VK_REC* regfi_load_value(REGFI_FILE* file, uint32 offset, … … 597 608 bool strict); 598 609 bool regfi_interpret_data(REGFI_FILE* file, 599 const char*string_encoding,610 REGFI_ENCODING string_encoding, 600 611 uint32 type, REGFI_DATA* data); 601 612 void regfi_free_classname(REGFI_CLASSNAME* classname); … … 666 677 /* Private Functions */ 667 678 /************************************/ 668 REGFI_NK_REC* regfi_rootkey(REGFI_FILE* file); 679 REGFI_NK_REC* regfi_rootkey(REGFI_FILE* file, 680 REGFI_ENCODING output_encoding); 669 681 void regfi_subkeylist_free(REGFI_SUBKEY_LIST* list); 670 682 uint32 regfi_read(int fd, uint8* buf, uint32* length); … … 689 701 REGFI_VK_REC* regfi_copy_vk(const REGFI_VK_REC* vk); 690 702 int32 regfi_calc_maxsize(REGFI_FILE* file, uint32 offset); 691 int32 regfi_conv_charset(const char* output_charset, 703 int32 regfi_conv_charset(const char* input_charset, 704 const char* output_charset, 692 705 uint8* input, char* output, 693 706 uint32 input_len, uint32 output_max);
Note: See TracChangeset
for help on using the changeset viewer.