summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jabberfiletransfer.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commitbcb704366cb5e333a626c18c308c7e0448a8e69f (patch)
treef0d6ab7d78ecdd9207cf46536376b44b91a1ca71 /kopete/protocols/jabber/jabberfiletransfer.h
downloadtdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.tar.gz
tdenetwork-bcb704366cb5e333a626c18c308c7e0448a8e69f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kopete/protocols/jabber/jabberfiletransfer.h')
-rw-r--r--kopete/protocols/jabber/jabberfiletransfer.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/kopete/protocols/jabber/jabberfiletransfer.h b/kopete/protocols/jabber/jabberfiletransfer.h
new file mode 100644
index 00000000..01ba99e1
--- /dev/null
+++ b/kopete/protocols/jabber/jabberfiletransfer.h
@@ -0,0 +1,74 @@
+ /*
+ * jabberfiletransfer.h
+ *
+ * Copyright (c) 2004 by Till Gerken <till@tantalo.net>
+ *
+ * Kopete (c) by the Kopete developers <kopete-devel@kde.org>
+ *
+ * *************************************************************************
+ * * *
+ * * This program is free software; you can redistribute it and/or modify *
+ * * it under the terms of the GNU General Public License as published by *
+ * * the Free Software Foundation; either version 2 of the License, or *
+ * * (at your option) any later version. *
+ * * *
+ * *************************************************************************
+ */
+
+#ifndef JABBERFILETRANSFER_H
+#define JABBERFILETRANSFER_H
+
+#include <qobject.h>
+#include <filetransfer.h>
+
+class QString;
+class JabberAccount;
+namespace Kopete { class Transfer; }
+namespace Kopete { class FileTransferInfo; }
+class JabberBaseContact;
+
+class JabberFileTransfer : public QObject
+{
+
+Q_OBJECT
+
+public:
+ /**
+ * Constructor for an incoming transfer
+ */
+ JabberFileTransfer ( JabberAccount *account, XMPP::FileTransfer *incomingTransfer );
+
+ /**
+ * Constructor for an outgoing transfer
+ */
+ JabberFileTransfer ( JabberAccount *account, JabberBaseContact *contact, const QString &file );
+
+ ~JabberFileTransfer ();
+
+private slots:
+ void slotIncomingTransferAccepted ( Kopete::Transfer *transfer, const QString &fileName );
+ void slotTransferRefused ( const Kopete::FileTransferInfo &transfer );
+ void slotTransferResult ();
+ void slotTransferError ( int errorCode );
+
+ void slotOutgoingConnected ();
+ void slotOutgoingBytesWritten ( int nrWritten );
+
+ void slotIncomingDataReady ( const QByteArray &data );
+
+private:
+ void initializeVariables ();
+
+ JabberAccount *mAccount;
+ XMPP::FileTransfer *mXMPPTransfer;
+ Kopete::Transfer *mKopeteTransfer;
+ QFile mLocalFile;
+ int mTransferId;
+ Q_LLONG mBytesTransferred;
+ Q_LLONG mBytesToTransfer;
+
+};
+
+#endif
+
+// vim: set noet ts=4 sts=4 tw=4: