From 6cea7fdfea93e54543c6757909a8fae7348754fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be> Date: Wed, 28 Sep 2011 21:26:48 +0200 Subject: Added getRecipient() to IncomingJingleFileTransfer. diff --git a/Swiften/FileTransfer/IncomingFileTransfer.h b/Swiften/FileTransfer/IncomingFileTransfer.h index a6cf05e..5b53d54 100644 --- a/Swiften/FileTransfer/IncomingFileTransfer.h +++ b/Swiften/FileTransfer/IncomingFileTransfer.h @@ -21,6 +21,8 @@ namespace Swift { virtual ~IncomingFileTransfer(); virtual void accept(WriteBytestream::ref) = 0; + virtual const JID& getSender() const = 0; + virtual const JID& getRecipient() const = 0; }; } diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp index 0481a47..ab6b5e5 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.cpp @@ -124,6 +124,10 @@ const JID& IncomingJingleFileTransfer::getSender() const { return session->getInitiator(); } +const JID& IncomingJingleFileTransfer::getRecipient() const { + return ourJID; +} + void IncomingJingleFileTransfer::cancel() { session->sendTerminate(JinglePayload::Reason::Cancel); diff --git a/Swiften/FileTransfer/IncomingJingleFileTransfer.h b/Swiften/FileTransfer/IncomingJingleFileTransfer.h index 9e77de7..4ae0bfb 100644 --- a/Swiften/FileTransfer/IncomingJingleFileTransfer.h +++ b/Swiften/FileTransfer/IncomingJingleFileTransfer.h @@ -48,7 +48,7 @@ namespace Swift { }; IncomingJingleFileTransfer( - const JID& ourJID, + const JID& recipient, JingleSession::ref, JingleContentPayload::ref content, RemoteJingleTransportCandidateSelectorFactory*, @@ -61,6 +61,7 @@ namespace Swift { virtual void accept(WriteBytestream::ref); virtual const JID& getSender() const; + virtual const JID& getRecipient() const; void cancel(); private: -- cgit v0.10.2-6-g49f6