~ubuntu-branches/ubuntu/wily/tora/wily-proposed

« back to all changes in this revision

Viewing changes to doc/help/api/tosmtp_h.html

  • Committer: Bazaar Package Importer
  • Author(s): Michael Meskes
  • Date: 2009-04-07 13:16:05 UTC
  • mfrom: (1.2.7 upstream) (3.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090407131605-u422yigfv7jgg0l0
Tags: 2.0.0-3
* Cleaned up packaging a little bit.
* Added homepage information to control file.
* Bumped Standards-Version to 3.8.1.
* Released to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<HTML>
2
 
<HEAD>
3
 
<TITLE>Source: tosmtp.h</TITLE>
4
 
 
5
 
<META NAME="Generator" CONTENT="KDOC ">
6
 
</HEAD>
7
 
<BODY bgcolor="#ffffff" text="#000000" link="#0000ff" vlink="#000099" alink= "#ffffff">
8
 
<TABLE WIDTH="100%" BORDER="0">
9
 
<TR>
10
 
<TD>
11
 
        <TABLE BORDER="0">
12
 
                <TR><TD valign="top" align="left" cellspacing="10">
13
 
                <h1>Source: tosmtp.h</h1>
14
 
                </TD>
15
 
                <TD valign="top" align="right" colspan="1"></TD></TR>
16
 
        </TABLE>
17
 
        <HR>
18
 
        <TABLE BORDER="0">
19
 
                
20
 
        </TABLE>
21
 
        </TD>
22
 
<TD align="right"><TABLE BORDER="0"><TR><TD><small><A HREF="index-long.html">Annotated List</A></small></TD></TR>
23
 
<TR><TD><small><A HREF="header-list.html">Files</A></small></TD></TR>
24
 
<TR><TD><small><A HREF="all-globals.html">Globals</A></small></TD></TR>
25
 
<TR><TD><small><A HREF="hier.html">Hierarchy</A></small></TD></TR>
26
 
<TR><TD><small><A HREF="index.html">Index</A></small></TD></TR>
27
 
</TABLE></TD></TR></TABLE>
28
 
<pre>
29
 
/*****
30
 
 *
31
 
 * TOra - An Oracle Toolkit for DBA's and developers
32
 
 * Copyright (C) 2003-2005 Quest Software, Inc
33
 
 * Portions Copyright (C) 2005 Other Contributors
34
 
 * 
35
 
 * This program is free software; you can redistribute it and/or
36
 
 * modify it under the terms of the GNU General Public License
37
 
 * as published by the Free Software Foundation;  only version 2 of
38
 
 * the License is valid for this program.
39
 
 * 
40
 
 * This program is distributed in the hope that it will be useful,
41
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
42
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
43
 
 * GNU General Public License for more details.
44
 
 * 
45
 
 * You should have received a copy of the GNU General Public License
46
 
 * along with this program; if not, write to the Free Software
47
 
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
48
 
 *
49
 
 *      As a special exception, you have permission to link this program
50
 
 *      with the Oracle Client libraries and distribute executables, as long
51
 
 *      as you follow the requirements of the GNU GPL in regard to all of the
52
 
 *      software in the executable aside from Oracle client libraries.
53
 
 *
54
 
 *      Specifically you are not permitted to link this program with the
55
 
 *      Qt/UNIX, Qt/Windows or Qt Non Commercial products of TrollTech.
56
 
 *      And you are not permitted to distribute binaries compiled against
57
 
 *      these libraries without written consent from Quest Software, Inc.
58
 
 *      Observe that this does not disallow linking to the Qt Free Edition.
59
 
 *
60
 
 *      You may link this product with any GPL'd Qt library such as Qt/Free
61
 
 *
62
 
 * All trademarks belong to their respective owners.
63
 
 *
64
 
 *****/
65
 
 
66
 
#ifndef TOSMTP_H
67
 
#define TOSMTP_H
68
 
 
69
 
#include <qobject.h>
70
 
#include <qstring.h>
71
 
 
72
 
class QDns;
73
 
class QSocket;
74
 
class QTextStream;
75
 
 
76
 
// Adapted from Qt smtp example.
77
 
 
78
 
/** Used to send mail asyncronously. Just create an instance and forget it.
79
 
 * It will delete itself when done.
80
 
 */
81
 
 
82
 
class toSMTP : public QObject
83
 
{
84
 
  Q_OBJECT
85
 
 
86
 
public:
87
 
  /** Send an email.
88
 
   * @param from From field of email.
89
 
   * @param to To field of email header.
90
 
   * @param subject Subject of mail.
91
 
   * @param body Body of email message.
92
 
   */
93
 
  toSMTP(const QString &from,const QString &to,
94
 
         const QString &subject,const QString &body);
95
 
  ~toSMTP();
96
 
 
97
 
private slots:
98
 
  void dnsLookupHelper();
99
 
  void readyRead();
100
 
  void connected();
101
 
 
102
 
private:
103
 
  enum state {
104
 
    Init,
105
 
    Mail,
106
 
    Rcpt,
107
 
    Data,
108
 
    Body,
109
 
    Quit,
110
 
    Close
111
 
  };
112
 
 
113
 
  QString Message;
114
 
  QString From;
115
 
  QString Recipient;
116
 
  QSocket *Socket;
117
 
  QTextStream *Stream;
118
 
  int State;
119
 
  QString Response;
120
 
  QDns * MXLookup;
121
 
};
122
 
 
123
 
#endif
124
 
</pre>
125
 
<HR>
126
 
        <table>
127
 
        <tr><td><small>Generated by: nneul on skyhawk on Wed Feb 23 19:49:58 2005, using kdoc 2.0a54.</small></td></tr>
128
 
        </table>
129
 
</BODY>
130
 
</HTML>