summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/dialer.h
blob: 88681a3f153412dbdbb36fc1e7f713f01ad69559 (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
#ifndef DIALER_H
#define DIALER_H

#include <qdialog.h>

#include "profile.h"

class QLabel;
class QProgressBar;

class Dialer : public QDialog
{
	Q_OBJECT
	public:
		Dialer(const Profile& profile, int fd, QWidget *parent = NULL, const char *name = NULL);
		~Dialer();
		void setHangupOnly();

	public slots:
		void slotCancel();
		void slotAutostart();

	private:
		void switchState(int newstate);
		void reset();
		void dial(const QString& number);
		void trydial(const QString& number);

		void send(const QString& msg);
		QString receive();

		enum States
		{
			state_cancel,
			state_preinit,
			state_init,
			state_options,
			state_dialtone,
			state_dialing,
			state_online
		};

		QLabel *status;
		QProgressBar *progress;
		QPushButton *cancel;
		int state;
		int usercancel;
                int m_fd;
		const Profile& m_profile;
		int cleanshutdown;
};

#endif