gecko/dom/bluetooth2/BluetoothPairingListener.h
Ehsan Akhgari 33bb32f549 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00

72 lines
2.2 KiB
C++

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim:set ts=2 sw=2 sts=2 et cindent: */
/* 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_bluetoothpairinglistener_h
#define mozilla_dom_bluetooth_bluetoothpairinglistener_h
#include "BluetoothCommon.h"
#include "mozilla/Attributes.h"
#include "mozilla/DOMEventTargetHelper.h"
BEGIN_BLUETOOTH_NAMESPACE
class BluetoothDevice;
class BluetoothSignal;
class BluetoothPairingListener final : public DOMEventTargetHelper
, public BluetoothSignalObserver
{
public:
NS_DECL_ISUPPORTS_INHERITED
static already_AddRefed<BluetoothPairingListener>
Create(nsPIDOMWindow* aWindow);
void DispatchPairingEvent(const nsAString& aName,
const nsAString& aAddress,
const nsAString& aPasskey,
const nsAString& aType);
void Notify(const BluetoothSignal& aParam); // BluetoothSignalObserver
nsPIDOMWindow* GetParentObject() const
{
return GetOwner();
}
virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
virtual void DisconnectFromOwner() override;
virtual void EventListenerAdded(nsIAtom* aType) override;
IMPL_EVENT_HANDLER(displaypasskeyreq);
IMPL_EVENT_HANDLER(enterpincodereq);
IMPL_EVENT_HANDLER(pairingconfirmationreq);
IMPL_EVENT_HANDLER(pairingconsentreq);
private:
BluetoothPairingListener(nsPIDOMWindow* aWindow);
~BluetoothPairingListener();
/**
* Listen to bluetooth signal if all pairing event handlers are ready.
*
* Listen to bluetooth signal only if all pairing event handlers have been
* attached. All pending pairing requests queued in BluetoothService would be
* fired when pairing listener starts listening to bluetooth signal.
*/
void TryListeningToBluetoothSignal();
/**
* Indicate whether or not this pairing listener has started listening to
* Bluetooth signal.
*/
bool mHasListenedToSignal;
};
END_BLUETOOTH_NAMESPACE
#endif // mozilla_dom_bluetooth_bluetoothpairinglistener_h