Bug 851046 - New interface: BluetoothSocketObserver. r=mrbkap

For those instances which want to be notified for any event sent
from a BluetoothSocket instance, they need to implement this
interface to get notification.
This commit is contained in:
Eric Chou 2013-02-26 10:34:54 +08:00
Родитель 654f57df60
Коммит caa5ee2f75
1 изменённых файлов: 28 добавлений и 0 удалений

Просмотреть файл

@ -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