Diffstat (limited to 'noncore/net/networksetup/wlan/wlanmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/networksetup/wlan/wlanmodule.cpp | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/noncore/net/networksetup/wlan/wlanmodule.cpp b/noncore/net/networksetup/wlan/wlanmodule.cpp deleted file mode 100644 index 3979e60..0000000 --- a/noncore/net/networksetup/wlan/wlanmodule.cpp +++ b/dev/null | |||
@@ -1,113 +0,0 @@ | |||
1 | #include "wlanmodule.h" | ||
2 | #include "wlanimp.h" | ||
3 | #include "infoimp.h" | ||
4 | #include "wextensions.h" | ||
5 | #include "interfaceinformationimp.h" | ||
6 | |||
7 | #include <qlabel.h> | ||
8 | #include <qprogressbar.h> | ||
9 | #include <qtabwidget.h> | ||
10 | |||
11 | /** | ||
12 | * Constructor, find all of the possible interfaces | ||
13 | */ | ||
14 | WLANModule::WLANModule() : Module() { | ||
15 | } | ||
16 | |||
17 | /** | ||
18 | * Delete any interfaces that we own. | ||
19 | */ | ||
20 | WLANModule::~WLANModule(){ | ||
21 | Interface *i; | ||
22 | for ( i=list.first(); i != 0; i=list.next() ) | ||
23 | delete i; | ||
24 | } | ||
25 | |||
26 | /** | ||
27 | * Change the current profile | ||
28 | */ | ||
29 | void WLANModule::setProfile(const QString &newProfile){ | ||
30 | profile = newProfile; | ||
31 | } | ||
32 | |||
33 | /** | ||
34 | * get the icon name for this device. | ||
35 | * @param Interface* can be used in determining the icon. | ||
36 | * @return QString the icon name (minus .png, .gif etc) | ||
37 | */ | ||
38 | QString WLANModule::getPixmapName(Interface* ){ | ||
39 | return "wlan"; | ||
40 | } | ||
41 | |||
42 | /** | ||
43 | * Check to see if the interface i is owned by this module. | ||
44 | * @param Interface* interface to check against | ||
45 | * @return bool true if i is owned by this module, false otherwise. | ||
46 | */ | ||
47 | bool WLANModule::isOwner(Interface *i){ | ||
48 | WExtensions we(i->getInterfaceName()); | ||
49 | if(!we.doesHaveWirelessExtensions()) | ||
50 | return false; | ||
51 | |||
52 | i->setHardwareName("802.11b"); | ||
53 | list.append(i); | ||
54 | return true; | ||
55 | } | ||
56 | |||
57 | /** | ||
58 | * Create, and return the WLANConfigure Module | ||
59 | * @return QWidget* pointer to this modules configure. | ||
60 | */ | ||
61 | QWidget *WLANModule::configure(Interface *i){ | ||
62 | WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, false, Qt::WDestructiveClose); | ||
63 | wlanconfig->setProfile(profile); | ||
64 | return wlanconfig; | ||
65 | } | ||
66 | |||
67 | /** | ||
68 | * Create, and return the Information Module | ||
69 | * @return QWidget* pointer to this modules info. | ||
70 | */ | ||
71 | QWidget *WLANModule::information(Interface *i){ | ||
72 | WExtensions we(i->getInterfaceName()); | ||
73 | if(!we.doesHaveWirelessExtensions()) | ||
74 | return NULL; | ||
75 | |||
76 | WlanInfoImp *info = new WlanInfoImp(0, i->getInterfaceName(), Qt::WDestructiveClose); | ||
77 | InterfaceInformationImp *information = new InterfaceInformationImp(info->tabWidget, "InterfaceSetupImp", i); | ||
78 | info->tabWidget->insertTab(information, "TCP/IP"); | ||
79 | return info; | ||
80 | } | ||
81 | |||
82 | /** | ||
83 | * Get all active (up or down) interfaces | ||
84 | * @return QList<Interface> A list of interfaces that exsist that havn't | ||
85 | * been called by isOwner() | ||
86 | */ | ||
87 | QList<Interface> WLANModule::getInterfaces(){ | ||
88 | return list; | ||
89 | } | ||
90 | |||
91 | /** | ||
92 | * Attempt to add a new interface as defined by name | ||
93 | * @param name the name of the type of interface that should be created given | ||
94 | * by possibleNewInterfaces(); | ||
95 | * @return Interface* NULL if it was unable to be created. | ||
96 | */ | ||
97 | Interface *WLANModule::addNewInterface(const QString &){ | ||
98 | // We can't add a 802.11 interface, either the hardware will be there | ||
99 | // or it wont. | ||
100 | return NULL; | ||
101 | } | ||
102 | |||
103 | /** | ||
104 | * Attempts to remove the interface, doesn't delete i | ||
105 | * @return bool true if successfull, false otherwise. | ||
106 | */ | ||
107 | bool WLANModule::remove(Interface*){ | ||
108 | // Can't remove a hardware device, you can stop it though. | ||
109 | return false; | ||
110 | } | ||
111 | |||
112 | // wlanmodule.cpp | ||
113 | |||