dom/wifi/WifiProxyService.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/wifi/WifiProxyService.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,47 @@
     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 WifiProxyService_h
     1.9 +#define WifiProxyService_h
    1.10 +
    1.11 +#include "nsIWifiService.h"
    1.12 +#include "nsCOMPtr.h"
    1.13 +#include "nsThread.h"
    1.14 +#include "mozilla/dom/WifiOptionsBinding.h"
    1.15 +#include "nsTArray.h"
    1.16 +
    1.17 +namespace mozilla {
    1.18 +
    1.19 +class WifiProxyService MOZ_FINAL : public nsIWifiProxyService
    1.20 +{
    1.21 +private:
    1.22 +  struct EventThreadListEntry
    1.23 +  {
    1.24 +    nsCOMPtr<nsIThread> mThread;
    1.25 +    nsCString mInterface;
    1.26 +  };
    1.27 +
    1.28 +public:
    1.29 +  NS_DECL_ISUPPORTS
    1.30 +  NS_DECL_NSIWIFIPROXYSERVICE
    1.31 +
    1.32 +  static already_AddRefed<WifiProxyService>
    1.33 +  FactoryCreate();
    1.34 +
    1.35 +  void DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface);
    1.36 +  void DispatchWifiResult(const mozilla::dom::WifiResultOptions& aOptions,
    1.37 +                          const nsACString& aInterface);
    1.38 +
    1.39 +private:
    1.40 +  WifiProxyService();
    1.41 +  ~WifiProxyService();
    1.42 +
    1.43 +  nsTArray<EventThreadListEntry> mEventThreadList;
    1.44 +  nsCOMPtr<nsIThread> mControlThread;
    1.45 +  nsCOMPtr<nsIWifiEventListener> mListener;
    1.46 +};
    1.47 +
    1.48 +} // namespace mozilla
    1.49 +
    1.50 +#endif // WifiProxyService_h

mercurial