kandy

commandset.h
1/*
2 This file is part of Kandy.
3
4 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19
20 As a special exception, permission is given to link this program
21 with any edition of TQt, and distribute the resulting executable,
22 without including the source code for TQt in the source distribution.
23*/
24#ifndef COMMANDSET_H
25#define COMMANDSET_H
26
27#include <tqlistview.h>
28
29class ATCommand;
30class ATParameter;
31class TQDomElement;
32class TQDomDocument;
33
38 public:
39 CommandSet();
41
42 void addCommand(ATCommand *);
43 void deleteCommand(ATCommand *);
44
45 bool loadFile(const TQString &);
46 bool saveFile(const TQString &);
47
48 void clear();
49
50 TQPtrList<ATCommand> *commandList() { return &mList; }
51
52 protected:
53 void loadCommand(ATCommand *,TQDomElement *c);
54 void saveCommand(ATCommand *,TQDomDocument *doc,TQDomElement *parent);
55 void saveParameter(ATParameter *p, TQDomDocument *doc,TQDomElement *parent);
56
57 private:
58 TQPtrList<ATCommand> mList;
59};
60
61#endif
This class provides an abstraction of an AT command.
Definition: atcommand.h:54
TQListView item representing a modem command.
Definition: commandset.h:37