Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f7908cb6 authored by Etan Cohen's avatar Etan Cohen
Browse files

[AWARE] Clarify semantics of service discovery parameters

On service discovery which happens on the subscriber we receive
some information about the peer (the publisher): it's id, some
arbitrary blob it's providing (ssi), and a "match filter". The
match filter is the matching criteria (aside from service name)
used to find a service. The semantics are clarified by this CL:

- Unsolicited publish/passive subscriber: the publisher is active
  and broadcasting. We're getting the match filter which it
  advertises. No change.

- Solicited publish/active subscriber: the publisher is silent
  and will only respond if it matches what the subscriber provides.
  In such a case we will never know it's exact criteria and
  therefore cannot provide it to the app. We're simply providing
  the local match criteria. This is a clarification/possible
  change from initial understanding.

Bug: 36371061
Test: DiscoveryTest:test_positive_solicited_active_typical
Change-Id: I7d989cf0dc2383d15e4df18c9c0ea079f0486d80
parent add0bb52
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -100,7 +100,12 @@ public class DiscoverySessionCallback {
     * @param serviceSpecificInfo The service specific information (arbitrary
     *            byte array) provided by the peer as part of its discovery
     *            configuration.
     * @param matchFilter The filter which resulted in this service discovery.
     * @param matchFilter The filter which resulted in this service discovery. For
     * {@link PublishConfig#PUBLISH_TYPE_UNSOLICITED},
     * {@link SubscribeConfig#SUBSCRIBE_TYPE_PASSIVE} discovery sessions this is the publisher's
     *                    match filter. For {@link PublishConfig#PUBLISH_TYPE_SOLICITED},
     *                    {@link SubscribeConfig#SUBSCRIBE_TYPE_ACTIVE} discovery sessions this
     *                    is the subscriber's match filter.
     */
    public void onServiceDiscovered(PeerHandle peerHandle,
            byte[] serviceSpecificInfo, List<byte[]> matchFilter) {