# Generated by cstruct-stubgen
from typing import BinaryIO, Literal, TypeAlias, overload

import dissect.cstruct as __cs__

class _c_vdi(__cs__.cstruct):
    VDI_IMAGE_COMMENT_SIZE: Literal[256] = ...
    class VDI_IMAGE_TYPE(__cs__.Enum):
        NORMAL = ...
        FIXED = ...
        UNDO = ...
        DIFF = ...

    class VDI_IMAGE_FLAGS(__cs__.Flag):
        ZERO_EXPAND = ...

    class VDIDISKGEOMETRY(__cs__.Structure):
        Cylinders: _c_vdi.uint32
        Heads: _c_vdi.uint32
        Sectors: _c_vdi.uint32
        Sector: _c_vdi.uint32
        @overload
        def __init__(
            self,
            Cylinders: _c_vdi.uint32 | None = ...,
            Heads: _c_vdi.uint32 | None = ...,
            Sectors: _c_vdi.uint32 | None = ...,
            Sector: _c_vdi.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    PVDIDISKGEOMETRY: TypeAlias = __cs__.Pointer[_c_vdi.VDIDISKGEOMETRY]
    class VDIPREHEADER(__cs__.Structure):
        szFileInfo: __cs__.CharArray
        u32Signature: _c_vdi.uint32
        u32Version: _c_vdi.uint32
        @overload
        def __init__(
            self,
            szFileInfo: __cs__.CharArray | None = ...,
            u32Signature: _c_vdi.uint32 | None = ...,
            u32Version: _c_vdi.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    PVDIPREHEADER: TypeAlias = __cs__.Pointer[_c_vdi.VDIPREHEADER]
    class VDIHEADER1PLUS(__cs__.Structure):
        cbHeader: _c_vdi.uint32
        u32Type: _c_vdi.VDI_IMAGE_TYPE
        fFlags: _c_vdi.VDI_IMAGE_FLAGS
        szComment: __cs__.CharArray
        offBlocks: _c_vdi.uint32
        offData: _c_vdi.uint32
        LegacyGeometry: _c_vdi.VDIDISKGEOMETRY
        u32Dummy: _c_vdi.uint32
        cbDisk: _c_vdi.uint64
        cbBlock: _c_vdi.uint32
        cbBlockExtra: _c_vdi.uint32
        cBlocks: _c_vdi.uint32
        cBlocksAllocated: _c_vdi.uint32
        uuidCreate: __cs__.CharArray
        uuidModify: __cs__.CharArray
        uuidLinkage: __cs__.CharArray
        uuidParentModify: __cs__.CharArray
        Geometry: _c_vdi.VDIDISKGEOMETRY
        @overload
        def __init__(
            self,
            cbHeader: _c_vdi.uint32 | None = ...,
            u32Type: _c_vdi.VDI_IMAGE_TYPE | None = ...,
            fFlags: _c_vdi.VDI_IMAGE_FLAGS | None = ...,
            szComment: __cs__.CharArray | None = ...,
            offBlocks: _c_vdi.uint32 | None = ...,
            offData: _c_vdi.uint32 | None = ...,
            LegacyGeometry: _c_vdi.VDIDISKGEOMETRY | None = ...,
            u32Dummy: _c_vdi.uint32 | None = ...,
            cbDisk: _c_vdi.uint64 | None = ...,
            cbBlock: _c_vdi.uint32 | None = ...,
            cbBlockExtra: _c_vdi.uint32 | None = ...,
            cBlocks: _c_vdi.uint32 | None = ...,
            cBlocksAllocated: _c_vdi.uint32 | None = ...,
            uuidCreate: __cs__.CharArray | None = ...,
            uuidModify: __cs__.CharArray | None = ...,
            uuidLinkage: __cs__.CharArray | None = ...,
            uuidParentModify: __cs__.CharArray | None = ...,
            Geometry: _c_vdi.VDIDISKGEOMETRY | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    PVDIHEADER1PLUS: TypeAlias = __cs__.Pointer[_c_vdi.VDIHEADER1PLUS]

# Technically `c_vdi` is an instance of `_c_vdi`, but then we can't use it in type hints
c_vdi: TypeAlias = _c_vdi

VDI_IMAGE_SIGNATURE: int
VDI_IMAGE_BLOCK_FREE: int
VDI_IMAGE_BLOCK_ZERO: int
