7
7
8
8
typedef NS_ENUM(uint32_t, MTRClusterIDType) {
9
9
{{#zcl_clusters}}
10
- MTRCluster{{compatClusterNameRemapping label}}ID MTR_NEWLY_DEPRECATED("Please use MTRClusterIDType{{asUpperCamelCase label}}ID")= {{asMEI manufacturerCode code}},
10
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping name) isForIds=true)}}
11
+ MTRCluster{{compatClusterNameRemapping label}}ID {{availability (compatClusterNameRemapping name) deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use MTRClusterIDType" (asUpperCamelCase label preserveAcronyms=false) "ID") isForIds=true}} = {{asMEI manufacturerCode code}},
12
+ {{/if}}
11
13
{{/zcl_clusters}}
12
14
{{#zcl_clusters}}
13
15
{{~#*inline "cluster"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}}
14
- MTRClusterIDType{{>cluster}}ID MTR_NEWLY_AVAILABLE = {{asMEI manufacturerCode code}},
16
+ MTRClusterIDType{{>cluster}}ID {{availability (asUpperCamelCase label preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}},
15
17
{{/zcl_clusters}}
16
18
};
17
19
@@ -21,44 +23,48 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) {
21
23
// Deprecated global attribute names
22
24
{{#zcl_attributes_server}}
23
25
{{#unless clusterRef}}
26
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" "" globalAttribute=(asUpperCamelCase label) isForIds=true)}}
24
27
MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID
25
- MTR_NEWLY_DEPRECATED( "Please use MTRAttributeIDTypeGlobalAttribute{{ asUpperCamelCase label}} ID")
28
+ {{availability "" api="Deprecated global attribute names" deprecationMessage=(concat "Please use MTRAttributeIDTypeGlobalAttribute" ( asUpperCamelCase label) " ID") isForIds=true}}
26
29
= {{asMEI manufacturerCode code}},
30
+ {{/if}}
27
31
{{/unless}}
28
32
{{/zcl_attributes_server}}
29
33
30
34
// Global attributes
31
35
{{#zcl_attributes_server}}
32
36
{{~#*inline "attribute"}}{{asUpperCamelCase label preserveAcronyms=true}}{{/inline~}}
33
37
{{#unless clusterRef}}
34
- MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID MTR_NEWLY_AVAILABLE = {{asMEI manufacturerCode code}},
38
+ MTRAttributeIDTypeGlobalAttribute{{>attribute}}ID {{availability "" globalAttribute=(asUpperCamelCase label) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}},
35
39
{{/unless}}
36
40
{{/zcl_attributes_server}}
37
41
38
42
{{#zcl_clusters}}
39
43
{{#*inline "attributeIDs"}}
40
44
{{#zcl_attributes_server}}
41
45
{{#first}}
46
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) isForIds=true)}}
42
47
// Cluster {{compatClusterNameRemapping ../clusterName}} deprecated attribute names
48
+ {{/if}}
43
49
{{/first}}
44
- {{#if clusterRef}}
45
- {{! TODO: We need a better setup for the API_AVAILABLE annotations here; this does not scale at all sanely. }}
46
- MTRCluster{{compatClusterNameRemapping ../clusterName}}Attribute{{asUpperCamelCase label}}ID
47
- MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeCluster{{asUpperCamelCase ../clusterName}}Attribute{{asUpperCamelCase label}}ID")
50
+ {{! DeviceTypeList is special: we did not call it by that name
51
+ anywhere else in the API at the point when we shipped an id for it
52
+ here in the old id format but using the new name alongside the old name. }}
48
53
{{#if (isStrEqual (asUpperCamelCase ../clusterName) "Descriptor")}}
49
54
{{#if (isStrEqual (asUpperCamelCase label) "DeviceTypeList")}}
50
- API_AVAILABLE(ios(16.2), macos(13.1), watchos(9.2), tvos(16.2))
51
- {{/if}}
52
- {{/if}}
55
+ MTRClusterDescriptorAttributeDeviceTypeListID
56
+ {{availability "Descriptor" attribute="DeviceTypeList" deprecatedRelease="First major API revamp" deprecationMessage="Please use MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID" isForIds=true}}
53
57
= {{asMEI manufacturerCode code}},
54
- {{!Backwards compat for now: DeviceList as an alias for DeviceTypeList}}
55
- {{#if (isStrEqual (asUpperCamelCase ../clusterName) "Descriptor")}}
56
- {{#if (isStrEqual (asUpperCamelCase label) "DeviceTypeList")}}
57
- MTRClusterDescriptorAttributeDeviceListID MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeCluster{{asUpperCamelCase ../clusterName}}Attribute{{asUpperCamelCase label}}ID") = {{asMEI manufacturerCode code}},
58
58
{{/if}}
59
59
{{/if}}
60
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) attribute=(compatAttributeNameRemapping ../clusterName label) isForIds=true)}}
61
+ MTRCluster{{compatClusterNameRemapping ../clusterName}}Attribute{{compatAttributeNameRemapping ../clusterName label}}ID
62
+ {{availability (compatClusterNameRemapping ../clusterName) attribute=(compatAttributeNameRemapping ../clusterName label) deprecatedRelease="First major API revamp" deprecationMessage=(concat "Please use MTRAttributeIDTypeCluster" (asUpperCamelCase ../clusterName preserveAcronyms=false) "Attribute" (asUpperCamelCase label preserveAcronyms=false) "ID") isForIds=true}} =
63
+ {{#if clusterRef}}
64
+ {{asMEI manufacturerCode code}},
60
65
{{else}}
61
- MTRCluster{{compatClusterNameRemapping ../clusterName}}Attribute{{asUpperCamelCase label}}ID MTR_NEWLY_DEPRECATED("Please use MTRAttributeIDTypeCluster{{asUpperCamelCase parent.label}}Attribute{{asUpperCamelCase label}}ID") = MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID,
66
+ MTRClusterGlobalAttribute{{asUpperCamelCase label}}ID,
67
+ {{/if}}
62
68
{{/if}}
63
69
{{#last}}
64
70
@@ -70,10 +76,11 @@ MTRCluster{{compatClusterNameRemapping ../clusterName}}Attribute{{asUpperCamelCa
70
76
{{#first}}
71
77
// Cluster {{> cluster}} attributes
72
78
{{/first}}
79
+ MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID {{availability (asUpperCamelCase ../clusterName preserveAcronyms=true) attribute=(asUpperCamelCase label preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} =
73
80
{{#if clusterRef}}
74
- MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID MTR_NEWLY_AVAILABLE = {{asMEI manufacturerCode code}},
81
+ {{asMEI manufacturerCode code}},
75
82
{{else}}
76
- MTRAttributeIDTypeCluster{{>cluster}}Attribute{{>attribute}}ID MTR_NEWLY_AVAILABLE= MTRAttributeIDTypeGlobalAttribute{{asUpperCamelCase label}}ID,
83
+ MTRAttributeIDTypeGlobalAttribute{{asUpperCamelCase label}}ID,
77
84
{{/if}}
78
85
{{#last}}
79
86
@@ -92,11 +99,15 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) {
92
99
{{#*inline "commandIDs"}}
93
100
{{#zcl_commands}}
94
101
{{#first}}
102
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) isForIds=true)}}
95
103
// Cluster {{compatClusterNameRemapping ../clusterName}} deprecated command id names
104
+ {{/if}}
96
105
{{/first}}
106
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) command=(asUpperCamelCase label) isForIds=true)}}
97
107
MTRCluster{{compatClusterNameRemapping ../clusterName}}Command{{asUpperCamelCase label}}ID
98
- MTR_NEWLY_DEPRECATED(" Please use MTRCommandIDTypeCluster{{ asUpperCamelCase ../clusterName}} Command{{ asUpperCamelCase label}} ID")
108
+ {{availability (compatClusterNameRemapping ../clusterName) command=(asUpperCamelCase label) deprecatedRelease="First major API revamp" deprecationMessage=(concat " Please use MTRCommandIDTypeCluster" ( asUpperCamelCase ../clusterName preserveAcronyms=false) " Command" ( asUpperCamelCase label preserveAcronyms=true) " ID") isForIds=true}}
99
109
= {{asMEI manufacturerCode code}},
110
+ {{/if}}
100
111
{{#last}}
101
112
102
113
{{/last}}
@@ -107,7 +118,7 @@ MTR_NEWLY_DEPRECATED("Please use MTRCommandIDTypeCluster{{asUpperCamelCase ../cl
107
118
{{#first}}
108
119
// Cluster {{>cluster}} commands
109
120
{{/first}}
110
- MTRCommandIDTypeCluster{{>cluster}}Command{{>command}}ID MTR_NEWLY_AVAILABLE = {{asMEI manufacturerCode code}},
121
+ MTRCommandIDTypeCluster{{>cluster}}Command{{>command}}ID {{availability (asUpperCamelCase ../clusterName preserveAcronyms=true) command=(asUpperCamelCase label preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}},
111
122
{{#last}}
112
123
113
124
{{/last}}
@@ -125,11 +136,15 @@ typedef NS_ENUM(uint32_t, MTREventIDType) {
125
136
{{#*inline "eventIDs"}}
126
137
{{#zcl_events}}
127
138
{{#first}}
139
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) isForIds=true)}}
128
140
// Cluster {{compatClusterNameRemapping ../clusterName}} deprecated event names
141
+ {{/if}}
129
142
{{/first}}
143
+ {{#if (wasIntroducedBeforeRelease "First major API revamp" (compatClusterNameRemapping ../clusterName) event=(asUpperCamelCase name) isForIds=true)}}
130
144
MTRCluster{{compatClusterNameRemapping ../clusterName}}Event{{asUpperCamelCase name}}ID
131
- MTR_NEWLY_DEPRECATED(" Please use MTREventIDTypeCluster{{ asUpperCamelCase ../clusterName}} Event{{ asUpperCamelCase name}} ID")
145
+ {{availability (compatClusterNameRemapping ../clusterName) event=(asUpperCamelCase name) deprecatedRelease="First major API revamp" deprecationMessage=(concat " Please use MTREventIDTypeCluster" ( asUpperCamelCase ../clusterName preserveAcronyms=false) " Event" ( asUpperCamelCase name preserveAcronyms=true) " ID") isForIds=true}}
132
146
= {{asMEI manufacturerCode code}},
147
+ {{/if}}
133
148
{{#last}}
134
149
135
150
{{/last}}
@@ -140,7 +155,7 @@ MTR_NEWLY_DEPRECATED("Please use MTREventIDTypeCluster{{asUpperCamelCase ../clus
140
155
{{#first}}
141
156
// Cluster {{>cluster}} events
142
157
{{/first}}
143
- MTREventIDTypeCluster{{>cluster}}Event{{>event}}ID MTR_NEWLY_AVAILABLE = {{asMEI manufacturerCode code}},
158
+ MTREventIDTypeCluster{{>cluster}}Event{{>event}}ID {{availability (asUpperCamelCase ../clusterName preserveAcronyms=true) event=(asUpperCamelCase name preserveAcronyms=true) minimalRelease="First major API revamp" isForIds=true}} = {{asMEI manufacturerCode code}},
144
159
{{#last}}
145
160
146
161
{{/last}}
0 commit comments