kcmpureftpd

  Main Page   Compound List   File List   Compound Members
Main Page   Compound List   File List   Compound Members  

script.h

00001 /***************************************************************************
00002                          script.h  -  parse XML configuration file
00003                          -------------------
00004     begin                : Fri Apr 13 2001
00005     copyright            : (C) 2001,2002,2003 by Claudiu Costin
00006     email                : claudiuc@kde.org
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; either version 2 of the License, or     *
00014  *   (at your option) any later version.                                   *
00015  *                                                                         *
00016  ***************************************************************************/
00017 
00018 #ifndef __SCRIPT_H__
00019 #define __SCRIPT_H__
00020 
00021 #ifdef HAVE_CONFIG_H
00022 #include <config.h>
00023 #endif
00024 
00025 #include <qstring.h>
00026 #include <qvaluelist.h>
00027 
00028 class ScriptItem {
00029 
00030 public:
00031     ScriptItem() : _id(QString::null), _title(QString::null), _description(QString::null),
00032                    _path(QString::null), 
00033                    _mode(QString::null),_script(QString::null),
00034                                                                          _optsep(QString::null), _linesep(QString::null) {}
00035     ScriptItem(const ScriptItem& item) : _id(item._id), _title(item._title),
00036                    _description(item._description), _path(item._path),
00037                    _mode(item._mode), _script(item._script),
00038                                                                          _optsep(item._optsep), _linesep(item._optsep) {}
00039     ScriptItem(const QString& id, const QString& title, const QString& description,
00040                const QString& path, const QString& mode, const QString& script,
00041                                                          const QString& optsep, const QString& linesep) :
00042                _id(id), _title(title), _description(description), _path(path),
00043                _mode(mode), _script(script),
00044                                                          _optsep(optsep), _linesep(linesep) {}
00045 
00046     ScriptItem& operator=(const ScriptItem &item);
00047 
00048     QString id() { return _id; };
00049     QString title() { return _title; };
00050     QString description() { return _description; };
00051     QString path() { return _path; };
00052     QString mode() { return _mode; };
00053     QString script() { return _script; };
00054     QString optsep() { return _optsep; };
00055     QString linesep() { return _linesep; };
00056     void setId(const QString& t) { _id = t; };
00057     void setTitle(const QString& t) { _title = t; };
00058     void setDescription(const QString& t) { _description = t; };
00059     void setPath(const QString& t) { _path = t; };
00060     void setMode(const QString& t) { _mode = t; };
00061     void setScript(const QString& t) { _script = t; };
00062     void setOptSep(const QString& t) { _optsep = t; };
00063     void setLineSep(const QString& t) { _linesep = t; };
00064 
00065 private:
00066     QString _id, _title, _description, _path, _mode, _script, _optsep, _linesep;
00067 };
00068 
00069 typedef QValueList<ScriptItem> ScriptList;
00070 
00071 class Script {
00072 
00073 public:
00074     Script();
00075     ~Script();
00076     int count();
00077     ScriptList::Iterator at(int position);
00078 
00079 private:
00080     ScriptList _scriptList;
00081 };
00082 
00083 #endif
00084 
Generated on Thu Jul 24 01:57:14 2003 by doxygen 1.2.15.