#ifndef _CLFSMGMTW32_H
#define _CLFSMGMTW32_H

#if __POCC__ >= 500
#pragma once
#endif

#undef CLFS_KERNEL_MODE
#include <clfsmgmt.h>

#ifdef __cplusplus
extern "C"
{
#endif

#if (_WIN32_WINNT >= _WIN32_WINNT_WS03)
typedef VOID (*PLOG_TAIL_ADVANCE_CALLBACK)(HANDLE, CLFS_LSN, PVOID);
typedef VOID (*PLOG_FULL_HANDLER_CALLBACK)(HANDLE, DWORD, BOOL, PVOID);
typedef VOID (*PLOG_UNPINNED_CALLBACK)(HANDLE, PVOID);

typedef struct _LOG_MANAGEMENT_CALLBACKS {
    PVOID CallbackContext;
    PLOG_TAIL_ADVANCE_CALLBACK AdvanceTailCallback;
    PLOG_FULL_HANDLER_CALLBACK LogFullHandlerCallback;
    PLOG_UNPINNED_CALLBACK LogUnpinnedCallback;
} LOG_MANAGEMENT_CALLBACKS, *PLOG_MANAGEMENT_CALLBACKS;

CLFSUSER_API BOOL WINAPI RegisterManageableLogClient(HANDLE, PLOG_MANAGEMENT_CALLBACKS);
CLFSUSER_API BOOL WINAPI DeregisterManageableLogClient(HANDLE);
CLFSUSER_API BOOL WINAPI ReadLogNotification(HANDLE, PCLFS_MGMT_NOTIFICATION, LPOVERLAPPED);
CLFSUSER_API BOOL WINAPI InstallLogPolicy(HANDLE, PCLFS_MGMT_POLICY);
CLFSUSER_API BOOL WINAPI RemoveLogPolicy(HANDLE, CLFS_MGMT_POLICY_TYPE);
CLFSUSER_API BOOL WINAPI QueryLogPolicy(HANDLE, CLFS_MGMT_POLICY_TYPE, PCLFS_MGMT_POLICY, PULONG);
CLFSUSER_API BOOL WINAPI SetLogFileSizeWithPolicy(HANDLE, PULONGLONG, PULONGLONG);
CLFSUSER_API BOOL WINAPI HandleLogFull(HANDLE);
CLFSUSER_API BOOL WINAPI LogTailAdvanceFailure(HANDLE, DWORD);
CLFSUSER_API BOOL WINAPI RegisterForLogWriteNotification(HANDLE, ULONG, BOOL);
#endif /* _WIN32_WINNT >= _WIN32_WINNT_WS03 */

#ifdef __cplusplus
}
#endif

#endif /* _CLFSMGMTW32_H */
