1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/nfc/Nfc.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 1.5 +/* vim: set sw=2 ts=8 et ft=cpp: */ 1.6 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.9 + 1.10 +/* Copyright © 2013, Deutsche Telekom, Inc. */ 1.11 + 1.12 +#ifndef mozilla_ipc_Nfc_h 1.13 +#define mozilla_ipc_Nfc_h 1 1.14 + 1.15 +#include <mozilla/dom/workers/Workers.h> 1.16 +#include <mozilla/ipc/UnixSocket.h> 1.17 + 1.18 +namespace mozilla { 1.19 +namespace ipc { 1.20 + 1.21 +class NfcConsumer : public mozilla::ipc::UnixSocketConsumer 1.22 +{ 1.23 +public: 1.24 + virtual ~NfcConsumer() { } 1.25 + 1.26 + static nsresult Register(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher); 1.27 + static void Shutdown(); 1.28 + 1.29 +private: 1.30 + NfcConsumer(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher); 1.31 + 1.32 + virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aMessage); 1.33 + 1.34 + virtual void OnConnectSuccess(); 1.35 + virtual void OnConnectError(); 1.36 + virtual void OnDisconnect(); 1.37 + 1.38 +private: 1.39 + nsRefPtr<mozilla::dom::workers::WorkerCrossThreadDispatcher> mDispatcher; 1.40 + nsCString mAddress; 1.41 + bool mShutdown; 1.42 +}; 1.43 + 1.44 +} // namespace ipc 1.45 +} // namepsace mozilla 1.46 + 1.47 +#endif // mozilla_ipc_Nfc_h