summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/settings/networksettings/interfaces/interfaceinformationimp.h4
-rw-r--r--noncore/settings/networksettings/interfaces/interfacesetupimp.h6
-rw-r--r--noncore/settings/networksettings/module.h77
-rw-r--r--noncore/settings/networksettings/ppp/pppmodule.cpp2
4 files changed, 81 insertions, 8 deletions
diff --git a/noncore/settings/networksettings/interfaces/interfaceinformationimp.h b/noncore/settings/networksettings/interfaces/interfaceinformationimp.h
index 9c93d1d..03da736 100644
--- a/noncore/settings/networksettings/interfaces/interfaceinformationimp.h
+++ b/noncore/settings/networksettings/interfaces/interfaceinformationimp.h
@@ -3,8 +3,12 @@
#include "interfaceinformation.h"
#include "interface.h"
+/**
+ * This widget just shows some generic information about the
+ * given Interface. IP Addresses and such will be shown.
+ */
class InterfaceInformationImp : public InterfaceInformation {
Q_OBJECT
diff --git a/noncore/settings/networksettings/interfaces/interfacesetupimp.h b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
index 172da6a..f38fba5 100644
--- a/noncore/settings/networksettings/interfaces/interfacesetupimp.h
+++ b/noncore/settings/networksettings/interfaces/interfacesetupimp.h
@@ -6,8 +6,14 @@
#include <qdialog.h>
class Interface;
+/**
+ * A default implementation for setting up basic
+ * network config. Like DHCP, IP and other information.
+ * You can use it in a tab or in any other way*
+ * On saveChanges() it'll save the changes to Interfaces.
+ */
class InterfaceSetupImp : public InterfaceSetup {
Q_OBJECT
public:
diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h
index 5cc82cd..3ef823c 100644
--- a/noncore/settings/networksettings/module.h
+++ b/noncore/settings/networksettings/module.h
@@ -12,26 +12,66 @@
class QWidget;
class QTabWidget;
-class Module : QObject{
+
+/**
+ * \brief The basis of all plugins
+ *
+ * This is the way to extend networksettings with
+ * extra functionality.
+ *
+ *
+ * Networksettings in the 1.0 release does not use QCOM
+ * for activation. You need to provide the following function yourself.
+ *
+ * A module needs to provide Name, Images, and methods for
+ * claiming interfaces. For example you can claim physicla
+ * interfaces like wlan0, ppp0 or virtual like a VPN
+ * connection and hide the real ppp device or ethernet device
+ * behind your VPN plugin.
+ *
+ * During start up. The main application searches for network devices
+ * and then looks for an owner under the plugins for them.
+ * For example the WLAN Plugin looks if there is a WLAN Extension
+ * on that interface and then claims it by returning true from isOwner()
+ *
+ * \code
+ * extern "C"
+ * {
+ * void* create_plugin() {
+ * return new WLANModule();
+ * }
+ * };
+ * \endcode
+ * @see isOwner(Interface*)
+ */
+class Module : private QObject{
signals:
+/**
+ * Emit this Signal once you change the Interface
+ * you're operating on
+ *
+ * @param i The Interface
+ */
void updateInterface(Interface *i);
public:
Module(){};
/**
* The type of the plugin
- * and the name of the dcop call
+ * and the name of the qcop call
*/
virtual const QString type() = 0;
/**
* The current profile has been changed and the module should do any
* neccesary changes also.
+ * As of Opie1.0 profiles are disabled.
+ *
* @param newProfile what the profile should be changed to.
*/
virtual void setProfile(const QString &newProfile) = 0;
@@ -43,44 +83,67 @@ public:
virtual QString getPixmapName(Interface *) = 0;
/**
* Check to see if the interface i is owned by this module.
+ * See if you can handle it. And if you can claim ownership
+ * by returning true.
* @param Interface* interface to check against
* @return bool true if i is owned by this module, false otherwise.
*/
virtual bool isOwner(Interface *){ return false; };
/**
- * Create and return the WLANConfigure Module
+ * Create and return the Configure Module
* @param Interface *i the interface to configure.
* @return QWidget* pointer to this modules configure.
+ *
+ * @see InterfaceSetupImp
*/
virtual QWidget *configure(Interface *){ return NULL; } ;
/**
- * Create, and return the Information Module
+ * Create, and return the Information Module.
+ *
+ * An default Implementation is InterfaceInformationImp
+ *
* @param Interface *i the interface to get info on.
* @return QWidget* pointer to this modules info.
+ *
+ * @see InterfaceInformationImp
+ *
*/
virtual QWidget *information(Interface *){ return NULL; };
/**
- * Get all active (up or down) interfaces
+ * Get all active (up or down) interfaces managed by this
+ * module.
* @return QList<Interface> A list of interfaces that exsist that havn't
* been called by isOwner()
*/
virtual QList<Interface> getInterfaces() = 0;
/**
* Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp),
* modem ppp)
+ * Both strings need to be translated. The first string is a Shortcut
+ * like PPP and the second argument is a description.
+ *
+ * <code>
+ * list.insert(
+ *
+ * </code>
+ *
+ * @param list A reference to the list of supported additionns.
*/
virtual void possibleNewInterfaces(QMap<QString, QString> &list) = 0;
/**
- * Attempts to create a new interface from name
+ * Attempts to create a new interface from name you gave
+ * possibleNewInterfaces()
* @return Interface* NULL if it was unable to be created.
* @param name the type of interface to create
+ *
+ * @see possibleNewInterfaces
*/
virtual Interface *addNewInterface(const QString &name) = 0;
/**
@@ -98,9 +161,9 @@ public:
protected:
/**
* set which interfaceNames should not be shown cause they're handled
* internally of this module.. An already running ppp link or
- * a tunnel...
+ * a tunnel... VPN an such
*/
void setHandledInterfaceNames( const QStringList& in) { m_inter = in; }
private:
diff --git a/noncore/settings/networksettings/ppp/pppmodule.cpp b/noncore/settings/networksettings/ppp/pppmodule.cpp
index 2462fa4..f7dacf6 100644
--- a/noncore/settings/networksettings/ppp/pppmodule.cpp
+++ b/noncore/settings/networksettings/ppp/pppmodule.cpp
@@ -126,9 +126,9 @@ bool PPPModule::isOwner(Interface *i){
QWidget *PPPModule::configure(Interface *i){
qDebug("return ModemWidget");
PPPConfigWidget *pppconfig = new PPPConfigWidget( (InterfacePPP*)i,
0, "PPPConfig", false,
- Qt::WDestructiveClose | Qt::WStyle_ContextHelp);
+ (Qt::WDestructiveClose | Qt::WStyle_ContextHelp));
return pppconfig;
}
/**