dom/wifi/WifiProxyService.h

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:feb41b076fce
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/. */
4
5 #ifndef WifiProxyService_h
6 #define WifiProxyService_h
7
8 #include "nsIWifiService.h"
9 #include "nsCOMPtr.h"
10 #include "nsThread.h"
11 #include "mozilla/dom/WifiOptionsBinding.h"
12 #include "nsTArray.h"
13
14 namespace mozilla {
15
16 class WifiProxyService MOZ_FINAL : public nsIWifiProxyService
17 {
18 private:
19 struct EventThreadListEntry
20 {
21 nsCOMPtr<nsIThread> mThread;
22 nsCString mInterface;
23 };
24
25 public:
26 NS_DECL_ISUPPORTS
27 NS_DECL_NSIWIFIPROXYSERVICE
28
29 static already_AddRefed<WifiProxyService>
30 FactoryCreate();
31
32 void DispatchWifiEvent(const nsAString& aEvent, const nsACString& aInterface);
33 void DispatchWifiResult(const mozilla::dom::WifiResultOptions& aOptions,
34 const nsACString& aInterface);
35
36 private:
37 WifiProxyService();
38 ~WifiProxyService();
39
40 nsTArray<EventThreadListEntry> mEventThreadList;
41 nsCOMPtr<nsIThread> mControlThread;
42 nsCOMPtr<nsIWifiEventListener> mListener;
43 };
44
45 } // namespace mozilla
46
47 #endif // WifiProxyService_h

mercurial