Bug 851046: Patch 1 - New interface: BluetoothSocketObserver; r=mrbkap
authorEric Chou <echou@mozilla.com>
Thu, 04 Apr 2013 17:51:35 -0700
changeset 127740 bf47d3b3d6c1b0a6f30c628fb3a08eaf3efe54a7
parent 127739 2edc2af0ec32bdaad1900b2459f928536920c257
child 127741 c3f5fa4c5fc9db888175510c7ecf5da96f4e47e8
push id24512
push userryanvm@gmail.com
push dateFri, 05 Apr 2013 20:13:49 +0000
treeherdermozilla-central@139b6ba547fa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs851046
milestone23.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 851046: Patch 1 - New interface: BluetoothSocketObserver; r=mrbkap
dom/bluetooth/BluetoothSocketObserver.h
new file mode 100644
--- /dev/null
+++ b/dom/bluetooth/BluetoothSocketObserver.h
@@ -0,0 +1,28 @@
+/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
+/* vim: set ts=2 et sw=2 tw=80: */
+/* This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#ifndef mozilla_dom_bluetooth_BluetoothSocketObserver_h
+#define mozilla_dom_bluetooth_BluetoothSocketObserver_h
+
+#include "BluetoothCommon.h"
+#include <mozilla/ipc/UnixSocket.h>
+
+using namespace mozilla::ipc;
+
+BEGIN_BLUETOOTH_NAMESPACE
+
+class BluetoothSocketObserver
+{
+public:
+  virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage) = 0;
+  virtual void OnConnectSuccess() = 0;
+  virtual void OnConnectError() = 0;
+  virtual void OnDisconnect() = 0;
+};
+
+END_BLUETOOTH_NAMESPACE
+
+#endif