-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathqfiletrans.h
40 lines (30 loc) · 1000 Bytes
/
qfiletrans.h
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
#ifndef QFILETRANS_H
#define QFILETRANS_H
//#include <QAbstractSocket>
#include <QXmppClient.h>
#include <QXmppTransferManager.h>
#include <QXmppLogger.h>
class Dialog;
class QFileTrans : public QXmppClient
{
public:
enum LoginType {Common,CA};
QFileTrans(QObject *parent = 0);
void setRecipient( const QString &recipient);
QXmppTransferJob* sendFile(const QString recipient,const QString file);
void login(QString usr,QString pwd,QString domain,QString host,LoginType type = Common);
private slots:
void slotError(QXmppTransferJob::Error error);
void slotFileReceived(QXmppTransferJob *job);
void slotFinished();
void slotPresenceReceived(const QXmppPresence &presence);
void slotProgress(qint64 done, qint64 total);
void qxmpp_sendMessage(QString to ,QString msg);
void qxmpp_sendData(QString data);
private:
QString m_recipient;
Dialog *m_parent;
public:
QXmppTransferManager *transferManager;
};
#endif // QFILETRANS_H