You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
kmyfirewall/kmyfirewall/ruleoptionplugins
Michele Calgaro 74d8c87486
Replace Qt with TQt
1 month ago
..
custom_option Replace Qt with TQt 1 month ago
interface_option Replace Qt with TQt 1 month ago
ip_option Replace Qt with TQt 1 month ago
limit_option Replace Qt with TQt 1 month ago
log_target_option Replace Qt with TQt 1 month ago
mac_option Replace Qt with TQt 1 month ago
mark_target_option Replace Qt with TQt 1 month ago
nat_target_option Replace Qt with TQt 1 month ago
protocol_option Replace Qt with TQt 1 month ago
state_option Replace Qt with TQt 1 month ago
tos_option Replace Qt with TQt 1 month ago
tos_target_option Replace Qt with TQt 1 month ago
Makefile.am Added old abandoned KDE3 version of kmyfirewall 14 years ago
README Replace Qt with TQt 1 month ago
kmfruleoptionedit.desktop Update XDG information in support of bug report 892. 12 years ago
kmfruletargetoptionedit.desktop Update XDG information in support of bug report 892. 12 years ago

README

Writing Rule Option Plugins for KMyFirewall
-----------------------------------


Abstract
--------

As the netfilter/iptables suite grwos quite fast (every few releases there are
more ruleoptions added) all rule option handling (logig & GUI) is located in
small plugins that get loaded at startup and made available thorough the gui.

This way it's possible for others to easily extend KMyFirewall and help to keep
the Application up to date with iptables. I hope that this will help to make
KMF an even better tool then it allready is. 


Creating KMF Rule Option Plugins
--------------------------------


A Plugin consists of the following different parts.

*) The Widget for editing the Option

*) A class derived from KMFPlugin that defines the ServiceType
KMFyFirewall/RuleOptionEdit or KMFyFirewall/RuleTargetOptionEdit

*) A XML file describing the option so that the correct iptables commands can
be genereated


Writing the Edit widget
-----------------------

This class is simply a Widget that has the following methods/slots/signals defined

public:
	void loadRule( IPTRule * );

public slots:
	void accept();
	void reject();
	void slotHelp();

signals:
	void sigAddRuleOpt( TQString*, QPtrList<TQString>* );
	void sigAddTargetOpt( TQString *, QPtrList<TQString> * );

	void sigDocumentChanged();
	void sigHideMe();

It's up to you if design the widget with TQt's designer or if you write. It's just importent that you
implement the needed methods properly in order to make the Editor work as expected.

The signals emited by the widget will be conneted to the KMFRuleEdit window. 
Have a look at the allready available plugins to find out thow to implement those methods in detail.

FIXME: More explainaitions here




Writing the KMFPlugin class
---------------------------

This class is compiled to an loadable modules using KDE's KParts technology. There fore it is important 
to make shure that the corresponding *.desktop file is written properly. Otherwise the plugin won't be found by the application as the name of the loaddable library is taken from the desktop file.

The Plugin class should be named KMFRuleOptionEditOptionName or KMFRuleTargetOptionEditOptionName