1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
|
#!/usr/bin/env python3
from sys import exit
from errno import ENXIO
from helper import test_enums
import gi
gi.require_version('Hinoko', '1.0')
from gi.repository import Hinoko
fw_iso_ctx_mode_enumerators = (
'IT',
'IR_SINGLE',
'IR_MULTIPLE',
)
fw_scode_enumerators = (
'S100',
'S200',
'S400',
'S800',
'S1600',
'S3200',
)
fw_iso_ctx_match_flags = (
'TAG0',
'TAG1',
'TAG2',
'TAG3',
)
fw_iso_resource_error_enumerations = (
'FAILED',
'OPENED',
'NOT_OPENED',
'TIMEOUT',
'EVENT',
)
fw_iso_resource_auto_error_enumerations = (
'FAILED',
'ALLOCATED',
'NOT_ALLOCATED',
)
fw_iso_ctx_error_enumerations = (
'FAILED',
'ALLOCATED',
'NOT_ALLOCATED',
'MAPPED',
'NOT_MAPPED',
'CHUNK_UNREGISTERED',
'NO_ISOC_CHANNEL',
)
types = {
Hinoko.FwIsoCtxMode: fw_iso_ctx_mode_enumerators,
Hinoko.FwScode: fw_scode_enumerators,
Hinoko.FwIsoCtxMatchFlag: fw_iso_ctx_match_flags,
Hinoko.FwIsoResourceError: fw_iso_resource_error_enumerations,
Hinoko.FwIsoResourceAutoError: fw_iso_resource_auto_error_enumerations,
Hinoko.FwIsoCtxError: fw_iso_ctx_error_enumerations,
}
for target_type, enumerations in types.items():
if not test_enums(target_type, enumerations):
exit(ENXIO)
|