dom/system/gonk/NetworkWorker.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/system/gonk/NetworkWorker.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,37 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#ifndef NetworkWorker_h
     1.9 +#define NetworkWorker_h
    1.10 +
    1.11 +#include "mozilla/dom/NetworkOptionsBinding.h"
    1.12 +#include "mozilla/ipc/Netd.h"
    1.13 +#include "nsINetworkWorker.h"
    1.14 +#include "nsCOMPtr.h"
    1.15 +#include "nsThread.h"
    1.16 +
    1.17 +namespace mozilla {
    1.18 +
    1.19 +class NetworkWorker MOZ_FINAL : public nsINetworkWorker
    1.20 +{
    1.21 +public:
    1.22 +  NS_DECL_ISUPPORTS
    1.23 +  NS_DECL_NSINETWORKWORKER
    1.24 +
    1.25 +  static already_AddRefed<NetworkWorker> FactoryCreate();
    1.26 +
    1.27 +  void DispatchNetworkResult(const mozilla::dom::NetworkResultOptions& aOptions);
    1.28 +
    1.29 +private:
    1.30 +  NetworkWorker();
    1.31 +  ~NetworkWorker();
    1.32 +
    1.33 +  static void NotifyResult(mozilla::dom::NetworkResultOptions& aResult);
    1.34 +
    1.35 +  nsCOMPtr<nsINetworkEventListener> mListener;
    1.36 +};
    1.37 +
    1.38 +} // namespace mozilla
    1.39 +
    1.40 +#endif  // NetworkWorker_h

mercurial