Skip to content

Commit

Permalink
Make MTR_PER_CONTROLLER_STORAGE_ENABLED=0 work
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Jan 24, 2024
1 parent 53eab75 commit 5f66255
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
7 changes: 6 additions & 1 deletion src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
* limitations under the License.
*/

#import <Foundation/Foundation.h>
#import <Matter/MTRDefines.h>

#if defined(MTR_INTERNAL_INCLUDE) && defined(MTR_INCLUDED_FROM_UMBRELLA_HEADER)
Expand All @@ -33,7 +32,9 @@ NS_ASSUME_NONNULL_BEGIN
* interfaces inheriting from this one should be used to actually do the
* initialization.
*/
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
MTR_NEWLY_AVAILABLE
#endif
@interface MTRDeviceControllerAbstractParameters : NSObject
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
Expand All @@ -43,7 +44,9 @@ MTR_NEWLY_AVAILABLE
* Parameters that can be used to initialize an MTRDeviceController which
* has a node identity.
*/
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
MTR_NEWLY_AVAILABLE
#endif
@interface MTRDeviceControllerParameters : MTRDeviceControllerAbstractParameters

/**
Expand Down Expand Up @@ -86,7 +89,9 @@ MTR_NEWLY_AVAILABLE

@end

#if MTR_PER_CONTROLLER_STORAGE_ENABLED
MTR_NEWLY_AVAILABLE
#endif
@interface MTRDeviceControllerExternalCertificateParameters : MTRDeviceControllerParameters

- (instancetype)init NS_UNAVAILABLE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ typedef NS_ENUM(NSUInteger, MTRStorageSharingType) {
* stored and calling MTRDeviceControllerStorageClasses(), is likely to lead
* to deadlocks.
*/
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
MTR_NEWLY_AVAILABLE
#endif
@protocol MTRDeviceControllerStorageDelegate <NSObject>
@required
/**
Expand Down Expand Up @@ -112,7 +114,10 @@ MTR_NEWLY_AVAILABLE
@end

// TODO: FIXME: Is this a sane place to put this API?
MTR_EXTERN MTR_NEWLY_AVAILABLE NSSet<Class> * MTRDeviceControllerStorageClasses(void);
#if MTR_PER_CONTROLLER_STORAGE_ENABLED
MTR_EXTERN MTR_NEWLY_AVAILABLE
#endif
NSSet<Class> * MTRDeviceControllerStorageClasses(void);

NS_ASSUME_NONNULL_END

Expand Down

0 comments on commit 5f66255

Please sign in to comment.