4 files changed, 88 insertions, 15 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 @@ -1,2 +1,2 @@ -#ifndef INTERFACEINFORMATIONIMP_H +#ifndef INTERFACEINFORMATIONIMP_H #define INTERFACEINFORMATIONIMP_H @@ -6,2 +6,6 @@ +/** + * This widget just shows some generic information about the + * given Interface. IP Addresses and such will be shown. + */ class InterfaceInformationImp : public InterfaceInformation { @@ -9,3 +13,3 @@ class InterfaceInformationImp : public InterfaceInformation { Q_OBJECT - + public: @@ -13,3 +17,3 @@ public: ~InterfaceInformationImp(); - + private slots: @@ -21,3 +25,3 @@ private: Interface *interface; - + }; 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 @@ -9,5 +9,11 @@ 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: @@ -16,3 +22,3 @@ public: bool saveChanges(); - + public slots: @@ -33,3 +39,3 @@ class InterfaceSetupImpDialog : public QDialog { 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 @@ -15,5 +15,43 @@ 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); @@ -26,3 +64,3 @@ public: * The type of the plugin - * and the name of the dcop call + * and the name of the qcop call */ @@ -33,2 +71,4 @@ public: * neccesary changes also. + * As of Opie1.0 profiles are disabled. + * * @param newProfile what the profile should be changed to. @@ -46,2 +86,4 @@ public: * 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 @@ -52,5 +94,7 @@ public: /** - * 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 */ @@ -59,5 +103,11 @@ public: /** - * 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 + * */ @@ -66,3 +116,4 @@ public: /** - * 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 @@ -75,2 +126,11 @@ public: * 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. */ @@ -79,5 +139,8 @@ public: /** - * 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 */ @@ -101,3 +164,3 @@ protected: * internally of this module.. An already running ppp link or - * a tunnel... + * a tunnel... VPN an such */ 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 @@ -129,3 +129,3 @@ QWidget *PPPModule::configure(Interface *i){ 0, "PPPConfig", false, - Qt::WDestructiveClose | Qt::WStyle_ContextHelp); + (Qt::WDestructiveClose | Qt::WStyle_ContextHelp)); return pppconfig; |