blob: 1c0784f9a47f313d428052499f82d57fb153bd2a (
plain)
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
package commonapi.tests
import commonapi.tests.* from "test-predefined-types.fidl"
typeCollection DerivedTypeCollection {
map TestMap { UInt32 to TestArrayTestStruct }
struct TestStructExtended extends TestStruct {
TestEnumExtended2 testEnumExtended2
}
map TestEnumMap { TestEnum to String }
<** @description : Common errors. **>
enumeration TestEnum {
<** @description : default **>
E_UNKNOWN = "0x00"
<** @description : no error - positive reply **>
E_OK = "0x01"
<** @description : value out of range **>
E_OUT_OF_RANGE = "0x02"
<** @description : not used **>
E_NOT_USED = "0x03"
}
array TestArrayTestStruct of TestStruct
enumeration TestEnumExtended2 extends TestEnumExtended {
<** @description : new error **>
E_NEW2 = "0x05"
}
enumeration TestEnumMissingValue {
<** @description : default **>
E1 = "A"
E2
E3 = "2"
}
enumeration TestEnumExtended extends TestEnum {
<** @description : new error **>
E_NEW = "0x04"
}
array TestArrayUInt64 of UInt64
struct TestStruct {
<** @description : the name of the property **>
PredefinedTypeCollection.TestString testString
<** @description : the actual value **>
UInt16 uintValue
}
struct TestPolymorphicStruct polymorphic {
<** @description : the name of the property **>
PredefinedTypeCollection.TestString testString
<** @description : the actual value **>
UInt16 uintValue
}
struct TestExtendedPolymorphicStruct extends TestPolymorphicStruct {
UInt32 additionalValue
}
map MapIntToPolymorphic { UInt8 to DerivedTypeCollection.TestPolymorphicStruct }
struct StructWithPolymorphicMember {
UInt32 numberValue
DerivedTypeCollection.TestPolymorphicStruct polymorphicMember
}
struct StructWithEnumKeyMap {
TestEnumMap testMap
}
}
|