author | zecke <zecke> | 2004-02-08 16:31:33 (UTC) |
---|---|---|
committer | zecke <zecke> | 2004-02-08 16:31:33 (UTC) |
commit | 11324fcf42d984579080ebe474d50258d39adf4f (patch) (unidiff) | |
tree | 595793ee9516f93053d287a47f3933c1084035aa | |
parent | 1e532ba3dcf7ce963776844d8040e2fa55e70704 (diff) | |
download | opie-11324fcf42d984579080ebe474d50258d39adf4f.zip opie-11324fcf42d984579080ebe474d50258d39adf4f.tar.gz opie-11324fcf42d984579080ebe474d50258d39adf4f.tar.bz2 |
More API fixes
-rw-r--r-- | noncore/settings/networksettings/interfaces/interface.h | 7 | ||||
-rw-r--r-- | noncore/settings/networksettings/module.h | 12 |
2 files changed, 19 insertions, 0 deletions
diff --git a/noncore/settings/networksettings/interfaces/interface.h b/noncore/settings/networksettings/interfaces/interface.h index ec82851..83ab088 100644 --- a/noncore/settings/networksettings/interfaces/interface.h +++ b/noncore/settings/networksettings/interfaces/interface.h | |||
@@ -1,16 +1,23 @@ | |||
1 | #ifndef INTERFACE_H | 1 | #ifndef INTERFACE_H |
2 | #define INTERFACE_H | 2 | #define INTERFACE_H |
3 | 3 | ||
4 | #include <qstring.h> | 4 | #include <qstring.h> |
5 | #include <qobject.h> | 5 | #include <qobject.h> |
6 | 6 | ||
7 | class Module; | 7 | class Module; |
8 | 8 | ||
9 | /** | ||
10 | * A Interface represents a physical device. You can | ||
11 | * inherit it and create also virtual devices. Like saved | ||
12 | * ppp dial ups or vpn. Interface is used for representing | ||
13 | * your interface to the User and its actions. | ||
14 | * | ||
15 | */ | ||
9 | class Interface : public QObject{ | 16 | class Interface : public QObject{ |
10 | Q_OBJECT | 17 | Q_OBJECT |
11 | 18 | ||
12 | signals: | 19 | signals: |
13 | void updateInterface(Interface *i); | 20 | void updateInterface(Interface *i); |
14 | void updateMessage(const QString &message); | 21 | void updateMessage(const QString &message); |
15 | 22 | ||
16 | public: | 23 | public: |
diff --git a/noncore/settings/networksettings/module.h b/noncore/settings/networksettings/module.h index 3ef823c..9dc913e 100644 --- a/noncore/settings/networksettings/module.h +++ b/noncore/settings/networksettings/module.h | |||
@@ -81,18 +81,26 @@ public: | |||
81 | * @return QString the icon name (minus .png, .gif etc) | 81 | * @return QString the icon name (minus .png, .gif etc) |
82 | */ | 82 | */ |
83 | virtual QString getPixmapName(Interface *) = 0; | 83 | virtual QString getPixmapName(Interface *) = 0; |
84 | 84 | ||
85 | /** | 85 | /** |
86 | * Check to see if the interface i is owned by this module. | 86 | * Check to see if the interface i is owned by this module. |
87 | * See if you can handle it. And if you can claim ownership | 87 | * See if you can handle it. And if you can claim ownership |
88 | * by returning true. | 88 | * by returning true. |
89 | * For physical devices you will be asked if you want to own the | ||
90 | * device. But you can also create new \sa Interface Implementations. | ||
91 | * | ||
92 | * If you want to own the Interface add it to your internal interface | ||
93 | * list | ||
94 | * | ||
89 | * @param Interface* interface to check against | 95 | * @param Interface* interface to check against |
90 | * @return bool true if i is owned by this module, false otherwise. | 96 | * @return bool true if i is owned by this module, false otherwise. |
97 | * | ||
98 | * @see getInterfaces | ||
91 | */ | 99 | */ |
92 | virtual bool isOwner(Interface *){ return false; }; | 100 | virtual bool isOwner(Interface *){ return false; }; |
93 | 101 | ||
94 | /** | 102 | /** |
95 | * Create and return the Configure Module | 103 | * Create and return the Configure Module |
96 | * @param Interface *i the interface to configure. | 104 | * @param Interface *i the interface to configure. |
97 | * @return QWidget* pointer to this modules configure. | 105 | * @return QWidget* pointer to this modules configure. |
98 | * | 106 | * |
@@ -111,16 +119,20 @@ public: | |||
111 | * @see InterfaceInformationImp | 119 | * @see InterfaceInformationImp |
112 | * | 120 | * |
113 | */ | 121 | */ |
114 | virtual QWidget *information(Interface *){ return NULL; }; | 122 | virtual QWidget *information(Interface *){ return NULL; }; |
115 | 123 | ||
116 | /** | 124 | /** |
117 | * Get all active (up or down) interfaces managed by this | 125 | * Get all active (up or down) interfaces managed by this |
118 | * module. | 126 | * module. |
127 | * At the end of initialisation you will be asked to return your interfaces | ||
128 | * Return all of your interfaces even the ones you claimed by isOnwer. | ||
129 | * Here you can also return your 'virtual' Interface Objects | ||
130 | * | ||
119 | * @return QList<Interface> A list of interfaces that exsist that havn't | 131 | * @return QList<Interface> A list of interfaces that exsist that havn't |
120 | * been called by isOwner() | 132 | * been called by isOwner() |
121 | */ | 133 | */ |
122 | virtual QList<Interface> getInterfaces() = 0; | 134 | virtual QList<Interface> getInterfaces() = 0; |
123 | 135 | ||
124 | /** | 136 | /** |
125 | * Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp), | 137 | * Adds possible new interfaces to the list (Example: usb(ppp), ir(ppp), |
126 | * modem ppp) | 138 | * modem ppp) |