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.
Add handling for SetAliroReaderConfig and ClearAliroReaderConfig comm…
…ands Add a delegate for the door lock to provide the attribute data for the aliro attributes
- Loading branch information
1 parent
1582d8c
commit e7bb3b3
Showing
4 changed files
with
584 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
/* | ||
* | ||
* 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. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include <app-common/zap-generated/cluster-objects.h> | ||
|
||
namespace chip { | ||
namespace app { | ||
namespace Clusters { | ||
namespace DoorLock { | ||
|
||
static constexpr size_t kAliroReaderVerificationKeyMaxSize = 65; | ||
|
||
static constexpr size_t kAliroAttributeMaxSize_16 = 16; | ||
|
||
static constexpr size_t kProtocolVersionMaxSize = 2; | ||
|
||
/** @brief | ||
* Defines methods for implementing application-specific logic for the door lock cluster. | ||
* It defines the interfaces that a door lock should implement to support Aliro provisioning attributes. | ||
*/ | ||
|
||
class Delegate | ||
{ | ||
public: | ||
Delegate() = default; | ||
|
||
virtual ~Delegate() = default; | ||
|
||
/** | ||
* @brief Get the Aliro verification key component of the Reader's key pair. | ||
* | ||
* @param[out] verificationKey The MutableByteSpan to copy the verification key into. On success, | ||
* the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroReaderVerificationKey(MutableByteSpan & aliroVerificationKey) = 0; | ||
|
||
/** | ||
* @brief Get the Reader's group identifier | ||
* | ||
* @param[out] groupIdentifier The MutableByteSpan to copy the group identifier into. On success, | ||
* the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroReaderGroupIdentifier(MutableByteSpan & aliroGroupIdentifier) = 0; | ||
|
||
/** | ||
* @brief Get the Reader's subgroup identifier | ||
* | ||
* @param[out] groupIdentifier The MutableByteSpan to copy the group subidentifier into. On success, | ||
* the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroReaderGroupSubIdentifier(MutableByteSpan & aliroGroupSubIdentifier) = 0; | ||
|
||
/** | ||
* @brief Get the Aliro expedited transaction supported protocol version at the given index. | ||
* | ||
* @param[in] index The index of the protocol version in the list. | ||
* @param[out] protocolVersion The MutableByteSpan to copy the expedited transaction supported protocol version at the given | ||
* index into. On success, the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroExpeditedTransactionSupportedProtocolVersionAtIndex(size_t index, | ||
MutableByteSpan & protocolVersion) = 0; | ||
|
||
/** | ||
* @brief Get the Reader's group resolving key. | ||
* | ||
* @param[out] aliroGroupResolvingKey The MutableByteSpan to copy the aliro group resolving key into. On success, | ||
* the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroGroupResolvingKey(MutableByteSpan & aliroGroupResolvingKey) = 0; | ||
|
||
/** | ||
* @brief Get the Aliro supported BLE UWB protocol version at the given index. | ||
* | ||
* @param[in] index The index of the protocol version in the list. | ||
* @param[out] protocolVersion The MutableByteSpan to copy the supported BLE UWB protocol version at the given index into. | ||
* On success, the callee must update the length to the length of the copied data. | ||
*/ | ||
virtual CHIP_ERROR GetAliroSupportedBLEUWBProtocolVersionAtIndex(size_t index, MutableByteSpan & protocolVersion) = 0; | ||
|
||
/** | ||
* @brief Get the Aliro BLE Advertising Version. | ||
* | ||
* @param[out] aliroBLEAdvertisingVersion The BLE Advertising Version. | ||
*/ | ||
virtual CHIP_ERROR GetAliroBLEAdvertisingVersion(uint8_t & aliroBLEAdvertisingVersion) = 0; | ||
|
||
/** | ||
* @brief Get the maximum number of Aliro credential issuer keys supported. | ||
* | ||
* @param[out] numberOfAliroCredentialIssuerKeysSupported The number of credential issuer keys. | ||
*/ | ||
virtual CHIP_ERROR GetNumberOfAliroCredentialIssuerKeysSupported(uint16_t & numberOfAliroCredentialIssuerKeysSupported) = 0; | ||
|
||
/** | ||
* @brief Get the maximum number of Aliro endpoint keys supported. | ||
* | ||
* @param[out] numberOfAliroEndpointKeysSupported The number of endpoint keys. | ||
*/ | ||
virtual CHIP_ERROR GetNumberOfAliroEndpointKeysSupported(uint16_t & numberOfAliroEndpointKeysSupported) = 0; | ||
}; | ||
|
||
} // namespace DoorLock | ||
} // namespace Clusters | ||
} // namespace app | ||
} // namespace chip |
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
Oops, something went wrong.