Changeset 185 for trunk/include
- Timestamp:
- 03/22/10 22:22:07 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/regfi.h
r184 r185 48 48 * 49 49 * Most users will find that a combination of the Base Layer and the Iterator Layer 50 * will be sufficient for accessing registry hive files. Those who are wil ing50 * will be sufficient for accessing registry hive files. Those who are willing 51 51 * to dive deep into registry data structures, for instance to recover deleted 52 52 * data structures or to research Windows registry behavior in detail, will … … 79 79 80 80 81 82 81 83 /******************************************************************************/ 82 84 /* Constants for use while interacting with the library */ … … 87 89 #define REGFI_LOG_WARN 0x0004 88 90 #define REGFI_LOG_ERROR 0x0010 91 #define REGFI_DEFAULT_LOG_MASK REGFI_LOG_ERROR|REGFI_LOG_WARN 89 92 90 93 typedef uint8_t REGFI_ENCODING; … … 146 149 147 150 /* Global thread-local storage key */ 148 pthread_key_t REGFI_LOG_KEY;151 pthread_key_t regfi_log_key; 149 152 150 153 /* Header sizes and magic number lengths for various records */ … … 877 880 878 881 879 /** Enables regfi library logging for the current thread.880 *881 * XXX: finish documenting882 *883 * @ingroup regfiBase884 */885 void regfi_log_start(uint16_t mask);886 887 888 882 /** Get errors, warnings, and/or verbose information relating to processing of 889 883 * the given registry file. … … 896 890 897 891 898 /** Set the verbosity level of errors and warnings generated by the library 899 * (as accessible via regfi_get_messages). 900 * 901 * This may be called at any time and will take effect immediately. 902 * 903 * @param mask an integer representing the types of messages desired. 892 /** Set the verbosity level of messages generated by the library for the 893 * current thread. 894 * 895 * @param mask An integer representing the types of messages desired. 904 896 * Acceptable values are created through bitwise ORs of 905 * REGFI_ MSG_* values. For instance, if only errors and897 * REGFI_LOG_* values. For instance, if only errors and 906 898 * informational messages were desired (but not warnings), 907 * then one would specify: REGFI_MSG_ERROR|REGFI_MSG_INFO 908 * New REGFI_FILE structures are created with: 909 * REGFI_MSG_ERROR|REGFI_MSG_WARN 910 * Note that error and warning messages will continue to 911 * accumulate in memory if they are not fetched using 912 * regfi_get_messages and then freed by the caller. 913 * To disable error messages entirely, supply 0, which 914 * will prevent message accumulation. 899 * then one would specify: REGFI_LOG_ERROR|REGFI_LOG_INFO 900 * By default the message mask is: REGFI_LOG_ERROR|REGFI_LOG_WARN. 901 * 902 * @return true on success and false on failure. Failure occurs if 903 * underlying pthread functions fail. errno is set in this case. 904 * 905 * Message masks are set in a thread-specific way. If one were to set a message 906 * mask in one thread and then spawn a new thread, then the new thread will have 907 * it's message mask reset to the default. This function may be called at any 908 * time and will take effect immediately for the current thread. 909 * 910 * @note When a non-zero message mask is set, messages will 911 * accumulate in memory without limit if they are not fetched using 912 * @ref regfi_get_log_str and subsequently freed by the caller. It is 913 * recommended that messsages be fetched after each regfi API call in 914 * order to provide the most context. 915 915 * 916 916 * @ingroup regfiBase 917 917 */ 918 void regfi_log_set_mask(uint16_t mask); 919 920 921 /** Disables regfi library logging for the current thread. 922 * 923 * XXX: finish documenting 924 * 925 * @ingroup regfiBase 926 */ 927 void regfi_log_stop(); 918 bool regfi_log_set_mask(uint16_t mask); 928 919 929 920 … … 1077 1068 * subkey, or NULL on failure. Failure may be due to a lack of any 1078 1069 * subkeys or other errors. Newly allocated keys must be freed with 1079 * regfi_free_record.1070 * @ref regfi_free_record. 1080 1071 * 1081 1072 * @ingroup regfiIteratorLayer … … 1090 1081 * @return A newly allocated key structure for the currently referenced subkey, 1091 1082 * or NULL on failure. Newly allocated keys must be freed with 1092 * regfi_free_record.1083 * @ref regfi_free_record. 1093 1084 * 1094 1085 * @ingroup regfiIteratorLayer … … 1103 1094 * 1104 1095 * @return A newly allocated key structure for the next subkey or NULL on 1105 * failure. Newly allocated keys must be freed with regfi_free_record. 1096 * failure. Newly allocated keys must be freed with 1097 * @ref regfi_free_record. 1106 1098 * 1107 1099 * @ingroup regfiIteratorLayer … … 1132 1124 * value, or NULL on failure. Failure may be due to a lack of any 1133 1125 * values or other errors. Newly allocated keys must be freed with 1134 * regfi_free_record.1126 * @ref regfi_free_record. 1135 1127 * 1136 1128 * @ingroup regfiIteratorLayer … … 1145 1137 * @return A newly allocated value structure for the currently referenced value, 1146 1138 * or NULL on failure. Newly allocated values must be freed with 1147 * regfi_free_record.1139 * @ref regfi_free_record. 1148 1140 * 1149 1141 * @ingroup regfiIteratorLayer … … 1158 1150 * 1159 1151 * @return A newly allocated key structure for the next value or NULL on 1160 * failure. Newly allocated keys must be freed with regfi_free_record. 1152 * failure. Newly allocated keys must be freed with 1153 * @ref regfi_free_record. 1161 1154 * 1162 1155 * @ingroup regfiIteratorLayer … … 1185 1178 * 1186 1179 * @return Returns a newly allocated classname structure, or NULL on failure. 1187 * Classname structures must be freed with regfi_free_record.1180 * Classname structures must be freed with @ref regfi_free_record. 1188 1181 * 1189 1182 * @ingroup regfiIteratorLayer … … 1199 1192 * 1200 1193 * @return Returns a newly allocated data structure, or NULL on failure. 1201 * Data structures must be freed with regfi_free_record.1194 * Data structures must be freed with @ref regfi_free_record. 1202 1195 * 1203 1196 * @ingroup regfiIteratorLayer
Note: See TracChangeset
for help on using the changeset viewer.