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

Side by Side Diff: chrome/browser/chromeos/bluetooth/bluetooth_socket.h

Issue 10007008: Add support for creating bluetooth RFCOMM sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reupload off of proper base Created 8 years, 8 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SOCKET_H_
6 #define CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SOCKET_H_
7 #pragma once
8
9 #include <string>
10
11 #include "base/memory/weak_ptr.h"
12
13 namespace chromeos {
14
15 class BluetoothDevice;
16
17 // The BluetoothSocket class represents a socket to a specific service on
18 // a BluetoothDevice.
keybuk 2012/04/19 01:05:40 Comment should explain about ref counting.
19 class BluetoothSocket : public base::RefCounted<BluetoothSocket> {
20 public:
21 // The fd of this socket.
22 int fd() const { return fd_; }
23
24 private:
25 friend class base::RefCounted<BluetoothSocket>;
26 friend class BluetoothDevice;
27
28 BluetoothSocket(BluetoothDevice* device, const std::string& service_uuid,
29 int fd);
30 virtual ~BluetoothSocket();
31
32 BluetoothDevice* device_;
33 const std::string service_uuid_;
34 const int fd_;
35
36 DISALLOW_COPY_AND_ASSIGN(BluetoothSocket);
37 };
38
39 } // namespace chromeos
40
41 #endif // CHROME_BROWSER_CHROMEOS_BLUETOOTH_BLUETOOTH_SOCKET_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698