1 // 2 // Copyright (C) 2017 Google, Inc. 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at: 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 #pragma once 18 19 #include <string> 20 #include <vector> 21 22 #include "bluetooth/uuid.h" 23 24 namespace bluetooth { 25 26 class RemoteDeviceProps { 27 public: 28 RemoteDeviceProps(); 29 RemoteDeviceProps(const RemoteDeviceProps& other); 30 RemoteDeviceProps(const std::string& name, const std::string& address, 31 const std::vector<Uuid>& service_uuids, 32 int32_t device_class, int32_t device_type, int32_t rssi); 33 ~RemoteDeviceProps(); 34 set_address(const std::string & address)35 void set_address(const std::string& address) { address_ = address; } 36 name()37 const std::string& name() const { return name_; } address()38 const std::string& address() const { return address_; } service_uuids()39 const std::vector<Uuid>& service_uuids() const { return service_uuids_; } device_class()40 int32_t device_class() const { return device_class_; } device_type()41 int32_t device_type() const { return device_type_; } rssi()42 int32_t rssi() const { return rssi_; } 43 44 protected: 45 std::string name_; 46 std::string address_; 47 std::vector<Uuid> service_uuids_; 48 int32_t device_class_ = -1; 49 int32_t device_type_ = -1; 50 int32_t rssi_ = -1; 51 }; 52 53 } // namespace bluetooth 54