summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2018-11-27Sluift: Added handling of roster push eventRoger Planas
Swiften handles roster push event notifications, but those were not passed to Sluift, so a Sluift client, when querying events, would not be aware if an XMPP server roster pushes. This patch adds extra events types to Sluift so that method for_each_event reports roster pushes notifications. Test-information: Used sluift client to retrieve all items after adding, removing and updating roster items, and now Sluift clients can see these events. Change-Id: Ide5597bf2b39e3cc20014c66ba9153c551eec670
2018-11-08Consistently use unsigned short for network portsEdwin Mons
Network ports are now consistently stored as unsigned shorts, apart from the options and user interface, where -1 is still used to denote the use of default ports. Test-Information: Unit tests pass on macOS 10.13 and Debian 9 On macOS: tested the UI with various proxy and manual ports, behaviour as expected. Change-Id: I7a65f40083022887aa30ed7b21eadc56d0c52be1
2018-04-28Fix compiler warnings for SluiftKevin Smith
Test-Information: ./scons allow_warnings=0 Sluift now builds on latest macOS Change-Id: I7aca1c733dd86c772fc3a55f76d4915ad3c76e8d
2017-01-27Sluift: Add handling of block/unblock eventsRoger Planas
Swiften handles blocklist event notifications, but those were not passed to Sluift, so a Sluift client, when querying events, would not be aware if an XMPP server pushes block/unblock. This patch adds an extra event type to Sluift so that method for_each_event reports block/unblock notifications, in addition to a new API 'get_block_list' to retrieve the blocklist from the server. Test-information: Used Sluift client to retrieve blocklist and it is as expected. Also used client to retrieve all items after adding, removing and removing all items in the blocklist, and Sluift clients can now see these events. Change-Id: I0b76289ebd9e63505ff8a99cd9c0aa0e93af0c22
2016-09-29Fix uninitialised class membersTobias Markmann
Initialised previously uninitialised class members. Changed some raw pointers to std::unique_ptr for clearer and automatically initialised code. Test-Information: Builds on macOS 10.12 and unit tests pass in ASAN-enabled build. Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
2016-04-07Fix building with system boost on Debian 8.4Tobias Markmann
The signals library is still called signals and not signals2. Test-Information: Builds and unit tests pass on Debian 8.4 with system GCC. Change-Id: I1d1b3f6bade979bc8a181915176b84be0ddf6597
2016-04-05Migrate to Boost.Signals2 from Boost.SignalsTobias Markmann
Boost.Signals was deprecated and is not improved further. This patch removes Boost.Signals from 3rdParty and adds Boost.Signals2 and its dependencies. Also removed the Qt signals compatibility file Swiften/Base/boost_bsignals.h. Test-Information: Build and ran unit tests on OS X 10.11.4. Confirmed successful login using Swift client. Change-Id: Ie6e3b2d15aac2462cda95401582f5287a479fb54
2016-04-04Modernize code to use C++11 shared_ptr instead of Boost'sTobias Markmann
This change was done by applying the following 'gsed' replacement calls to all source files: 's/\#include <boost\/shared_ptr\.hpp>/\#include <memory>/g' 's/\#include <boost\/enable_shared_from_this\.hpp>/\#include <memory>/g' 's/\#include <boost\/smart_ptr\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/make_shared\.hpp>/\#include <memory>/g' 's/\#include <boost\/weak_ptr\.hpp>/\#include <memory>/g' 's/boost::make_shared/std::make_shared/g' 's/boost::dynamic_pointer_cast/std::dynamic_pointer_cast/g' 's/boost::shared_ptr/std::shared_ptr/g' 's/boost::weak_ptr/std::weak_ptr/g' 's/boost::enable_shared_from_this/std::enable_shared_from_this/g' The remaining issues have been fixed manually. Test-Information: Code builds on OS X 10.11.4 and unit tests pass. Change-Id: Ia7ae34eab869fb9ad6387a1348426b71ae4acd5f
2016-03-31Convert tabs to 4 spaces for all source filesTobias Markmann
Removed trailing spaces and whitespace on empty lines in the process. Changed CheckTabs.py tool to disallow hard tabs in source files. Test-Information: Manually checked 30 random files that the conversion worked as expected. Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
2016-03-30Apply consistent #include grouping and sorting styleTobias Markmann
Changed "" style includes to <> style. Test-Information: Build with Clang 3.9.0 and ran all tests on OS X 10.11.4. Change-Id: Ic05e53f2e5dba39cc1307b116fc5f17b62ab9eb8
2016-02-10Sluift: Add timeout to roster receiving operationsRoger Planas
This avoids Sluift indefinitely waiting if the server does not respond Test-Information: Before the patch, a sluift client would wait indefinitely if a buggy XMPP server does not respond. With this patch, sluift clients now timeout and through an exception after SLUIFT_TIMEOUT when the server does not respond. Change-Id: I9d36f53a8f4d5b3d594cef68c42de38fd5a1c296
2014-12-15Update Copyright In SluiftKevin Smith
Change-Id: I19f8ae342e028a6a7b4b13758f2e8c170a1db80c
2014-01-18Sluift: Refactor global debug & timeout options.Remko Tronçon
Use regular table values on the sluift table. Enable enabling tracing on a client after the fact. Change-Id: Iaa2bea61bdadf0b8dec4951654c402b7133c1151
2013-10-28Add port option to Sluift client connectRoger
Provide a mechanism to allow setting both the port and hostname for a Sluift client connection. By default Sluift leave port to -1 to use the port discovered by SRV lookups, with 5222 as a fallback. With this change, the port is now manually configurable as well. Change-Id: Idef5457e95127cfa86181b462d9ef42aa4f096ff
2013-09-01Sluift: More PubSub convenience methods & use cases.Remko Tronçon
- Convenience iterators to PubSub and PubSubNode. - Retrieving X most recent items - Retrieving a single item - Fixed GeoLocation serializer Change-Id: Ib4ecde225fb274b21163fcc9b52e19b0d3431860
2013-08-27PubSub implementation & Sluift refactoring.Remko Tronçon
Change-Id: I04ff7111b73565c00bff6db183451774a633344f