1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_CLFS 7 #define _INC_CLFS 8 #if (_WIN32_WINNT >= 0x0600) 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 typedef enum { 14 ClfsContextNone = 0x00, 15 ClfsContextUndoNext, 16 ClfsContextPrevious, 17 ClfsContextForward 18 } CLFS_CONTEXT_MODE, *PCLFS_CONTEXT_MODE, **PPCLFS_CONTEXT_MODE; 19 20 typedef enum _CLFS_IOSTATS_CLASS { 21 ClfsIoStatsDefault = 0x0000, 22 ClfsIoStatsMax = 0xFFFF 23 } CLFS_IOSTATS_CLASS, *PCLFS_IOSTATS_CLASS, **PPCLFS_IOSTATS_CLASS; 24 25 typedef enum _CLFS_LOG_ARCHIVE_MODE { 26 ClfsLogArchiveEnabled = 0x01, 27 ClfsLogArchiveDisabled = 0x02 28 } CLFS_LOG_ARCHIVE_MODE, *PCLFS_LOG_ARCHIVE_MODE; 29 30 typedef enum _CLFS_RECORD_TYPE { 31 ClfsDataRecord = 0x01, 32 ClfsRestartRecord = 0x02, 33 ClfsClientRecord = 0x3F 34 } CLFS_RECORD_TYPE, *PCLFS_RECORD_TYPE; 35 36 typedef union _CLFS_LSN { 37 ULONGLONG Internal; 38 } CLFS_LSN, *PCLFS_LSN; 39 40 /*http://msdn.microsoft.com/en-us/library/bb540355%28VS.85%29.aspx*/ 41 typedef enum _CLFS_SCAN_MODE { 42 CLFS_SCAN_INIT = 0x01, 43 CLFS_SCAN_FORWARD = 0x02, 44 CLFS_SCAN_BACKWARD = 0x04, 45 CLFS_SCAN_CLOSE = 0x08, 46 CLFS_SCAN_INITIALIZED = 0x10, 47 CLFS_SCAN_BUFFERED = 0x20 48 } CLFS_SCAN_MODE; 49 50 /* enum guessed from http://msdn.microsoft.com/en-us/library/bb540336%28VS.85%29.aspx */ 51 typedef enum _CLFS_CONTAINER_STATE { 52 ClfsContainerInitializing = 0x01, 53 ClfsContainerInactive = 0x02, 54 ClfsContainerActive = 0x04, 55 ClfsContainerActivePendingDelete = 0x08, 56 ClfsContainerPendingArchive = 0x10, 57 ClfsContainerPendingArchiveAndDelete = 0x20 58 } CLFS_CONTAINER_STATE; 59 60 typedef DWORD CLFS_CONTAINER_ID; 61 62 /* Goes in wdm.h */ 63 typedef struct _CLFS_CONTAINER_INFORMATION { 64 ULONG FileAttributes; 65 ULONGLONG CreationTime; 66 ULONGLONG LastAccessTime; 67 ULONGLONG LastWriteTime; 68 LONGLONG ContainerSize; 69 ULONG FileNameActualLength; 70 ULONG FileNameLength; 71 WCHAR FileName[MAX_PATH]; 72 CLFS_CONTAINER_STATE State; 73 CLFS_CONTAINER_ID PhysicalContainerId; 74 CLFS_CONTAINER_ID LogicalContainerId; 75 } CLFS_CONTAINER_INFORMATION, *PCLFS_CONTAINER_INFORMATION, **PPCLFS_CONTAINER_INFORMATION; 76 /**/ 77 78 typedef struct _CLFS_IO_STATISTICS_HEADER { 79 UCHAR ubMajorVersion; 80 UCHAR ubMinorVersion; 81 CLFS_IOSTATS_CLASS eStatsClass; 82 USHORT cbLength; 83 ULONG coffData; 84 } CLFS_IO_STATISTICS_HEADER, *PCLFS_IO_STATISTICS_HEADER, **PPCLFS_IO_STATISTICS_HEADER; 85 86 typedef struct _CLFS_ARCHIVE_DESCRIPTOR { 87 ULONGLONG coffLow; 88 ULONGLONG coffHigh; 89 CLFS_CONTAINER_INFORMATION infoContainer; 90 } CLFS_ARCHIVE_DESCRIPTOR, *PCLFS_ARCHIVE_DESCRIPTOR, **PPCLFS_ARCHIVE_DESCRIPTOR; 91 92 typedef struct _CLFS_INFORMATION { 93 LONGLONG TotalAvailable; 94 LONGLONG CurrentAvailable; 95 LONGLONG TotalReservation; 96 ULONGLONG BaseFileSize; 97 ULONGLONG ContainerSize; 98 ULONG TotalContainers; 99 ULONG FreeContainers; 100 ULONG TotalClients; 101 ULONG Attributes; 102 ULONG FlushThreshold; 103 ULONG SectorSize; 104 CLFS_LSN MinArchiveTailLsn; 105 CLFS_LSN BaseLsn; 106 CLFS_LSN LastFlushedLsn; 107 CLFS_LSN LastLsn; 108 CLFS_LSN RestartLsn; 109 GUID Identity; 110 } CLFS_INFORMATION, *PCLFS_INFORMATION, **PPCLFS_INFORMATION; 111 112 typedef struct _CLFS_IO_STATISTICS { 113 CLFS_IO_STATISTICS_HEADER hdrIoStats; 114 ULONGLONG cFlush; 115 ULONGLONG cbFlush; 116 ULONGLONG cMetaFlush; 117 ULONGLONG cbMetaFlush; 118 } CLFS_IO_STATISTICS, *PCLFS_IO_STATISTICS, **PPCLFS_IO_STATISTICS; 119 120 typedef struct _CLFS_NODE_ID { 121 ULONG cType; 122 ULONG cbNode; 123 } CLFS_NODE_ID, *PCLFS_NODE_ID; 124 125 typedef struct _CLFS_SCAN_CONTEXT { 126 CLFS_NODE_ID cidNode; 127 HANDLE hLog; 128 ULONG cIndex; 129 ULONG cContainers; 130 ULONG cContainersReturned; 131 CLFS_SCAN_MODE eScanMode; 132 PCLFS_CONTAINER_INFORMATION pinfoContainer; 133 } CLFS_SCAN_CONTEXT, *PCLFS_SCAN_CONTEXT; 134 135 typedef struct _CLFS_WRITE_ENTRY { 136 PVOID Buffer; 137 ULONG ByteLength; 138 } CLFS_WRITE_ENTRY, *PCLFS_WRITE_ENTRY; 139 140 WINBOOL WINAPI LsnEqual( 141 const CLFS_LSN *plsn1, 142 const CLFS_LSN *plsn2 143 ); 144 145 WINBOOL WINAPI LsnGreater( 146 const CLFS_LSN *plsn1, 147 const CLFS_LSN *plsn2 148 ); 149 150 WINBOOL WINAPI LsnLess( 151 const CLFS_LSN *plsn1, 152 const CLFS_LSN *plsn2 153 ); 154 155 WINBOOL WINAPI LsnNull( 156 const CLFS_LSN *plsn 157 ); 158 159 #ifdef __cplusplus 160 } 161 #endif 162 #endif /*(_WIN32_WINNT >= 0x0600)*/ 163 #endif /*_INC_CLFS*/ 164