File: hitaki-enum

package info (click to toggle)
libhitaki 0.2.1-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 472 kB
  • sloc: ansic: 2,311; python: 544; makefile: 5; javascript: 5
file content (63 lines) | stat: -rw-r--r-- 1,181 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/env python3

from sys import exit
from errno import ENXIO

from helper import test_enums

import gi
gi.require_version('Hitaki', '0.0')
from gi.repository import Hitaki

alsa_firewire_type_enumerations = (
    'DICE',
    'FIREWORKS',
    'BEBOB',
    'OXFW',
    'DIGI00X',
    'TASCAM',
    'MOTU',
    'FIREFACE',
)

alsa_firewire_error_enumerations = (
    'FAILED',
    'IS_OPENED',
    'IS_NOT_OPENED',
    'IS_USED',
    'IS_LOCKED',
    'IS_UNLOCKED',
    'IS_DISCONNECTED',
    'WRONG_CLASS',
)

efw_protocol_error_enumerations = (
    'OK',
    'BAD',
    'BAD_COMMAND',
    'COMM_ERR',
    'BAD_QUAD_COUNT',
    'UNSUPPORTED',
    'TIMEOUT',
    'DSP_TIMEOUT',
    'BAD_RATE',
    'BAD_CLOCK',
    'BAD_CHANNEL',
    'BAD_PAN',
    'FLASH_BUSY',
    'BAD_MIRROR',
    'BAD_LED',
    'BAD_PARAMETER',
    'INCOMPLETE',
    'INVALID',
)

types = {
    Hitaki.AlsaFirewireType: alsa_firewire_type_enumerations,
    Hitaki.AlsaFirewireError: alsa_firewire_error_enumerations,
    Hitaki.EfwProtocolError: efw_protocol_error_enumerations,
}

for target_type, enumerations in types.items():
    if not test_enums(target_type, enumerations):
            exit(ENXIO)