/*
 * PROJECT:     ReactOS Disk Cleanup
 * LICENSE:     MIT (https://spdx.org/licenses/MIT)
 * PURPOSE:     Interface definitions for Disk Cleanup
 * COPYRIGHT:   Copyright 2023-2025 Mark Jansen <mark.jansen@reactos.org>
 */

cpp_quote("#pragma once")

import "wtypes.idl";
import "unknwn.idl";

interface IEmptyVolumeCache;
interface IEmptyVolumeCache2;
interface IEmptyVolumeCacheCallBack;


cpp_quote("// IEmptyVolumeCache flags")
cpp_quote("#define EVCF_HASSETTINGS             0x0001")
cpp_quote("#define EVCF_ENABLEBYDEFAULT         0x0002")
cpp_quote("#define EVCF_REMOVEFROMLIST          0x0004")
cpp_quote("#define EVCF_ENABLEBYDEFAULT_AUTO    0x0008")
cpp_quote("#define EVCF_DONTSHOWIFZERO          0x0010")
cpp_quote("#define EVCF_SETTINGSMODE            0x0020")
cpp_quote("#define EVCF_OUTOFDISKSPACE          0x0040")

cpp_quote("// IEmptyVolumeCacheCallBack flags")
cpp_quote("#define EVCCBF_LASTNOTIFICATION      0x0001")


[
    object,
    uuid(6e793361-73c6-11d0-8469-00aa00442901),
    pointer_default(unique)
]
interface IEmptyVolumeCacheCallBack: IUnknown
{
    HRESULT ScanProgress(
        [in] DWORDLONG dwlSpaceUsed,
        [in] DWORD dwFlags,
        [in] LPCWSTR pcwszStatus);

    HRESULT PurgeProgress(
        [in] DWORDLONG dwlSpaceFreed,
        [in] DWORDLONG dwlSpaceToFree,
        [in] DWORD dwFlags,
        [in] LPCWSTR pcwszStatus);
}


[
    object,
    uuid(8fce5227-04da-11d1-a004-00805f8abe06),
    pointer_default(unique)
]
interface IEmptyVolumeCache: IUnknown
{
    [local]
    HRESULT Initialize(
        [in] HKEY hkRegKey,
        [in] LPCWSTR pcwszVolume,
        [out] LPWSTR *ppwszDisplayName,
        [out] LPWSTR *ppwszDescription,
        [in, out] DWORD *pdwFlags);

    HRESULT GetSpaceUsed(
        [out] DWORDLONG *pdwlSpaceUsed,
        [in] IEmptyVolumeCacheCallBack *picb);

    HRESULT Purge(
        [in] DWORDLONG dwlSpaceToFree,
        [in] IEmptyVolumeCacheCallBack *picb);

    HRESULT ShowProperties(
        [in] HWND hwnd);

    HRESULT Deactivate(
        [out] DWORD *pdwFlags);
}


[
    object,
    uuid(02b7e3ba-4db3-11d2-b2d9-00c04f8eec8c),
    pointer_default(unique)
]
interface IEmptyVolumeCache2: IEmptyVolumeCache
{
    [local]
    HRESULT InitializeEx(
        [in] HKEY hkRegKey,
        [in] LPCWSTR pcwszVolume,
        [in] LPCWSTR pcwszKeyName,
        [out] LPWSTR *ppwszDisplayName,
        [out] LPWSTR *ppwszDescription,
        [out] LPWSTR *ppwszBtnText,
        [in, out] DWORD *pdwFlags);
}

