mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
Data Parse for subsequent pairing non-discoverable advertisement
PiperOrigin-RevId: 534929577
This commit is contained in:
committed by
Copybara-Service
parent
1d5abfcc0f
commit
6b08c4dda7
@@ -26,6 +26,7 @@
|
||||
|
||||
#include "absl/functional/any_invocable.h"
|
||||
#include "absl/strings/string_view.h"
|
||||
#include "fastpair/common/non_discoverable_advertisement.h"
|
||||
#include "fastpair/crypto/decrypted_passkey.h"
|
||||
#include "fastpair/crypto/decrypted_response.h"
|
||||
|
||||
@@ -45,6 +46,9 @@ class FastPairDataParser {
|
||||
using ParseDecryptPasskeyCallback =
|
||||
absl::AnyInvocable<void(std::optional<DecryptedPasskey>)>;
|
||||
|
||||
using ParseNotDiscoverableAdvertisementCallback =
|
||||
absl::AnyInvocable<void(std::optional<NonDiscoverableAdvertisement>)>;
|
||||
|
||||
public:
|
||||
// Gets the hex string representation of the device's model ID from the
|
||||
// service data.
|
||||
@@ -65,6 +69,13 @@ class FastPairDataParser {
|
||||
const std::vector<uint8_t>& aes_key_bytes,
|
||||
const std::vector<uint8_t>& encrypted_passkey_bytes,
|
||||
ParseDecryptPasskeyCallback callback);
|
||||
|
||||
// Parses a 'Non Discoverable' advertisement from |service_data|.
|
||||
// If the advertisement does not contain information about salt, use the
|
||||
// |address| as salt instead.
|
||||
static void ParseNotDiscoverableAdvertisement(
|
||||
absl::string_view fast_pair_service_data, absl::string_view address,
|
||||
ParseNotDiscoverableAdvertisementCallback callback);
|
||||
};
|
||||
|
||||
} // namespace fastpair
|
||||
|
||||
Reference in New Issue
Block a user