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/ipc/UnixSocket.h>
17 class NfcSocketListener
20 virtual void ReceiveSocketData(nsAutoPtr
<UnixSocketRawData
>& aData
) = 0;
23 class NfcConsumer
: public mozilla::ipc::UnixSocketConsumer
26 NfcConsumer(NfcSocketListener
* aListener
);
27 virtual ~NfcConsumer() { }
30 bool PostToNfcDaemon(const uint8_t* aData
, size_t aSize
);
33 virtual void ReceiveSocketData(nsAutoPtr
<UnixSocketRawData
>& aData
);
35 virtual void OnConnectSuccess();
36 virtual void OnConnectError();
37 virtual void OnDisconnect();
40 NfcSocketListener
* mListener
;
46 } // namepsace mozilla
48 #endif // mozilla_ipc_Nfc_h