Skip to content

Commit

Permalink
Format / address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Dec 14, 2022
1 parent acd88aa commit c24115c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRBaseDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) {
MTRTransportTypeUDP,
MTRTransportTypeBLE,
MTRTransportTypeTCP,
};
} MTR_NEWLY_AVAILABLE;

@interface MTRBaseDevice : NSObject

Expand All @@ -146,7 +146,7 @@ typedef NS_ENUM(uint8_t, MTRTransportType) {
* The transport used by the current session with this device, or
* `MTRTransportTypeUndefined` if no session is currently active.
*/
@property (readonly) MTRTransportType sessionTransportType;
@property (readonly) MTRTransportType sessionTransportType MTR_NEWLY_AVAILABLE;

/**
* Subscribe to receive attribute reports for everything (all endpoints, all
Expand Down
14 changes: 6 additions & 8 deletions src/darwin/Framework/CHIP/MTRBaseDevice_Internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,12 @@

NS_ASSUME_NONNULL_BEGIN

static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type) {
static_assert(MTRTransportTypeUndefined == (uint8_t)chip::Transport::Type::kUndefined, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeUDP == (uint8_t)chip::Transport::Type::kUdp, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeBLE == (uint8_t)chip::Transport::Type::kBle, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeTCP == (uint8_t)chip::Transport::Type::kTcp, "MTRTransportType != Transport::Type");
static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type)
{
static_assert(MTRTransportTypeUndefined == (uint8_t) chip::Transport::Type::kUndefined, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeUDP == (uint8_t) chip::Transport::Type::kUdp, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeBLE == (uint8_t) chip::Transport::Type::kBle, "MTRTransportType != Transport::Type");
static_assert(MTRTransportTypeTCP == (uint8_t) chip::Transport::Type::kTcp, "MTRTransportType != Transport::Type");
return static_cast<MTRTransportType>(type);
}

Expand Down Expand Up @@ -63,9 +64,6 @@ static inline MTRTransportType MTRMakeTransportType(chip::Transport::Type type)
*/
@property (nonatomic, assign, readonly) chip::NodeId nodeID;

- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;

/**
* Initialize the device object as a CASE device with the given node id and
* controller. This will always succeed, even if there is no such node id on
Expand Down

0 comments on commit c24115c

Please sign in to comment.