summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings/wlan/wlanmodule.cpp
Unidiff
Diffstat (limited to 'noncore/settings/networksettings/wlan/wlanmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings/wlan/wlanmodule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/settings/networksettings/wlan/wlanmodule.cpp b/noncore/settings/networksettings/wlan/wlanmodule.cpp
index b4c3509..07bf73f 100644
--- a/noncore/settings/networksettings/wlan/wlanmodule.cpp
+++ b/noncore/settings/networksettings/wlan/wlanmodule.cpp
@@ -65,97 +65,97 @@ bool WLANModule::isOwner(Interface *i){
65 return true; 65 return true;
66} 66}
67 67
68/** 68/**
69 * Create, and return the WLANConfigure Module 69 * Create, and return the WLANConfigure Module
70 * @return QWidget* pointer to this modules configure. 70 * @return QWidget* pointer to this modules configure.
71 */ 71 */
72QWidget *WLANModule::configure(Interface *i){ 72QWidget *WLANModule::configure(Interface *i){
73 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose); 73 WLANImp *wlanconfig = new WLANImp(0, "WlanConfig", i, true, Qt::WDestructiveClose);
74 wlanconfig->setProfile(profile); 74 wlanconfig->setProfile(profile);
75 return wlanconfig; 75 return wlanconfig;
76} 76}
77 77
78/** 78/**
79 * Create, and return the Information Module 79 * Create, and return the Information Module
80 * @return QWidget* pointer to this modules info. 80 * @return QWidget* pointer to this modules info.
81 */ 81 */
82QWidget *WLANModule::information(Interface *i){ 82QWidget *WLANModule::information(Interface *i){
83 WExtensions we(i->getInterfaceName()); 83 WExtensions we(i->getInterfaceName());
84 if(!we.doesHaveWirelessExtensions()) 84 if(!we.doesHaveWirelessExtensions())
85 return NULL; 85 return NULL;
86 86
87 return getInfo( i ); 87 return getInfo( i );
88} 88}
89 89
90/** 90/**
91 * Get all active (up or down) interfaces 91 * Get all active (up or down) interfaces
92 * @return QList<Interface> A list of interfaces that exsist that havn't 92 * @return QList<Interface> A list of interfaces that exsist that havn't
93 * been called by isOwner() 93 * been called by isOwner()
94 */ 94 */
95QList<Interface> WLANModule::getInterfaces(){ 95QList<Interface> WLANModule::getInterfaces(){
96 return list; 96 return list;
97} 97}
98 98
99/** 99/**
100 * Attempt to add a new interface as defined by name 100 * Attempt to add a new interface as defined by name
101 * @param name the name of the type of interface that should be created given 101 * @param name the name of the type of interface that should be created given
102 * by possibleNewInterfaces(); 102 * by possibleNewInterfaces();
103 * @return Interface* NULL if it was unable to be created. 103 * @return Interface* NULL if it was unable to be created.
104 */ 104 */
105Interface *WLANModule::addNewInterface(const QString &){ 105Interface *WLANModule::addNewInterface(const QString &){
106 // We can't add a 802.11 interface, either the hardware will be there 106 // We can't add a 802.11 interface, either the hardware will be there
107 // or it wont. 107 // or it wont.
108 return NULL; 108 return NULL;
109} 109}
110 110
111/** 111/**
112 * Attempts to remove the interface, doesn't delete i 112 * Attempts to remove the interface, doesn't delete i
113 * @return bool true if successfull, false otherwise. 113 * @return bool true if successful, false otherwise.
114 */ 114 */
115bool WLANModule::remove(Interface*){ 115bool WLANModule::remove(Interface*){
116 // Can't remove a hardware device, you can stop it though. 116 // Can't remove a hardware device, you can stop it though.
117 return false; 117 return false;
118} 118}
119 119
120void WLANModule::receive(const QCString &param, const QByteArray &arg) 120void WLANModule::receive(const QCString &param, const QByteArray &arg)
121{ 121{
122 qDebug("WLANModule::receive "+param); 122 qDebug("WLANModule::receive "+param);
123 QStringList params = QStringList::split(",",param); 123 QStringList params = QStringList::split(",",param);
124 int count = params.count(); 124 int count = params.count();
125 qDebug("WLANModule got %i params", count ); 125 qDebug("WLANModule got %i params", count );
126 if (count < 2){ 126 if (count < 2){
127 qDebug("Erorr less than 2 parameter"); 127 qDebug("Erorr less than 2 parameter");
128 qDebug("RETURNING"); 128 qDebug("RETURNING");
129 return; 129 return;
130 } 130 }
131 131
132 QDataStream stream(arg,IO_ReadOnly); 132 QDataStream stream(arg,IO_ReadOnly);
133 QString interface; 133 QString interface;
134 QString action; 134 QString action;
135 int countMsgs = 0; 135 int countMsgs = 0;
136 stream >> interface; 136 stream >> interface;
137 qDebug("got count? >%s<",interface.latin1()); 137 qDebug("got count? >%s<",interface.latin1());
138 if (interface == "count"){ 138 if (interface == "count"){
139 qDebug("got count"); 139 qDebug("got count");
140 stream >> action; 140 stream >> action;
141 qDebug("Got count num >%s<", action.latin1()); 141 qDebug("Got count num >%s<", action.latin1());
142 countMsgs = action.toInt(); 142 countMsgs = action.toInt();
143 } 143 }
144 144
145 QDialog *toShow; 145 QDialog *toShow;
146 //while (! stream.atEnd() ){ 146 //while (! stream.atEnd() ){
147 for (int i = 0; i < countMsgs; i++){ 147 for (int i = 0; i < countMsgs; i++){
148 qDebug("start stream %d/%d",i,countMsgs); 148 qDebug("start stream %d/%d",i,countMsgs);
149 if (stream.atEnd()){ 149 if (stream.atEnd()){
150 qDebug("end of stream"); 150 qDebug("end of stream");
151 return; 151 return;
152 } 152 }
153 stream >> interface; 153 stream >> interface;
154 qDebug("got iface"); 154 qDebug("got iface");
155 stream >> action; 155 stream >> action;
156 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1()); 156 qDebug("WLANModule got interface %s and acion %s", interface.latin1(), action.latin1());
157 // find interfaces 157 // find interfaces
158 Interface *ifa=0; 158 Interface *ifa=0;
159 for ( Interface *i=list.first(); i != 0; i=list.next() ){ 159 for ( Interface *i=list.first(); i != 0; i=list.next() ){
160 if (i->getInterfaceName() == interface){ 160 if (i->getInterfaceName() == interface){
161 qDebug("WLANModule found interface %s",interface.latin1()); 161 qDebug("WLANModule found interface %s",interface.latin1());