Skip to content

Commit

Permalink
Add some better comments about the queue for MTRClusters/MTRBaseClust…
Browse files Browse the repository at this point in the history
…ers init. (#29237)
  • Loading branch information
bzbarsky-apple authored Sep 18, 2023
1 parent 7423b08 commit 782f9d8
Show file tree
Hide file tree
Showing 4 changed files with 767 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/darwin/Framework/CHIP/templates/MTRBaseClusters.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ NS_ASSUME_NONNULL_BEGIN
{{availability (asUpperCamelCase name preserveAcronyms=true)}}
@interface MTRBaseCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRCluster

/**
* For all instance methods (reads, writes, commands) that take a completion,
* the completion will be called on the provided queue.
*/
- (instancetype _Nullable)initWithDevice:(MTRBaseDevice *)device
endpointID:(NSNumber *)endpointID
queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="First major API revamp"}};
Expand Down
11 changes: 11 additions & 0 deletions src/darwin/Framework/CHIP/templates/MTRClusters.zapt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,17 @@ NS_ASSUME_NONNULL_BEGIN
{{availability (asUpperCamelCase name preserveAcronyms=true)}}
@interface MTRCluster{{asUpperCamelCase name preserveAcronyms=true}} : MTRCluster

/**
{{#zcl_commands}}
{{#first}}
* For all instance methods that take a completion (i.e. command invocations),
* the completion will be called on the provided queue.
{{/first}}
{{else}}
* The queue is currently unused, but may be used in the future for calling completions
* for command invocations if commands are added to this cluster.
{{/zcl_commands}}
*/
- (instancetype _Nullable)initWithDevice:(MTRDevice *)device
endpointID:(NSNumber *)endpointID
queue:(dispatch_queue_t)queue NS_DESIGNATED_INITIALIZER {{availability (asUpperCamelCase name preserveAcronyms=true) minimalRelease="First major API revamp"}};
Expand Down
Loading

0 comments on commit 782f9d8

Please sign in to comment.