1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/ipc/ril/Ril.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,45 @@ 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 +#ifndef mozilla_ipc_Ril_h 1.11 +#define mozilla_ipc_Ril_h 1 1.12 + 1.13 +#include <mozilla/dom/workers/Workers.h> 1.14 +#include <mozilla/ipc/UnixSocket.h> 1.15 + 1.16 +namespace mozilla { 1.17 +namespace ipc { 1.18 + 1.19 +class RilConsumer : public mozilla::ipc::UnixSocketConsumer 1.20 +{ 1.21 +public: 1.22 + virtual ~RilConsumer() { } 1.23 + 1.24 + static nsresult Register(unsigned int aClientId, 1.25 + mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher); 1.26 + static void Shutdown(); 1.27 + 1.28 +private: 1.29 + RilConsumer(unsigned long aClientId, 1.30 + 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 + unsigned long mClientId; 1.41 + nsCString mAddress; 1.42 + bool mShutdown; 1.43 +}; 1.44 + 1.45 +} // namespace ipc 1.46 +} // namespace mozilla 1.47 + 1.48 +#endif // mozilla_ipc_Ril_h