gecko/dom/nfc/gonk/NfcService.h
Yoshi Huang 40974d05e0 Bug 1097442 - Part 2: rename nsINfcEventListener. r=dimi
From f2abd94c7d0c1f79c55b813bcd32a1b2761949d1 Mon Sep 17 00:00:00 2001
---
 dom/nfc/gonk/Nfc.js             | 2 +-
 dom/nfc/gonk/NfcService.cpp     | 2 +-
 dom/nfc/gonk/NfcService.h       | 2 +-
 dom/nfc/gonk/nsINfcService.idl  | 8 ++++----
 dom/nfc/nsINfcContentHelper.idl | 6 +++---
 dom/nfc/nsNfc.js                | 2 +-
 6 files changed, 11 insertions(+), 11 deletions(-)
2014-11-12 11:22:36 +08:00

52 lines
1.2 KiB
C++

/* 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 NfcService_h
#define NfcService_h
#include "mozilla/ipc/Nfc.h"
#include "mozilla/ipc/UnixSocket.h"
#include "nsCOMPtr.h"
#include "nsINfcService.h"
#include "NfcMessageHandler.h"
class nsIThread;
namespace mozilla {
namespace dom {
class NfcEventOptions;
} // namespace dom
class NfcService MOZ_FINAL : public nsINfcService,
public mozilla::ipc::NfcSocketListener
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSINFCSERVICE
static already_AddRefed<NfcService> FactoryCreate();
void DispatchNfcEvent(const mozilla::dom::NfcEventOptions& aOptions);
virtual void
ReceiveSocketData(nsAutoPtr<mozilla::ipc::UnixSocketRawData>& aData) MOZ_OVERRIDE;
nsCOMPtr<nsIThread> GetThread() {
return mThread;
}
private:
NfcService();
~NfcService();
nsCOMPtr<nsIThread> mThread;
nsCOMPtr<nsINfcGonkEventListener> mListener;
nsRefPtr<mozilla::ipc::NfcConsumer> mConsumer;
nsAutoPtr<NfcMessageHandler> mHandler;
};
} // namespace mozilla
#endif // NfcService_h