dom/wifi/WifiProxyService.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     5 #ifndef WifiProxyService_h
     6 #define WifiProxyService_h
     8 #include "nsIWifiService.h"
     9 #include "nsCOMPtr.h"
    10 #include "nsThread.h"
    11 #include "mozilla/dom/WifiOptionsBinding.h"
    12 #include "nsTArray.h"
    14 namespace mozilla {
    16 class WifiProxyService MOZ_FINAL : public nsIWifiProxyService
    17 {
    18 private:
    19   struct EventThreadListEntry
    20   {
    21     nsCOMPtr<nsIThread> mThread;
    22     nsCString mInterface;
    23   };
    25 public:
    26   NS_DECL_ISUPPORTS
    27   NS_DECL_NSIWIFIPROXYSERVICE
    29   static already_AddRefed<WifiProxyService>
    30   FactoryCreate();
    32   void DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface);
    33   void DispatchWifiResult(const mozilla::dom::WifiResultOptions& aOptions,
    34                           const nsACString& aInterface);
    36 private:
    37   WifiProxyService();
    38   ~WifiProxyService();
    40   nsTArray<EventThreadListEntry> mEventThreadList;
    41   nsCOMPtr<nsIThread> mControlThread;
    42   nsCOMPtr<nsIWifiEventListener> mListener;
    43 };
    45 } // namespace mozilla
    47 #endif // WifiProxyService_h

mercurial