1 /* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
2 /* vim: set ts=2 et sw=2 tw=80: */
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 #ifndef mozilla_ipc_Ril_h
8 #define mozilla_ipc_Ril_h 1
10 #include <mozilla/dom/workers/Workers.h>
11 #include <mozilla/ipc/StreamSocket.h>
16 class RilConsumer MOZ_FINAL
: public mozilla::ipc::StreamSocket
19 static nsresult
Register(
20 unsigned int aClientId
,
21 mozilla::dom::workers::WorkerCrossThreadDispatcher
* aDispatcher
);
22 static void Shutdown();
24 ConnectionOrientedSocketIO
* GetIO() MOZ_OVERRIDE
;
27 RilConsumer(unsigned long aClientId
,
28 mozilla::dom::workers::WorkerCrossThreadDispatcher
* aDispatcher
);
30 void ReceiveSocketData(nsAutoPtr
<UnixSocketRawData
>& aMessage
) MOZ_OVERRIDE
;
32 void OnConnectSuccess() MOZ_OVERRIDE
;
33 void OnConnectError() MOZ_OVERRIDE
;
34 void OnDisconnect() MOZ_OVERRIDE
;
36 nsRefPtr
<mozilla::dom::workers::WorkerCrossThreadDispatcher
> mDispatcher
;
37 unsigned long mClientId
;
43 } // namespace mozilla
45 #endif // mozilla_ipc_Ril_h