summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/script.h
blob: b3eac7f5115a14ae3e44f6864360fb4476c8daa3 (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
#ifndef CONSOLE_SCRIPT_H
#define CONSOLE_SCRIPT_H

#include <qstring.h>

/* Very simple scripting - this class stores keys received
 * by emulation_layer */

class Script {
public:
    /* Construct an empty script */
    Script();
    
    /* Load a script from a text file */
    Script(const QString fileName);

    /* Append a line to the script */
    void append(const QByteArray &data);

    /* Save this script to a file */
    void saveTo(const QString fileName) const;

    /* Return the script's content */
    QByteArray script() const;
protected:
    QByteArray m_script;
};


#endif /* CONSOLE_SCRIPT_H */