summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2011-09-26 20:29:46 (GMT)
committerKevin Smith <git@kismith.co.uk>2011-09-26 20:29:46 (GMT)
commitdf957dbaaa42330ff888e42fe6f2d31c01d8129d (patch)
tree9fc32248674af5a678fccf09567833d89b4a77db /Swiften/FileTransfer/FileTransferManagerImpl.cpp
parent4c59af568ab9913dd4a7f0df2ebb35f5ec480bbf (diff)
downloadswift-contrib-df957dbaaa42330ff888e42fe6f2d31c01d8129d.zip
swift-contrib-df957dbaaa42330ff888e42fe6f2d31c01d8129d.tar.bz2
Compile on Windows
Diffstat (limited to 'Swiften/FileTransfer/FileTransferManagerImpl.cpp')
-rw-r--r--Swiften/FileTransfer/FileTransferManagerImpl.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.cpp b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
index a30aeed..4eacf33 100644
--- a/Swiften/FileTransfer/FileTransferManagerImpl.cpp
+++ b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
@@ -1,18 +1,19 @@
/*
* Copyright (c) 2011 Tobias Markmann
* Licensed under the simplified BSD license.
* See Documentation/Licenses/BSD-simplified.txt for more information.
*/
#include <Swiften/FileTransfer/FileTransferManagerImpl.h>
#include <boost/bind.hpp>
+#include <boost/cstdint.hpp>
#include <Swiften/Base/foreach.h>
#include "Swiften/Disco/EntityCapsProvider.h"
#include <Swiften/JID/JID.h>
#include <Swiften/Elements/StreamInitiationFileInfo.h>
#include <Swiften/FileTransfer/ConnectivityManager.h>
#include <Swiften/FileTransfer/OutgoingFileTransferManager.h>
#include <Swiften/FileTransfer/IncomingFileTransferManager.h>
#include <Swiften/FileTransfer/DefaultLocalJingleTransportCandidateGeneratorFactory.h>
@@ -88,24 +89,24 @@ boost::optional<JID> FileTransferManagerImpl::highestPriorityJIDSupportingFileTr
}
}
}
return fullReceipientJID.isValid() ? boost::optional<JID>(fullReceipientJID) : boost::optional<JID>();
}
OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(const JID& to, const boost::filesystem::path& filepath, const std::string& description, boost::shared_ptr<ReadBytestream> bytestream) {
std::string filename = filepath.filename();
- uintmax_t sizeInBytes = boost::filesystem::file_size(filepath);
+ boost::uintmax_t sizeInBytes = boost::filesystem::file_size(filepath);
boost::posix_time::ptime lastModified = boost::posix_time::from_time_t(boost::filesystem::last_write_time(filepath));
return createOutgoingFileTransfer(to, filename, description, sizeInBytes, lastModified, bytestream);
}
-OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(const JID& to, const std::string& filename, const std::string& description, const uintmax_t sizeInBytes, const boost::posix_time::ptime& lastModified, boost::shared_ptr<ReadBytestream> bytestream) {
+OutgoingFileTransfer::ref FileTransferManagerImpl::createOutgoingFileTransfer(const JID& to, const std::string& filename, const std::string& description, const boost::uintmax_t sizeInBytes, const boost::posix_time::ptime& lastModified, boost::shared_ptr<ReadBytestream> bytestream) {
StreamInitiationFileInfo fileInfo;
fileInfo.setDate(lastModified);
fileInfo.setSize(sizeInBytes);
fileInfo.setName(filename);
fileInfo.setDescription(description);
JID receipient = to;
if(receipient.isBare()) {