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

import dissect.cstruct as __cs__

class _c_evt(__cs__.cstruct):
    ELF_LOGFILE_HEADER_DIRTY: Literal[1] = ...
    ELF_LOGFILE_HEADER_WRAP: Literal[2] = ...
    ELF_LOGFILE_LOGFULL_WRITTEN: Literal[4] = ...
    ELF_LOGFILE_ARCHIVE_SET: Literal[8] = ...
    class _EVENTLOGHEADER(__cs__.Structure):
        HeaderSize: _c_evt.uint32
        Signature: __cs__.CharArray
        MajorVersion: _c_evt.uint32
        MinorVersion: _c_evt.uint32
        StartOffset: _c_evt.uint32
        EndOffset: _c_evt.uint32
        CurrentRecordNumber: _c_evt.uint32
        OldestRecordNumber: _c_evt.uint32
        MaxSize: _c_evt.uint32
        Flags: _c_evt.uint32
        Retention: _c_evt.uint32
        EndHeaderSize: _c_evt.uint32
        @overload
        def __init__(
            self,
            HeaderSize: _c_evt.uint32 | None = ...,
            Signature: __cs__.CharArray | None = ...,
            MajorVersion: _c_evt.uint32 | None = ...,
            MinorVersion: _c_evt.uint32 | None = ...,
            StartOffset: _c_evt.uint32 | None = ...,
            EndOffset: _c_evt.uint32 | None = ...,
            CurrentRecordNumber: _c_evt.uint32 | None = ...,
            OldestRecordNumber: _c_evt.uint32 | None = ...,
            MaxSize: _c_evt.uint32 | None = ...,
            Flags: _c_evt.uint32 | None = ...,
            Retention: _c_evt.uint32 | None = ...,
            EndHeaderSize: _c_evt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    EVENTLOGHEADER: TypeAlias = _EVENTLOGHEADER
    class _EVENTLOGRECORD(__cs__.Structure):
        Length: _c_evt.uint32
        Reserved: _c_evt.uint32
        RecordNumber: _c_evt.uint32
        TimeGenerated: _c_evt.uint32
        TimeWritten: _c_evt.uint32
        EventID: _c_evt.uint32
        EventType: _c_evt.uint16
        NumStrings: _c_evt.uint16
        EventCategory: _c_evt.uint16
        ReservedFlags: _c_evt.uint16
        ClosingRecordNumber: _c_evt.uint32
        StringOffset: _c_evt.uint32
        UserSidLength: _c_evt.uint32
        UserSidOffset: _c_evt.uint32
        DataLength: _c_evt.uint32
        DataOffset: _c_evt.uint32
        @overload
        def __init__(
            self,
            Length: _c_evt.uint32 | None = ...,
            Reserved: _c_evt.uint32 | None = ...,
            RecordNumber: _c_evt.uint32 | None = ...,
            TimeGenerated: _c_evt.uint32 | None = ...,
            TimeWritten: _c_evt.uint32 | None = ...,
            EventID: _c_evt.uint32 | None = ...,
            EventType: _c_evt.uint16 | None = ...,
            NumStrings: _c_evt.uint16 | None = ...,
            EventCategory: _c_evt.uint16 | None = ...,
            ReservedFlags: _c_evt.uint16 | None = ...,
            ClosingRecordNumber: _c_evt.uint32 | None = ...,
            StringOffset: _c_evt.uint32 | None = ...,
            UserSidLength: _c_evt.uint32 | None = ...,
            UserSidOffset: _c_evt.uint32 | None = ...,
            DataLength: _c_evt.uint32 | None = ...,
            DataOffset: _c_evt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    EVENTLOGRECORD: TypeAlias = _EVENTLOGRECORD
    class _EVENTLOGEOF(__cs__.Structure):
        RecordSizeBeginning: _c_evt.uint32
        One: _c_evt.uint32
        Two: _c_evt.uint32
        Three: _c_evt.uint32
        Four: _c_evt.uint32
        BeginRecord: _c_evt.uint32
        EndRecord: _c_evt.uint32
        CurrentRecordNumber: _c_evt.uint32
        OldestRecordNumber: _c_evt.uint32
        RecordSizeEnd: _c_evt.uint32
        @overload
        def __init__(
            self,
            RecordSizeBeginning: _c_evt.uint32 | None = ...,
            One: _c_evt.uint32 | None = ...,
            Two: _c_evt.uint32 | None = ...,
            Three: _c_evt.uint32 | None = ...,
            Four: _c_evt.uint32 | None = ...,
            BeginRecord: _c_evt.uint32 | None = ...,
            EndRecord: _c_evt.uint32 | None = ...,
            CurrentRecordNumber: _c_evt.uint32 | None = ...,
            OldestRecordNumber: _c_evt.uint32 | None = ...,
            RecordSizeEnd: _c_evt.uint32 | None = ...,
        ): ...
        @overload
        def __init__(self, fh: bytes | memoryview | bytearray | BinaryIO, /): ...

    EVENTLOGEOF: TypeAlias = _EVENTLOGEOF

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