2015-01-07 13:19:59 +03:00
|
|
|
/* -*- Mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; tab-width: 40 -*- */
|
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2011-12-07 14:58:56 +04:00
|
|
|
|
|
|
|
#ifndef mozilla_ipc_Ril_h
|
|
|
|
#define mozilla_ipc_Ril_h 1
|
|
|
|
|
2015-07-17 13:10:01 +03:00
|
|
|
#include "nsAutoPtr.h"
|
2015-07-17 13:10:01 +03:00
|
|
|
#include "nsError.h"
|
2015-07-17 13:10:01 +03:00
|
|
|
#include "nsTArray.h"
|
2011-12-07 14:58:56 +04:00
|
|
|
|
|
|
|
namespace mozilla {
|
2015-07-17 13:10:01 +03:00
|
|
|
|
|
|
|
namespace dom {
|
|
|
|
namespace workers {
|
|
|
|
|
|
|
|
class WorkerCrossThreadDispatcher;
|
|
|
|
|
|
|
|
} // namespace workers
|
|
|
|
} // namespace dom
|
|
|
|
|
2011-12-07 14:58:56 +04:00
|
|
|
namespace ipc {
|
|
|
|
|
2015-07-17 13:10:01 +03:00
|
|
|
class RilConsumer;
|
|
|
|
|
2015-07-17 13:10:01 +03:00
|
|
|
class RilWorker final
|
2011-12-07 14:58:56 +04:00
|
|
|
{
|
|
|
|
public:
|
2015-01-07 13:19:59 +03:00
|
|
|
static nsresult Register(
|
|
|
|
unsigned int aClientId,
|
|
|
|
mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
|
2015-07-15 19:53:28 +03:00
|
|
|
|
2015-07-17 13:10:01 +03:00
|
|
|
static void Shutdown();
|
2015-07-17 13:10:01 +03:00
|
|
|
|
|
|
|
private:
|
|
|
|
RilWorker(mozilla::dom::workers::WorkerCrossThreadDispatcher* aDispatcher);
|
|
|
|
|
|
|
|
nsresult RegisterConsumer(unsigned int aClientId);
|
|
|
|
void UnregisterConsumer(unsigned int aClientId);
|
|
|
|
|
|
|
|
static nsTArray<nsAutoPtr<RilWorker>> sRilWorkers;
|
|
|
|
|
|
|
|
nsRefPtr<mozilla::dom::workers::WorkerCrossThreadDispatcher> mDispatcher;
|
2013-02-01 16:28:22 +04:00
|
|
|
};
|
2011-12-07 14:58:56 +04:00
|
|
|
|
|
|
|
} // namespace ipc
|
2013-02-01 16:28:22 +04:00
|
|
|
} // namespace mozilla
|
2011-12-07 14:58:56 +04:00
|
|
|
|
|
|
|
#endif // mozilla_ipc_Ril_h
|