summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2015-10-29 16:15:20 (GMT)
committerKevin Smith <kevin.smith@isode.com>2015-10-30 12:50:06 (GMT)
commitefb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a (patch)
tree0f520a39713370f711c82610c089e966beb70412
parent8719b25e0dda4c8dae30c86ff88315e0e7fa9e1c (diff)
downloadswift-efb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a.zip
swift-efb98f5c83fc5e0fb598a88e04c8bf6f642b5e2a.tar.bz2
Fix code in response to unused macro and private field warnings
Test-Information: Build and tests pass successfully on OS X 10.10.5. Change-Id: I614586660796f9ef043156d09d998d39934a6eca
-rw-r--r--Sluift/component.cpp57
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.cpp2
-rw-r--r--Swift/Controllers/Roster/ContactRosterItem.h2
-rw-r--r--Swift/Controllers/Roster/ItemOperations/SetPresence.h6
-rw-r--r--Swift/Controllers/Roster/RosterController.cpp2
-rw-r--r--Swiften/FileTransfer/FileTransferManagerImpl.cpp1
-rw-r--r--Swiften/FileTransfer/IncomingFileTransferManager.cpp8
-rw-r--r--Swiften/FileTransfer/IncomingFileTransferManager.h5
8 files changed, 37 insertions, 46 deletions
diff --git a/Sluift/component.cpp b/Sluift/component.cpp
index 5fa80ac..e92352e 100644
--- a/Sluift/component.cpp
+++ b/Sluift/component.cpp
@@ -1,45 +1,47 @@
/*
- * Copyright (c) 2014 Isode Limited.
+ * Copyright (c) 2014-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
-#include <boost/lambda/lambda.hpp>
-#include <boost/lambda/bind.hpp>
-#include <boost/assign/list_of.hpp>
#include <iostream>
+#include <boost/assign/list_of.hpp>
+#include <boost/lambda/bind.hpp>
+#include <boost/lambda/lambda.hpp>
+
+#include <Sluift/ElementConvertors/IQConvertor.h>
+#include <Sluift/ElementConvertors/MessageConvertor.h>
+#include <Sluift/ElementConvertors/PresenceConvertor.h>
+#include <Sluift/ElementConvertors/StanzaConvertor.h>
+#include <Sluift/ElementConvertors/StatusShowConvertor.h>
+#include <Sluift/Lua/Check.h>
+#include <Sluift/Lua/Exception.h>
+#include <Sluift/Lua/FunctionRegistration.h>
+#include <Sluift/Lua/LuaUtils.h>
+#include <Sluift/Lua/Value.h>
#include <Sluift/SluiftComponent.h>
-#include <Swiften/JID/JID.h>
-#include <Swiften/Elements/SoftwareVersion.h>
+#include <Sluift/globals.h>
+
+#include <Swiften/Base/IDGenerator.h>
+#include <Swiften/Base/foreach.h>
+#include <Swiften/Elements/DiscoInfo.h>
+#include <Swiften/Elements/MAMQuery.h>
#include <Swiften/Elements/Message.h>
#include <Swiften/Elements/Presence.h>
#include <Swiften/Elements/RawXMLPayload.h>
#include <Swiften/Elements/RosterItemPayload.h>
#include <Swiften/Elements/RosterPayload.h>
-#include <Swiften/Elements/DiscoInfo.h>
-#include <Swiften/Elements/MAMQuery.h>
-#include <Swiften/Queries/GenericRequest.h>
+#include <Swiften/Elements/SoftwareVersion.h>
+#include <Swiften/JID/JID.h>
#include <Swiften/Presence/PresenceSender.h>
-#include <Swiften/Roster/XMPPRoster.h>
-#include <Swiften/Roster/SetRosterRequest.h>
#include <Swiften/Presence/SubscriptionManager.h>
-#include <Swiften/Roster/XMPPRosterItem.h>
+#include <Swiften/Queries/GenericRequest.h>
#include <Swiften/Queries/IQRouter.h>
#include <Swiften/Queries/Requests/GetSoftwareVersionRequest.h>
-#include <Sluift/Lua/FunctionRegistration.h>
-#include <Swiften/Base/foreach.h>
-#include <Swiften/Base/IDGenerator.h>
-#include <Sluift/Lua/Check.h>
-#include <Sluift/Lua/Value.h>
-#include <Sluift/Lua/Exception.h>
-#include <Sluift/Lua/LuaUtils.h>
-#include <Sluift/globals.h>
-#include <Sluift/ElementConvertors/StanzaConvertor.h>
-#include <Sluift/ElementConvertors/IQConvertor.h>
-#include <Sluift/ElementConvertors/PresenceConvertor.h>
-#include <Sluift/ElementConvertors/MessageConvertor.h>
-#include <Sluift/ElementConvertors/StatusShowConvertor.h>
+#include <Swiften/Roster/SetRosterRequest.h>
+#include <Swiften/Roster/XMPPRoster.h>
+#include <Swiften/Roster/XMPPRosterItem.h>
using namespace Swift;
namespace lambda = boost::lambda;
@@ -328,11 +330,6 @@ static int sendQuery(lua_State* L, IQ::Type type) {
boost::make_shared< GenericRequest<Payload> >(type, from, to, payload, component->getComponent()->getIQRouter()), timeout).convertToLuaResult(L);
}
-#define DISPATCH_PUBSUB_PAYLOAD(payloadType, container, response) \
- else if (boost::shared_ptr<payloadType> p = boost::dynamic_pointer_cast<payloadType>(payload)) { \
- return component->sendPubSubRequest(type, to, p, timeout).convertToLuaResult(L); \
- }
-
SLUIFT_LUA_FUNCTION(Component, get) {
return sendQuery(L, IQ::Get);
}
diff --git a/Swift/Controllers/Roster/ContactRosterItem.cpp b/Swift/Controllers/Roster/ContactRosterItem.cpp
index ae05aee..3258fb5 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.cpp
+++ b/Swift/Controllers/Roster/ContactRosterItem.cpp
@@ -94,7 +94,7 @@ void ContactRosterItem::clearPresence() {
onDataChanged();
}
-void ContactRosterItem::applyPresence(const std::string& resource, boost::shared_ptr<Presence> presence) {
+void ContactRosterItem::applyPresence(boost::shared_ptr<Presence> presence) {
presence_ = presence;
onDataChanged();
}
diff --git a/Swift/Controllers/Roster/ContactRosterItem.h b/Swift/Controllers/Roster/ContactRosterItem.h
index ec04a8c..d21935c 100644
--- a/Swift/Controllers/Roster/ContactRosterItem.h
+++ b/Swift/Controllers/Roster/ContactRosterItem.h
@@ -55,7 +55,7 @@ class ContactRosterItem : public RosterItem {
const JID& getJID() const;
void setDisplayJID(const JID& jid);
const JID& getDisplayJID() const;
- void applyPresence(const std::string& resource, boost::shared_ptr<Presence> presence);
+ void applyPresence(boost::shared_ptr<Presence> presence);
const std::vector<std::string>& getGroups() const;
/** Only used so a contact can know about the groups it's in*/
void addGroup(const std::string& group);
diff --git a/Swift/Controllers/Roster/ItemOperations/SetPresence.h b/Swift/Controllers/Roster/ItemOperations/SetPresence.h
index 0b54237..2b5bbbe 100644
--- a/Swift/Controllers/Roster/ItemOperations/SetPresence.h
+++ b/Swift/Controllers/Roster/ItemOperations/SetPresence.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -9,8 +9,8 @@
#include <Swiften/Elements/Presence.h>
#include <Swiften/JID/JID.h>
-#include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h>
#include <Swift/Controllers/Roster/ContactRosterItem.h>
+#include <Swift/Controllers/Roster/ItemOperations/RosterItemOperation.h>
namespace Swift {
@@ -24,7 +24,7 @@ class SetPresence : public RosterItemOperation {
virtual void operator() (RosterItem* item) const {
ContactRosterItem* contact = dynamic_cast<ContactRosterItem*>(item);
if (contact && contact->getJID().equals(presence_->getFrom(), compareType_)) {
- contact->applyPresence(presence_->getFrom().getResource(), presence_);
+ contact->applyPresence(presence_);
}
}
diff --git a/Swift/Controllers/Roster/RosterController.cpp b/Swift/Controllers/Roster/RosterController.cpp
index 751ca32..75acaa9 100644
--- a/Swift/Controllers/Roster/RosterController.cpp
+++ b/Swift/Controllers/Roster/RosterController.cpp
@@ -377,7 +377,7 @@ void RosterController::handleAvatarChanged(const JID& jid) {
void RosterController::handlePresenceChanged(Presence::ref presence) {
if (presence->getFrom().equals(myJID_, JID::WithResource)) {
- ownContact_->applyPresence(std::string(), presence);
+ ownContact_->applyPresence(presence);
mainWindow_->setMyContactRosterItem(ownContact_);
}
else {
diff --git a/Swiften/FileTransfer/FileTransferManagerImpl.cpp b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
index f4f9517..9dc9d0d 100644
--- a/Swiften/FileTransfer/FileTransferManagerImpl.cpp
+++ b/Swiften/FileTransfer/FileTransferManagerImpl.cpp
@@ -77,7 +77,6 @@ FileTransferManagerImpl::FileTransferManagerImpl(
crypto);
incomingFTManager = new IncomingFileTransferManager(
jingleSessionManager,
- iqRouter,
transporterFactory,
timerFactory,
crypto);
diff --git a/Swiften/FileTransfer/IncomingFileTransferManager.cpp b/Swiften/FileTransfer/IncomingFileTransferManager.cpp
index 239c4a8..c1cc757 100644
--- a/Swiften/FileTransfer/IncomingFileTransferManager.cpp
+++ b/Swiften/FileTransfer/IncomingFileTransferManager.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2014 Isode Limited.
+ * Copyright (c) 2010-2015 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -13,20 +13,18 @@
#include <Swiften/Elements/JingleFileTransferDescription.h>
#include <Swiften/Elements/JingleIBBTransportPayload.h>
#include <Swiften/Elements/JingleS5BTransportPayload.h>
-#include <Swiften/Jingle/JingleSessionManager.h>
-#include <Swiften/Jingle/Jingle.h>
#include <Swiften/FileTransfer/IncomingJingleFileTransfer.h>
+#include <Swiften/Jingle/Jingle.h>
+#include <Swiften/Jingle/JingleSessionManager.h>
namespace Swift {
IncomingFileTransferManager::IncomingFileTransferManager(
JingleSessionManager* jingleSessionManager,
- IQRouter* router,
FileTransferTransporterFactory* transporterFactory,
TimerFactory* timerFactory,
CryptoProvider* crypto) :
jingleSessionManager(jingleSessionManager),
- router(router),
transporterFactory(transporterFactory),
timerFactory(timerFactory),
crypto(crypto) {
diff --git a/Swiften/FileTransfer/IncomingFileTransferManager.h b/Swiften/FileTransfer/IncomingFileTransferManager.h
index 6edf53b..285ff3f 100644
--- a/Swiften/FileTransfer/IncomingFileTransferManager.h
+++ b/Swiften/FileTransfer/IncomingFileTransferManager.h
@@ -14,7 +14,6 @@
#include <Swiften/Jingle/IncomingJingleSessionHandler.h>
namespace Swift {
- class IQRouter;
class JingleSessionManager;
class FileTransferTransporterFactory;
class TimerFactory;
@@ -24,11 +23,10 @@ namespace Swift {
public:
IncomingFileTransferManager(
JingleSessionManager* jingleSessionManager,
- IQRouter* router,
FileTransferTransporterFactory* transporterFactory,
TimerFactory* timerFactory,
CryptoProvider* crypto);
- ~IncomingFileTransferManager();
+ virtual ~IncomingFileTransferManager();
boost::signal<void (IncomingFileTransfer::ref)> onIncomingFileTransfer;
@@ -40,7 +38,6 @@ namespace Swift {
private:
JingleSessionManager* jingleSessionManager;
- IQRouter* router;
FileTransferTransporterFactory* transporterFactory;
TimerFactory* timerFactory;
CryptoProvider* crypto;