| 1 |
#!/usr/bin/env python3 |
| 2 |
|
| 3 |
from sys import exit |
| 4 |
from errno import ENXIO |
| 5 |
|
| 6 |
from helper import test_enums |
| 7 |
|
| 8 |
import gi |
| 9 |
gi.require_version('Hitaki', '0.0') |
| 10 |
from gi.repository import Hitaki |
| 11 |
|
| 12 |
alsa_firewire_type_enumerations = ( |
| 13 |
'DICE', |
| 14 |
'FIREWORKS', |
| 15 |
'BEBOB', |
| 16 |
'OXFW', |
| 17 |
'DIGI00X', |
| 18 |
'TASCAM', |
| 19 |
'MOTU', |
| 20 |
'FIREFACE', |
| 21 |
) |
| 22 |
|
| 23 |
alsa_firewire_error_enumerations = ( |
| 24 |
'FAILED', |
| 25 |
'IS_OPENED', |
| 26 |
'IS_NOT_OPENED', |
| 27 |
'IS_USED', |
| 28 |
'IS_LOCKED', |
| 29 |
'IS_UNLOCKED', |
| 30 |
'IS_DISCONNECTED', |
| 31 |
'WRONG_CLASS', |
| 32 |
) |
| 33 |
|
| 34 |
efw_protocol_error_enumerations = ( |
| 35 |
'OK', |
| 36 |
'BAD', |
| 37 |
'BAD_COMMAND', |
| 38 |
'COMM_ERR', |
| 39 |
'BAD_QUAD_COUNT', |
| 40 |
'UNSUPPORTED', |
| 41 |
'TIMEOUT', |
| 42 |
'DSP_TIMEOUT', |
| 43 |
'BAD_RATE', |
| 44 |
'BAD_CLOCK', |
| 45 |
'BAD_CHANNEL', |
| 46 |
'BAD_PAN', |
| 47 |
'FLASH_BUSY', |
| 48 |
'BAD_MIRROR', |
| 49 |
'BAD_LED', |
| 50 |
'BAD_PARAMETER', |
| 51 |
'INCOMPLETE', |
| 52 |
'INVALID', |
| 53 |
) |
| 54 |
|
| 55 |
types = { |
| 56 |
Hitaki.AlsaFirewireType: alsa_firewire_type_enumerations, |
| 57 |
Hitaki.AlsaFirewireError: alsa_firewire_error_enumerations, |
| 58 |
Hitaki.EfwProtocolError: efw_protocol_error_enumerations, |
| 59 |
} |
| 60 |
|
| 61 |
for target_type, enumerations in types.items(): |
| 62 |
if not test_enums(target_type, enumerations): |
| 63 |
exit(ENXIO) |