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

import dissect.cstruct as __cs__

class _c_lvm(__cs__.cstruct):
    RAW_LOCN_IGNORED: Literal[1] = ...
    class label_header(__cs__.Structure):
        id: __cs__.CharArray
        sector: _c_lvm.uint64
        crc: _c_lvm.uint32
        offset: _c_lvm.uint32
        type: __cs__.CharArray
        @overload
        def __init__(
            self,
            id: __cs__.CharArray | None = ...,
            sector: _c_lvm.uint64 | None = ...,
            crc: _c_lvm.uint32 | None = ...,
            offset: _c_lvm.uint32 | None = ...,
            type: __cs__.CharArray | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class pv_header(__cs__.Structure):
        pv_uuid: __cs__.CharArray
        device_size: _c_lvm.uint64
        @overload
        def __init__(self, pv_uuid: __cs__.CharArray | None = ..., device_size: _c_lvm.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class disk_locn(__cs__.Structure):
        offset: _c_lvm.uint64
        size: _c_lvm.uint64
        @overload
        def __init__(self, offset: _c_lvm.uint64 | None = ..., size: _c_lvm.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class mda_header(__cs__.Structure):
        checksum: _c_lvm.uint32
        magic: __cs__.CharArray
        version: _c_lvm.uint32
        start: _c_lvm.uint64
        size: _c_lvm.uint64
        @overload
        def __init__(
            self,
            checksum: _c_lvm.uint32 | None = ...,
            magic: __cs__.CharArray | None = ...,
            version: _c_lvm.uint32 | None = ...,
            start: _c_lvm.uint64 | None = ...,
            size: _c_lvm.uint64 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class raw_locn(__cs__.Structure):
        offset: _c_lvm.uint64
        size: _c_lvm.uint64
        checksum: _c_lvm.uint32
        flags: _c_lvm.uint32
        @overload
        def __init__(
            self,
            offset: _c_lvm.uint64 | None = ...,
            size: _c_lvm.uint64 | None = ...,
            checksum: _c_lvm.uint32 | None = ...,
            flags: _c_lvm.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

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

SECTOR_SIZE: int

LABEL_SCAN_SECTORS: int

STATUS_FLAG_ALLOCATABLE: str
STATUS_FLAG_RESIZEABLE: str
STATUS_FLAG_READ: str
STATUS_FLAG_VISIBLE: str
STATUS_FLAG_WRITE: str
