Skip to content

Commit

Permalink
Fixing MatterCastingServerBridge (#25704)
Browse files Browse the repository at this point in the history
The MatterCastingServerBridge is broken due to an [API change in the
subscriptionEstablishedCallback](a8b42c1).

Tested by ensuring this builds successfully
  • Loading branch information
cliffamzn authored and pull[bot] committed Feb 13, 2024
1 parent dbc9a7a commit 2283640
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ - (void)contentLauncher_subscribeSupportedStreamingProtocols:(ContentApp * _Nonn
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"contentLauncher_subscribeSupportedStreamingProtocols"];
callback();
Expand Down Expand Up @@ -912,7 +912,7 @@ - (void)levelControl_subscribeCurrentLevel:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"levelControl_subscribeCurrentLevel"];
callback();
Expand Down Expand Up @@ -957,7 +957,7 @@ - (void)levelControl_subscribeMinLevel:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"levelControl_subscribeMinLevel"];
callback();
Expand Down Expand Up @@ -1002,7 +1002,7 @@ - (void)levelControl_subscribeMaxLevel:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"levelControl_subscribeMaxLevel"];
callback();
Expand Down Expand Up @@ -1319,7 +1319,7 @@ - (void)mediaPlayback_subscribeCurrentState:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeCurrentState"];
callback();
Expand Down Expand Up @@ -1364,7 +1364,7 @@ - (void)mediaPlayback_subscribeStartTime:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeStartTime"];
callback();
Expand Down Expand Up @@ -1409,7 +1409,7 @@ - (void)mediaPlayback_subscribeDuration:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeDuration"];
callback();
Expand Down Expand Up @@ -1469,7 +1469,7 @@ - (void)mediaPlayback_subscribeSampledPosition:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeSampledPosition"];
callback();
Expand Down Expand Up @@ -1516,7 +1516,7 @@ - (void)mediaPlayback_subscribePlaybackSpeed:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribePlaybackSpeed"];
callback();
Expand Down Expand Up @@ -1563,7 +1563,7 @@ - (void)mediaPlayback_subscribeSeekRangeEnd:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeSeekRangeEnd"];
callback();
Expand Down Expand Up @@ -1610,7 +1610,7 @@ - (void)mediaPlayback_subscribeSeekRangeStart:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"mediaPlayback_subscribeSeekRangeStart"];
callback();
Expand Down Expand Up @@ -1795,7 +1795,7 @@ - (void)targetNavigator_subscribeTargetList:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"targetNavigator_subscribeTargetList"];
callback();
Expand Down Expand Up @@ -1842,7 +1842,7 @@ - (void)targetNavigator_subscribeCurrentTarget:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"targetNavigator_subscribeCurrentTarget"];
callback();
Expand Down Expand Up @@ -1916,7 +1916,7 @@ - (void)applicationBasic_subscribeVendorName:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"applicationBasic_subscribeVendorName"];
callback();
Expand Down Expand Up @@ -1962,7 +1962,7 @@ - (void)applicationBasic_subscribeVendorID:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"applicationBasic_subscribeVendorID"];
callback();
Expand Down Expand Up @@ -2010,7 +2010,7 @@ - (void)applicationBasic_subscribeApplicationName:(ContentApp * _Nonnull)content
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"applicationBasic_subscribeApplicationName"];
callback();
Expand Down Expand Up @@ -2056,7 +2056,7 @@ - (void)applicationBasic_subscribeProductID:(ContentApp * _Nonnull)contentApp
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"applicationBasic_subscribeProductID"];
callback();
Expand Down Expand Up @@ -2105,7 +2105,7 @@ - (void)applicationBasic_subscribeApplicationVersion:(ContentApp * _Nonnull)cont
callback([[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]);
},
minInterval, maxInterval,
[](void * context) {
[](void * context, chip::SubscriptionId subscriptionId) {
void (^callback)() = [[CastingServerBridge getSharedInstance].subscriptionEstablishedCallbacks
objectForKey:@"applicationBasic_subscribeApplicationVersion"];
callback();
Expand Down

0 comments on commit 2283640

Please sign in to comment.