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

import dissect.cstruct as __cs__

class _c_vinum(__cs__.cstruct):
    GV_HDR_OFFSET: Literal[4096] = ...
    GV_HDR_LEN: Literal[512] = ...
    GV_CFG_OFFSET: Literal[4608] = ...
    GV_CFG_LEN: Literal[65536] = ...
    GV_DATA_START: Literal[135680] = ...
    GV_MAXDRIVENAME: Literal[32] = ...
    GV_HOSTNAME_LEN: Literal[32] = ...
    GV_OLD_MAGIC: Literal[5282194967921315584] = ...
    GV_OLD_NOMAGIC: Literal[5642764413087665920] = ...
    GV_MAGIC: Literal[6217586888835674368] = ...
    GV_NOMAGIC: Literal[6217586888835673344] = ...
    class timeval(__cs__.Structure):
        sec: _c_vinum.uint64
        usec: _c_vinum.uint64
        @overload
        def __init__(self, sec: _c_vinum.uint64 | None = ..., usec: _c_vinum.uint64 | None = ...): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    off_t: TypeAlias = _c_vinum.uint64
    class gv_label(__cs__.Structure):
        sysname: __cs__.CharArray
        name: __cs__.CharArray
        date_of_birth: _c_vinum.timeval
        last_update: _c_vinum.timeval
        drive_size: _c_vinum.uint64
        @overload
        def __init__(
            self,
            sysname: __cs__.CharArray | None = ...,
            name: __cs__.CharArray | None = ...,
            date_of_birth: _c_vinum.timeval | None = ...,
            last_update: _c_vinum.timeval | None = ...,
            drive_size: _c_vinum.uint64 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    class gv_hdr(__cs__.Structure):
        magic: _c_vinum.uint64
        config_length: _c_vinum.uint64
        label: _c_vinum.gv_label
        @overload
        def __init__(
            self,
            magic: _c_vinum.uint64 | None = ...,
            config_length: _c_vinum.uint64 | None = ...,
            label: _c_vinum.gv_label | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    header: TypeAlias = gv_hdr

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

SECTOR_SIZE: int

MAGIC_ACTIVE: set[int]
MAGIC_INACTIVE: set[int]
