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