summaryrefslogtreecommitdiffstats
path: root/kmyfirewall/compilers/iptables/kmfiptablescompiler.h
blob: 5af75cb300b603a2367f40e56d92baf2db14e6de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
//
// C++ Interface: kmfiptablescompiler
//
// Description:
//
//
// Author: Christian Hubinger <chubinger@irrsinnig.org>, (C) 2003
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef KMFIPTABLESCOMPILER_H
#define KMFIPTABLESCOMPILER_H

#include "../../core/kmfcompilerinterface.h"

/**
@author Christian Hubinger
*/

// TQt includes
#include <tqstring.h>
#include <tqobject.h>

// KDE includes
#include <tdeparts/part.h>
#include <tdeparts/plugin.h>
#include <tdeparts/factory.h>
#include <kxmlgui.h>

// Project includes
#include "../../core/kmfplugin.h"
#include "../../core/kmfcompilerinterface.h"

class TQTabWidget;
class TDEInstance;

namespace KMF {
class KMFListView;
class KMFGenericDoc;
class KMFIPTDoc;
class KMFErrorHandler;

class KMFIPTablesCompiler :  public KMFPlugin, public virtual KMFCompilerInterface {
	TQ_OBJECT
  
public:
	KMFIPTablesCompiler( TQObject* parent, const char* name );
	~KMFIPTablesCompiler();
	void compile();
	const TQString& compile( KMFGenericDoc* );
	const TQString& compile( KMFIPTDoc* );
	const TQString& osName();
	const TQString& osGUIName();
	const TQString& backendName();
	const TQString& backendGUIName();

private slots:
	void slotConvertToIPTDoc();
	void slotExportIPT();
// 	void slotShowIPTScript();

private:
	KMFErrorHandler *m_errorHandler;
	TQTabWidget *m_iptWidget;
	KMFListView *m_iptViewFilter, *m_iptViewNat, *m_iptViewMangle;
	TQString m_osName;
	TQString m_osGUIName;
	TQString m_backendName;
	TQString m_backendGUIName;
	KMFIPTDoc *m_iptdoc;
};




class KMFIPTablesCompilerFactory : public KLibFactory {
	TQ_OBJECT
  
public:
	KMFIPTablesCompilerFactory( TQObject *parent = 0, const char *name = 0 );
	virtual ~KMFIPTablesCompilerFactory() {
/* 		delete s_instance; */
	};
	virtual TQObject* createObject( TQObject* parent = 0, const char* pname = 0,
	                               const char* name = "TQObject",
	                               const TQStringList &args = TQStringList() );
	/*     static TDEInstance* instance(); */

/*private:
	static TDEInstance* s_instance;*/
};
}


#endif