|
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 NSWIFIAPSCANNERDBUS_H_ |
|
6 #define NSWIFIAPSCANNERDBUS_H_ |
|
7 |
|
8 #include "nsCOMArray.h" |
|
9 |
|
10 #define DBUS_API_SUBJECT_TO_CHANGE |
|
11 #include <dbus/dbus.h> |
|
12 |
|
13 class nsWifiAccessPoint; |
|
14 |
|
15 namespace mozilla { |
|
16 |
|
17 class nsWifiScannerDBus MOZ_FINAL |
|
18 { |
|
19 public: |
|
20 nsWifiScannerDBus(nsCOMArray<nsWifiAccessPoint>* aAccessPoints); |
|
21 ~nsWifiScannerDBus(); |
|
22 |
|
23 nsresult Scan(); |
|
24 |
|
25 private: |
|
26 nsresult SendMessage(const char* aInterface, |
|
27 const char* aPath, |
|
28 const char* aFuncCall); |
|
29 nsresult IdentifyDevices(DBusMessage* aMsg); |
|
30 nsresult IdentifyDeviceType(DBusMessage* aMsg, const char* aDevicePath); |
|
31 nsresult IdentifyAccessPoints(DBusMessage* aMsg); |
|
32 nsresult IdentifyAPProperties(DBusMessage* aMsg); |
|
33 nsresult StoreSsid(DBusMessageIter* aVariant, nsWifiAccessPoint* aAp); |
|
34 nsresult SetMac(DBusMessageIter* aVariant, nsWifiAccessPoint* aAp); |
|
35 nsresult GetDBusIterator(DBusMessage* aMsg, DBusMessageIter* aIterArray); |
|
36 |
|
37 DBusConnection* mConnection; |
|
38 nsCOMArray<nsWifiAccessPoint>* mAccessPoints; |
|
39 }; |
|
40 |
|
41 } // mozilla |
|
42 |
|
43 #endif // NSWIFIAPSCANNERDBUS_H_ |