michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim: set sw=2 ts=8 et ft=cpp: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* Copyright © 2013, Deutsche Telekom, Inc. */ michael@0: michael@0: #ifndef mozilla_ipc_Nfc_h michael@0: #define mozilla_ipc_Nfc_h 1 michael@0: michael@0: #include michael@0: #include michael@0: michael@0: namespace mozilla { michael@0: namespace ipc { michael@0: michael@0: class NfcConsumer : public mozilla::ipc::UnixSocketConsumer michael@0: { michael@0: public: michael@0: virtual ~NfcConsumer() { } michael@0: michael@0: static nsresult Register(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher); michael@0: static void Shutdown(); michael@0: michael@0: private: michael@0: NfcConsumer(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher); michael@0: michael@0: virtual void ReceiveSocketData(nsAutoPtr& aMessage); michael@0: michael@0: virtual void OnConnectSuccess(); michael@0: virtual void OnConnectError(); michael@0: virtual void OnDisconnect(); michael@0: michael@0: private: michael@0: nsRefPtr mDispatcher; michael@0: nsCString mAddress; michael@0: bool mShutdown; michael@0: }; michael@0: michael@0: } // namespace ipc michael@0: } // namepsace mozilla michael@0: michael@0: #endif // mozilla_ipc_Nfc_h