Subscribe for public credentials update

Nearby Presence scanning sessions may be very long. We need a way to notify the scanner that new credentials were added during scanning.
`SubscribeForPublicCredentials()` allows us to subscribe for such updates.

PiperOrigin-RevId: 502699345
This commit is contained in:
Janusz Sobczak
2023-01-17 15:07:14 -08:00
committed by Copybara-Service
parent 79834a0ee0
commit ca547df4d7
9 changed files with 495 additions and 81 deletions
@@ -43,6 +43,17 @@ struct CredentialSelector {
credential_selector.account_name,
static_cast<int>(credential_selector.identity_type));
}
template <typename H>
friend H AbslHashValue(H h, const CredentialSelector& selector) {
return H::combine(std::move(h), selector.manager_app_id,
selector.account_name, selector.identity_type);
}
friend bool operator==(const CredentialSelector& a,
const CredentialSelector& b) {
return a.manager_app_id == b.manager_app_id &&
a.account_name == b.account_name &&
a.identity_type == b.identity_type;
}
};
enum class PublicCredentialType {