diff options
author | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-03 18:24:03 +0000 |
---|---|---|
committer | youngki@chromium.org <youngki@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-03 18:24:03 +0000 |
commit | 246493d0b4d74a899c76ef0d1d8f14b62eafcca4 (patch) | |
tree | dd7bebec70aec4c3e915cf4bab0edc3d6d574882 /device/bluetooth/bluetooth_socket_win.h | |
parent | 1b5ebdb657626b0c5a9552c598a9103b48f72d80 (diff) | |
download | chromium_src-246493d0b4d74a899c76ef0d1d8f14b62eafcca4.zip chromium_src-246493d0b4d74a899c76ef0d1d8f14b62eafcca4.tar.gz chromium_src-246493d0b4d74a899c76ef0d1d8f14b62eafcca4.tar.bz2 |
Implemented BluetoothSocketWin.
BUG=135470
Review URL: https://chromiumcodereview.appspot.com/12052066
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@180315 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'device/bluetooth/bluetooth_socket_win.h')
-rw-r--r-- | device/bluetooth/bluetooth_socket_win.h | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/device/bluetooth/bluetooth_socket_win.h b/device/bluetooth/bluetooth_socket_win.h index 78bd78f..59f7761 100644 --- a/device/bluetooth/bluetooth_socket_win.h +++ b/device/bluetooth/bluetooth_socket_win.h @@ -5,8 +5,11 @@ #ifndef DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ #define DEVICE_BLUETOOTH_BLUETOOTH_SOCKET_WIN_H_ +#include <WinSock2.h> + #include <string> +#include "base/memory/ref_counted.h" #include "device/bluetooth/bluetooth_socket.h" namespace net { @@ -18,18 +21,30 @@ class GrowableIOBuffer; namespace device { +class BluetoothServiceRecord; + +// This class is an implementation of BluetoothSocket class for Windows +// platform. class BluetoothSocketWin : public BluetoothSocket { public: - // BluetoothSocket override - virtual int fd() const OVERRIDE; + static scoped_refptr<BluetoothSocket> CreateBluetoothSocket( + const BluetoothServiceRecord& service_record); + // BluetoothSocket override virtual bool Receive(net::GrowableIOBuffer* buffer) OVERRIDE; virtual bool Send(net::DrainableIOBuffer* buffer) OVERRIDE; virtual std::string GetLastErrorMessage() const OVERRIDE; - private: - BluetoothSocketWin(); + protected: virtual ~BluetoothSocketWin(); + + private: + BluetoothSocketWin(SOCKET fd); + + const SOCKET fd_; + std::string error_message_; + + DISALLOW_COPY_AND_ASSIGN(BluetoothSocketWin); }; } // namespace device |