Some work about adaptive color scheme for Web UI (PR #19901) http://[316:c51a:62a3:8b9::4]/d4708/qBittorrent/src/branch/adaptive-webui
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
1.1 KiB

/****************************************************************************
** $Id: qt/smtp.h 3.3.6 edited Aug 31 2005 $
**
** Copyright (C) 1992-2005 Trolltech AS. All rights reserved.
**
** This file is part of an example program for Qt. This example
** program may be used, distributed and modified without limitation.
**
*****************************************************************************/
#ifndef SMTP_H
#define SMTP_H
#include <QString>
#include <QObject>
#include <QByteArray>
struct QTextStream;
struct QTcpSocket;
class QTextCodec;
class Smtp : public QObject {
Q_OBJECT
public:
Smtp(const QString &from, const QString &to, const QString &subject, const QString &body);
~Smtp();
private slots:
void readyRead();
private:
QByteArray encode_mime_header(const QString& key, const QString& value, QTextCodec* latin1, const QByteArray& prefix=QByteArray());
private:
QByteArray message;
QTextStream *t;
QTcpSocket *socket;
QString from;
QString rcpt;
QString response;
enum states{Rcpt,Mail,Mail2,Data,Init,Body,Quit,Close};
int state;
};
#endif