Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set sw=2 ts=8 et ft=cpp: */
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 /* Copyright © 2013, Deutsche Telekom, Inc. */
9 #ifndef mozilla_ipc_Nfc_h
10 #define mozilla_ipc_Nfc_h 1
12 #include <mozilla/dom/workers/Workers.h>
13 #include <mozilla/ipc/UnixSocket.h>
15 namespace mozilla {
16 namespace ipc {
18 class NfcConsumer : public mozilla::ipc::UnixSocketConsumer
19 {
20 public:
21 virtual ~NfcConsumer() { }
23 static nsresult Register(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
24 static void Shutdown();
26 private:
27 NfcConsumer(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
29 virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage);
31 virtual void OnConnectSuccess();
32 virtual void OnConnectError();
33 virtual void OnDisconnect();
35 private:
36 nsRefPtr<mozilla::dom::workers::WorkerCrossThreadDispatcher> mDispatcher;
37 nsCString mAddress;
38 bool mShutdown;
39 };
41 } // namespace ipc
42 } // namepsace mozilla
44 #endif // mozilla_ipc_Nfc_h