forked from project-chip/connectedhomeip
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/message-cluster-present-message-up…
…date
- Loading branch information
Showing
23 changed files
with
2,007 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
#!/usr/bin/env bash | ||
# | ||
# Copyright (c) 2020-2023 Project CHIP Authors | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
JQ=$(which jq) | ||
if [ $? -ne 0 ]; then | ||
echo "'jq' not detected in PATH. Install using: brew install jq" | ||
exit 1 | ||
fi | ||
|
||
set -e | ||
set -x | ||
|
||
source "$(dirname "$0")/../../scripts/activate.sh" | ||
CHIP_ROOT="$(dirname "$0")/../.." | ||
OUTPUT_DIR=$2 | ||
|
||
# Build the framework | ||
scripts/examples/gn_build_example.sh "$@" generate_compilation_database=true | ||
|
||
# Clean up any stale DB files | ||
find "$OUTPUT_DIR" -iname compile_commands\*.json | xargs rm | ||
|
||
# Construct json from fragments generated by xcodebuild | ||
COMPDB_FRAGMENTS_DIR=$(find "$OUTPUT_DIR" -type d -name compdb) | ||
sed -e '1s/^/[\'$'\n''/' -e '$s/,$/\'$'\n'']/' "$COMPDB_FRAGMENTS_DIR"/*.json >"$OUTPUT_DIR"/compile_commands_darwin_framework.json | ||
|
||
# Get ninja to build comdb for the rest | ||
ninja -C "$OUTPUT_DIR" -t compdb >"$OUTPUT_DIR"/compile_commands_rest.json | ||
|
||
# Combine the generated compdb into one | ||
find "$OUTPUT_DIR" -iname compile_commands\*.json | xargs jq -s 'map(.[])' >"$OUTPUT_DIR"/compile_commands.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/** | ||
* Copyright (c) 2024 Project CHIP Authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
#import <Foundation/Foundation.h> | ||
#import <Matter/MTRBaseClusters.h> | ||
#import <Matter/MTRDefines.h> | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
/** | ||
* An access grant, which can be represented as an entry in the Matter Access | ||
* Control cluster. | ||
*/ | ||
MTR_NEWLY_AVAILABLE | ||
@interface MTRAccessGrant : NSObject <NSCopying> | ||
|
||
- (instancetype)init NS_UNAVAILABLE; | ||
+ (instancetype)new NS_UNAVAILABLE; | ||
|
||
/** | ||
* Grant access at the provided level to a specific node on the fabric. The | ||
* provided nodeID must be an operational node identifier. | ||
*/ | ||
+ (nullable MTRAccessGrant *)accessGrantForNodeID:(NSNumber *)nodeID privilege:(MTRAccessControlEntryPrivilege)privilege; | ||
|
||
/** | ||
* Grant access to any node on the fabric that has a matching CASE Authenticated | ||
* Tag in its operational certificate. The provided caseAuthenticatedTag must | ||
* be a 32-bit unsigned integer with lower 16 bits not 0, per the Matter | ||
* specification. | ||
*/ | ||
+ (nullable MTRAccessGrant *)accessGrantForCASEAuthenticatedTag:(NSNumber *)caseAuthenticatedTag privilege:(MTRAccessControlEntryPrivilege)privilege; | ||
|
||
/** | ||
* Grant access to any node on the fabric that is communicating with us via | ||
* group messages sent to the given group. The provided groupID must be a valid | ||
* group identifier in the range 1-65535. | ||
*/ | ||
+ (nullable MTRAccessGrant *)accessGrantForGroupID:(NSNumber *)groupID privilege:(MTRAccessControlEntryPrivilege)privilege; | ||
|
||
/** | ||
* Grant access to any node on the fabric, as long as it's communicating with us | ||
* over a unicast authenticated channel. | ||
*/ | ||
+ (MTRAccessGrant *)accessGrantForAllNodesWithPrivilege:(MTRAccessControlEntryPrivilege)privilege; | ||
|
||
/** | ||
* The matter access control subject ID that access has been granted for. Nil | ||
* when access has been granted for all subjects (e.g. via initForAllNodesWithPrivilege). | ||
*/ | ||
@property (nonatomic, copy, readonly, nullable) NSNumber * subjectID; | ||
|
||
/** | ||
* The privilege that has been granted | ||
*/ | ||
@property (nonatomic, assign, readonly) MTRAccessControlEntryPrivilege grantedPrivilege; | ||
|
||
/** | ||
* The type of authentication mode the access grant is | ||
* for. MTRAccessControlEntryAuthModeCASE for unicast messages and | ||
* MTRAccessControlEntryAuthModeGroup for groupcast ones. | ||
*/ | ||
@property (nonatomic, assign, readonly) MTRAccessControlEntryAuthMode authenticationMode; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
Oops, something went wrong.