Last change
on this file was 2, checked in by dmik, 20 years ago |
Imported xplatform parts of the official release 3.3.1 from Trolltech
|
-
Property svn:keywords
set to
Id
|
File size:
1.1 KB
|
Line | |
---|
1 | /****************************************************************************
|
---|
2 | ** $Id: smtp.h 2 2005-11-16 15:49:26Z dmik $
|
---|
3 | **
|
---|
4 | ** Copyright (C) 1992-2000 Trolltech AS. All rights reserved.
|
---|
5 | **
|
---|
6 | ** This file is part of an example program for Qt. This example
|
---|
7 | ** program may be used, distributed and modified without limitation.
|
---|
8 | **
|
---|
9 | *****************************************************************************/
|
---|
10 |
|
---|
11 | #ifndef SMTP_H
|
---|
12 | #define SMTP_H
|
---|
13 |
|
---|
14 | #include <qobject.h>
|
---|
15 | #include <qstring.h>
|
---|
16 |
|
---|
17 | class QSocket;
|
---|
18 | class QTextStream;
|
---|
19 | class QDns;
|
---|
20 |
|
---|
21 | class Smtp : public QObject
|
---|
22 | {
|
---|
23 | Q_OBJECT
|
---|
24 |
|
---|
25 | public:
|
---|
26 | Smtp( const QString &from, const QString &to,
|
---|
27 | const QString &subject, const QString &body );
|
---|
28 | ~Smtp();
|
---|
29 |
|
---|
30 | signals:
|
---|
31 | void status( const QString & );
|
---|
32 |
|
---|
33 | private slots:
|
---|
34 | void dnsLookupHelper();
|
---|
35 | void readyRead();
|
---|
36 | void connected();
|
---|
37 |
|
---|
38 | private:
|
---|
39 | enum State {
|
---|
40 | Init,
|
---|
41 | Mail,
|
---|
42 | Rcpt,
|
---|
43 | Data,
|
---|
44 | Body,
|
---|
45 | Quit,
|
---|
46 | Close
|
---|
47 | };
|
---|
48 |
|
---|
49 | QString message;
|
---|
50 | QString from;
|
---|
51 | QString rcpt;
|
---|
52 | QSocket *socket;
|
---|
53 | QTextStream * t;
|
---|
54 | int state;
|
---|
55 | QString response;
|
---|
56 | QDns * mxLookup;
|
---|
57 | };
|
---|
58 |
|
---|
59 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.