Bumping manifests a=b2g-bump
[gecko.git] / ipc / nfc / Nfc.h
blob56cbd9600e2a9229010f00ecc4abcb14bee9b9f9
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>
14 namespace mozilla {
15 namespace ipc {
17 class NfcSocketListener
19 public:
20 virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aData) = 0;
23 class NfcConsumer : public mozilla::ipc::UnixSocketConsumer
25 public:
26 NfcConsumer(NfcSocketListener* aListener);
27 virtual ~NfcConsumer() { }
29 void Shutdown();
30 bool PostToNfcDaemon(const uint8_t* aData, size_t aSize);
32 private:
33 virtual void ReceiveSocketData(nsAutoPtr<UnixSocketRawData>& aData);
35 virtual void OnConnectSuccess();
36 virtual void OnConnectError();
37 virtual void OnDisconnect();
39 private:
40 NfcSocketListener* mListener;
41 nsCString mAddress;
42 bool mShutdown;
45 } // namespace ipc
46 } // namepsace mozilla
48 #endif // mozilla_ipc_Nfc_h