blob: 1b47b4db8d7950b11b8a841bbddd33932d8f2326 [file] [log] [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <optional>
#include <string>
#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.
std::optional<std::string> name;
// RE2 partial match on name. This is ignored if |name| is specified.
std::optional<std::string> regex_name;
std::optional<bluetooth_v2_shlib::Uuid> service_uuid;
} // namespace bluetooth
} // namespace chromecast