blob: 146824549a599cdcdde9a2e54f4f6665f97c75c1 [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include "base/optional.h"
#include "chromecast/device/bluetooth/le/le_scan_result.h"
#include "chromecast/public/bluetooth/bluetooth_types.h"
namespace chromecast {
namespace bluetooth {
struct ScanFilter {
// Helper function to get ScanFilter which matches 16 bit |service_uuid|.
static ScanFilter From16bitUuid(uint16_t service_uuid);
ScanFilter(const ScanFilter& other);
ScanFilter(ScanFilter&& other);
bool Matches(const LeScanResult& scan_result) const;
// Exact name.
base::Optional<std::string> name;
// RE2 partial match on name. This is ignored if |name| is specified.
base::Optional<std::string> regex_name;
base::Optional<bluetooth_v2_shlib::Uuid> service_uuid;
} // namespace bluetooth
} // namespace chromecast