Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(295)

Side by Side Diff: device/bluetooth/bluetooth_device_android.h

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 4 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
7 7
8 #include <stdint.h>
9
8 #include "base/android/jni_android.h" 10 #include "base/android/jni_android.h"
11 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
10 #include "device/bluetooth/bluetooth_adapter_android.h" 13 #include "device/bluetooth/bluetooth_adapter_android.h"
11 #include "device/bluetooth/bluetooth_device.h" 14 #include "device/bluetooth/bluetooth_device.h"
12 15
13 namespace device { 16 namespace device {
14 17
15 // BluetoothDeviceAndroid along with its owned Java class 18 // BluetoothDeviceAndroid along with its owned Java class
16 // org.chromium.device.bluetooth.ChromeBluetoothDevice implement 19 // org.chromium.device.bluetooth.ChromeBluetoothDevice implement
17 // BluetoothDevice. 20 // BluetoothDevice.
18 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final 21 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceAndroid final
(...skipping 23 matching lines...) Expand all
42 BluetoothAdapterAndroid* GetAdapter() { 45 BluetoothAdapterAndroid* GetAdapter() {
43 return static_cast<BluetoothAdapterAndroid*>(adapter_); 46 return static_cast<BluetoothAdapterAndroid*>(adapter_);
44 } 47 }
45 48
46 // Updates cached copy of advertised UUIDs discovered during a scan. 49 // Updates cached copy of advertised UUIDs discovered during a scan.
47 // Returns true if new UUIDs differed from cached values. 50 // Returns true if new UUIDs differed from cached values.
48 bool UpdateAdvertisedUUIDs( 51 bool UpdateAdvertisedUUIDs(
49 jobject advertised_uuids); // Java Type: List<ParcelUuid> 52 jobject advertised_uuids); // Java Type: List<ParcelUuid>
50 53
51 // BluetoothDevice: 54 // BluetoothDevice:
52 uint32 GetBluetoothClass() const override; 55 uint32_t GetBluetoothClass() const override;
53 std::string GetAddress() const override; 56 std::string GetAddress() const override;
54 VendorIDSource GetVendorIDSource() const override; 57 VendorIDSource GetVendorIDSource() const override;
55 uint16 GetVendorID() const override; 58 uint16_t GetVendorID() const override;
56 uint16 GetProductID() const override; 59 uint16_t GetProductID() const override;
57 uint16 GetDeviceID() const override; 60 uint16_t GetDeviceID() const override;
58 bool IsPaired() const override; 61 bool IsPaired() const override;
59 bool IsConnected() const override; 62 bool IsConnected() const override;
60 bool IsGattConnected() const override; 63 bool IsGattConnected() const override;
61 bool IsConnectable() const override; 64 bool IsConnectable() const override;
62 bool IsConnecting() const override; 65 bool IsConnecting() const override;
63 UUIDList GetUUIDs() const override; 66 UUIDList GetUUIDs() const override;
64 int16 GetInquiryRSSI() const override; 67 int16_t GetInquiryRSSI() const override;
65 int16 GetInquiryTxPower() const override; 68 int16_t GetInquiryTxPower() const override;
66 bool ExpectingPinCode() const override; 69 bool ExpectingPinCode() const override;
67 bool ExpectingPasskey() const override; 70 bool ExpectingPasskey() const override;
68 bool ExpectingConfirmation() const override; 71 bool ExpectingConfirmation() const override;
69 void GetConnectionInfo(const ConnectionInfoCallback& callback) override; 72 void GetConnectionInfo(const ConnectionInfoCallback& callback) override;
70 void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate, 73 void Connect(device::BluetoothDevice::PairingDelegate* pairing_delegate,
71 const base::Closure& callback, 74 const base::Closure& callback,
72 const ConnectErrorCallback& error_callback) override; 75 const ConnectErrorCallback& error_callback) override;
73 void SetPinCode(const std::string& pincode) override; 76 void SetPinCode(const std::string& pincode) override;
74 void SetPasskey(uint32 passkey) override; 77 void SetPasskey(uint32_t passkey) override;
75 void ConfirmPairing() override; 78 void ConfirmPairing() override;
76 void RejectPairing() override; 79 void RejectPairing() override;
77 void CancelPairing() override; 80 void CancelPairing() override;
78 void Disconnect(const base::Closure& callback, 81 void Disconnect(const base::Closure& callback,
79 const ErrorCallback& error_callback) override; 82 const ErrorCallback& error_callback) override;
80 void Forget(const base::Closure& callback, 83 void Forget(const base::Closure& callback,
81 const ErrorCallback& error_callback) override; 84 const ErrorCallback& error_callback) override;
82 void ConnectToService( 85 void ConnectToService(
83 const device::BluetoothUUID& uuid, 86 const device::BluetoothUUID& uuid,
84 const ConnectToServiceCallback& callback, 87 const ConnectToServiceCallback& callback,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
123 base::android::ScopedJavaGlobalRef<jobject> j_device_; 126 base::android::ScopedJavaGlobalRef<jobject> j_device_;
124 127
125 bool gatt_connected_ = false; 128 bool gatt_connected_ = false;
126 129
127 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid); 130 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceAndroid);
128 }; 131 };
129 132
130 } // namespace device 133 } // namespace device
131 134
132 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_ 135 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_ANDROID_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_device.cc ('k') | device/bluetooth/bluetooth_device_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698