|
| 1 | +/** |
| 2 | + * Copyright (c) 2023 Project CHIP Authors |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +#import <Foundation/Foundation.h> |
| 18 | + |
| 19 | +#import <Matter/MTRCommandPayloadsObjc.h> |
| 20 | +#import <Matter/MTRDefines.h> |
| 21 | +#import <Matter/MTRStructsObjc.h> |
| 22 | + |
| 23 | +/** |
| 24 | + * This file defines manual backwards-compat shims of various sorts to handle |
| 25 | + * API changes that happened. |
| 26 | + */ |
| 27 | + |
| 28 | +NS_ASSUME_NONNULL_BEGIN |
| 29 | + |
| 30 | +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesParams () |
| 31 | +/** |
| 32 | + * This command used to incorrectly have a groupKeySetIDs field. |
| 33 | + */ |
| 34 | +@property (nonatomic, copy) NSArray * groupKeySetIDs MTR_DEPRECATED( |
| 35 | + "This field has been removed", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); |
| 36 | + |
| 37 | +@end |
| 38 | + |
| 39 | +/** |
| 40 | + * FanControl used to have WindSettingMask and WindSupportMask that had |
| 41 | + * identical values. Those got replaced with a single WindBitmap. We codegen |
| 42 | + * WindSupportMask as an alias of WindBitmap, but we need a manual shim for |
| 43 | + * WindSettingMask. |
| 44 | + */ |
| 45 | +typedef NS_OPTIONS(uint8_t, MTRFanControlWindSettingMask) { |
| 46 | + MTRFanControlWindSettingMaskSleepWind MTR_DEPRECATED( |
| 47 | + "Please use MTRFanControlWindBitmapSleepWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) |
| 48 | + = 0x1, |
| 49 | + MTRFanControlWindSettingMaskNaturalWind MTR_DEPRECATED( |
| 50 | + "Please use MTRFanControlWindBitmapNaturalWind", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)) |
| 51 | + = 0x2, |
| 52 | +} MTR_DEPRECATED("Please use MTRFanControlWindBitmap", ios(16.1, 17.0), macos(13.0, 14.0), watchos(9.1, 10.0), tvos(16.1, 17.0)); |
| 53 | + |
| 54 | +/** |
| 55 | + * For the OTA clusters, first we changed the names of the clusters, and then we |
| 56 | + * changed the names of the enums. That means we now have three names for the |
| 57 | + * enums (newest name, name before enum name change, name before cluster name |
| 58 | + * change). We can only track one old name for things, so just manually add the |
| 59 | + * intermediate names. |
| 60 | + */ |
| 61 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAApplyUpdateAction) { |
| 62 | + MTROTASoftwareUpdateProviderOTAApplyUpdateActionProceed MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionProceed", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 63 | + = 0x00, |
| 64 | + MTROTASoftwareUpdateProviderOTAApplyUpdateActionAwaitNextAction |
| 65 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionAwaitNextAction", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 66 | + = 0x01, |
| 67 | + MTROTASoftwareUpdateProviderOTAApplyUpdateActionDiscontinue |
| 68 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateActionDiscontinue", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 69 | + = 0x02, |
| 70 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderApplyUpdateAction", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 71 | + |
| 72 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTADownloadProtocol) { |
| 73 | + MTROTASoftwareUpdateProviderOTADownloadProtocolBDXSynchronous |
| 74 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXSynchronous", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 75 | + = 0x00, |
| 76 | + MTROTASoftwareUpdateProviderOTADownloadProtocolBDXAsynchronous |
| 77 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolBDXAsynchronous", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 78 | + = 0x01, |
| 79 | + MTROTASoftwareUpdateProviderOTADownloadProtocolHTTPS |
| 80 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolHTTPS", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 81 | + = 0x02, |
| 82 | + MTROTASoftwareUpdateProviderOTADownloadProtocolVendorSpecific |
| 83 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocolVendorSpecific", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 84 | + = 0x03, |
| 85 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderDownloadProtocol", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 86 | + |
| 87 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateProviderOTAQueryStatus) { |
| 88 | + MTROTASoftwareUpdateProviderOTAQueryStatusUpdateAvailable |
| 89 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusUpdateAvailable", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 90 | + = 0x00, |
| 91 | + MTROTASoftwareUpdateProviderOTAQueryStatusBusy |
| 92 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusBusy", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 93 | + = 0x01, |
| 94 | + MTROTASoftwareUpdateProviderOTAQueryStatusNotAvailable |
| 95 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusNotAvailable", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 96 | + = 0x02, |
| 97 | + MTROTASoftwareUpdateProviderOTAQueryStatusDownloadProtocolNotSupported |
| 98 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatusDownloadProtocolNotSupported", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 99 | + = 0x03, |
| 100 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateProviderStatus", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 101 | + |
| 102 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAAnnouncementReason) { |
| 103 | + MTROTASoftwareUpdateRequestorOTAAnnouncementReasonSimpleAnnouncement |
| 104 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonSimpleAnnouncement", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 105 | + = 0x00, |
| 106 | + MTROTASoftwareUpdateRequestorOTAAnnouncementReasonUpdateAvailable |
| 107 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUpdateAvailable", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 108 | + = 0x01, |
| 109 | + MTROTASoftwareUpdateRequestorOTAAnnouncementReasonUrgentUpdateAvailable |
| 110 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReasonUrgentUpdateAvailable", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 111 | + = 0x02, |
| 112 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorAnnouncementReason", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 113 | + |
| 114 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAChangeReason) { |
| 115 | + MTROTASoftwareUpdateRequestorOTAChangeReasonUnknown |
| 116 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonUnknown", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 117 | + = 0x00, |
| 118 | + MTROTASoftwareUpdateRequestorOTAChangeReasonSuccess |
| 119 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonSuccess", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 120 | + = 0x01, |
| 121 | + MTROTASoftwareUpdateRequestorOTAChangeReasonFailure |
| 122 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonFailure", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 123 | + = 0x02, |
| 124 | + MTROTASoftwareUpdateRequestorOTAChangeReasonTimeOut |
| 125 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonTimeOut", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 126 | + = 0x03, |
| 127 | + MTROTASoftwareUpdateRequestorOTAChangeReasonDelayByProvider |
| 128 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReasonDelayByProvider", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 129 | + = 0x04, |
| 130 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorChangeReason", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 131 | + |
| 132 | +typedef NS_ENUM(uint8_t, MTROTASoftwareUpdateRequestorOTAUpdateState) { |
| 133 | + MTROTASoftwareUpdateRequestorOTAUpdateStateUnknown |
| 134 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateUnknown", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 135 | + = 0x00, |
| 136 | + MTROTASoftwareUpdateRequestorOTAUpdateStateIdle |
| 137 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateIdle", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 138 | + = 0x01, |
| 139 | + MTROTASoftwareUpdateRequestorOTAUpdateStateQuerying |
| 140 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateQuerying", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 141 | + = 0x02, |
| 142 | + MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnQuery |
| 143 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnQuery", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 144 | + = 0x03, |
| 145 | + MTROTASoftwareUpdateRequestorOTAUpdateStateDownloading |
| 146 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDownloading", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 147 | + = 0x04, |
| 148 | + MTROTASoftwareUpdateRequestorOTAUpdateStateApplying |
| 149 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateApplying", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 150 | + = 0x05, |
| 151 | + MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnApply |
| 152 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnApply", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 153 | + = 0x06, |
| 154 | + MTROTASoftwareUpdateRequestorOTAUpdateStateRollingBack |
| 155 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateRollingBack", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 156 | + = 0x07, |
| 157 | + MTROTASoftwareUpdateRequestorOTAUpdateStateDelayedOnUserConsent |
| 158 | + MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateStateDelayedOnUserConsent", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)) |
| 159 | + = 0x08, |
| 160 | +} MTR_DEPRECATED("Please use MTROTASoftwareUpdateRequestorUpdateState", ios(16.4, 17.2), macos(13.3, 14.2), watchos(9.4, 10.2), tvos(16.4, 17.2)); |
| 161 | + |
| 162 | +NS_ASSUME_NONNULL_END |
0 commit comments