Libksieve

scriptbuilder.h
1 /* -*- c++ -*-
2  ksieve/interfaces/scriptbuilder.h
3 
4  This file is part of KSieve,
5  the KDE internet mail/usenet news message filtering library.
6  Copyright (c) 2002-2003 Marc Mutz <[email protected]>
7 
8  KSieve is free software; you can redistribute it and/or modify it
9  under the terms of the GNU General Public License, version 2, as
10  published by the Free Software Foundation.
11 
12  KSieve is distributed in the hope that it will be useful, but
13  WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 
21  In addition, as a special exception, the copyright holders give
22  permission to link the code of this program with any edition of
23  the Qt library by Trolltech AS, Norway (or with modified versions
24  of Qt that use the same license as Qt), and distribute linked
25  combinations including the two. You must obey the GNU General
26  Public License in all respects for all of the code used other than
27  Qt. If you modify this file, you may extend this exception to
28  your version of the file, but you are not obligated to do so. If
29  you do not wish to do so, delete this exception statement from
30  your version.
31 */
32 
33 #ifndef KSIEVE_KSIEVE_SCRIPTBUILDER_H
34 #define KSIEVE_KSIEVE_SCRIPTBUILDER_H
35 
36 class QString;
37 
38 namespace KSieve
39 {
40 
41 class Error;
42 
43 class ScriptBuilder
44 {
45 public:
46  virtual ~ScriptBuilder() {}
47 
48  virtual void taggedArgument(const QString &tag) = 0;
49  virtual void stringArgument(const QString &string, bool multiLine, const QString &embeddedHashComment) = 0;
50  virtual void numberArgument(unsigned long number, char quantifier) = 0;
51 
52  virtual void stringListArgumentStart() = 0;
53  virtual void stringListEntry(const QString &string, bool multiLine, const QString &embeddedHashComment) = 0;
54  virtual void stringListArgumentEnd() = 0;
55 
56  virtual void commandStart(const QString &identifier, int lineNumber) = 0;
57  virtual void commandEnd(int lineNumber) = 0;
58 
59  virtual void testStart(const QString &identifier) = 0;
60  virtual void testEnd() = 0;
61 
62  virtual void testListStart() = 0;
63  virtual void testListEnd() = 0;
64 
65  virtual void blockStart(int lineNumber) = 0;
66  virtual void blockEnd(int lineNumber) = 0;
67 
69  virtual void hashComment(const QString &comment) = 0;
71  virtual void bracketComment(const QString &comment) = 0;
72 
73  virtual void lineFeed() = 0;
74 
75  virtual void error(const Error &error) = 0;
76 
77  virtual void finished() = 0;
78 };
79 
80 } // namespace KSieve
81 
82 #endif
void error(QWidget *parent, const QString &text, const QString &caption=QString(), Options options=Notify)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Tue Aug 4 2020 23:07:29 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.