Bumping manifests a=b2g-bump
[gecko.git] / dom / bluetooth / BluetoothSocketObserver.h
blob6a2d6f89bad7235d53112c07a70ba7265ad6c829
1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef mozilla_dom_bluetooth_BluetoothSocketObserver_h
8 #define mozilla_dom_bluetooth_BluetoothSocketObserver_h
10 #include "BluetoothCommon.h"
11 #include "mozilla/ipc/UnixSocket.h"
13 BEGIN_BLUETOOTH_NAMESPACE
15 class BluetoothSocket;
17 class BluetoothSocketObserver
19 public:
20 virtual void ReceiveSocketData(
21 BluetoothSocket* aSocket,
22 nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aMessage) = 0;
24 /**
25 * A callback function which would be called when a socket connection
26 * is established successfully. To be more specific, this would be called
27 * when socket state changes from CONNECTING/LISTENING to CONNECTED.
29 virtual void OnSocketConnectSuccess(BluetoothSocket* aSocket) = 0;
31 /**
32 * A callback function which would be called when BluetoothSocket::Connect()
33 * fails.
35 virtual void OnSocketConnectError(BluetoothSocket* aSocket) = 0;
37 /**
38 * A callback function which would be called when a socket connection
39 * is dropped. To be more specific, this would be called when socket state
40 * changes from CONNECTED/LISTENING to DISCONNECTED.
42 virtual void OnSocketDisconnect(BluetoothSocket* aSocket) = 0;
46 END_BLUETOOTH_NAMESPACE
48 #endif