summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-11-14Remove extra semicolonsTobias Markmann
clang-trunk complained about them and ideally Swift would build without warnings. Test-Information: Builds find and tests pass. Change-Id: I1896befef0e65a980cc22f402e126aec8b56e71f
2019-10-30Bring StreamError enum to specEdwin Mons
RFC 6120 no longer defines invalid-id, and adds unsupported-feature. The StreamError enum was derived from the schema in section A.2, which erroneously had these two deviations from 4.9.3. Test-Information: Unit tests pass on Debian 9 Change-Id: I2bb3d0b09448877bbd4618fa852baab87bfa1abc
2018-11-14Address bad_numeric_casts for filetransfersEdwin Mons
The filetransfer blockSize is now an unsigned integer, as 0 could be used to denote an invalid block size as well (and indeed, already indicated that better than -1 did). All use of numeric_cast in filetransfer code has been fixed to deal with the possibility of thrown exceptions. Test-Information: Unit tests pass on macOS and Debian Change-Id: I1833d553bae071238be20ebc386ef602effb78b0
2018-11-14Fix Stanza Ack maximum and testsEdwin Mons
The stanza ack code now uses a constexpr without numeric cast to calculate the maximum, and test code uses the constant UINT32_MAX from limits, both of which should result in the same number. Test-Information: Unit tests pass on macOS 10.14 Change-Id: Iba8fc779e52699d480d1ce458df0c6581a16ad06
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-07-24Add a XEP-346 FDP Form Submission DialogPeter Burgess
A new form submission dialog that will discover nodes containing fdp form templates in a given pubsub domain, and will present the form to the user ready to be filled out and submitted. Test-Infomation: Personally tested the request for all node items, loading the latest form from one of the discovered nodes, submitting a form and checking it turns up on my mlink server using mlc, checked that the submitted infomation is correct, what happens when an incorrect domain is queried, what happens when a valid domain is queried but it has no fdp nodes, and what happens when a form is requested from an invalid node. Unit tests written to test success and failure of the three controller functions requestPubSubNodeData(), requestTemplateForm() and testSubmitForm(). Change-Id: If8c57bb4e3120dd44d52f7332069eb18a14cb385
2018-03-27Add new ReferencePayload element class, parser and serializerPeter Burgess
Added a new element object ReferencePayload, and created the parser and serializer to handle this element. Currently no functionality to send references directly in swift, nor to render their contents. Test-Information: Unit tests written and passed for serializer and parser, testing various types of valid and invalid references, and testing references with embedded payloads. Change-Id: I81fd5d9e020fac1729640f297705806af97f6388
2018-02-27Divide differently marked msgs and elide msgs matching roomPeter Burgess
If consecutive message from the same user have differing security markings, then mark them as non continuing to show clearer seperation of messages with different security markings. They are seperated in the same way as consecutive messages from different users are. Further to this, there is a new scheme for displaying message security markings. Messages with a security marking matching the room security marking will not be marked, aside from the first in a series of consecutive messages marked with the same security marking. Unmarked messages in a room with a security marking will be marked as such. This new marking display system can be turned on and off via an xml setting "mucMarkingElision". Test-Information: Unit tests written and passed in MUCControllerTest, runs as expected. Change-Id: Id2b66417f363c49c131d27e738ce786755d65203
2018-02-22Request and display security markings for MUC chat windowsPeter Burgess
Disco#info requested and handled by MUCController on rejoin(). UI display of disco#info implemented for QtChatWindow. Test-Information: Tests written for new MUCController features, and all tests passed. Swift runs with changes and security markings show as and when expected in local isode MUC windows. Change-Id: Ibef4a31f6f8c4cff5f518a66106266a7f961d103
2017-07-18Add MIXUpdateSubscription Element, its Parser and SerializerTarun Gupta
Updates MIXJoin Element list of subscriptions to an unordered_set. Remove redundant MIXSubscribe Element. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXUpdateSubscription Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Ied06269cf329b4fdffdde4ace67ebffa4089fbde
2017-07-14Add MIXRegisterNick Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXRegisterNick Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I80796db9d540c58296afa3454f29e1fb81d04615
2017-07-13Remove Swiften/Base/Override.hTobias Markmann
Replaced SWIFTEN_OVERRIDE with C++11 standard override keyword. Test-Information: Tested on macOS 10.12.5 with clang trunk. Change-Id: If89c6cc2a648662522a320834c314496c943a55a
2017-07-12Add MIXSetNick Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXSetNick Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I23081637f2aecf9fc5abc63147d01bfd4d2bb2f1
2017-07-11Add MIXPayload, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXPayload Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: I45da05d6fe57b4be7ed8534dd84cbf0fd31ced1a
2017-07-06Adds MIXLeave Element, its Parser and Serializerswift-5.0alphaTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXLeave Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Ie9eb3341b23099de4dda2b9915d28115dbfe5837
2017-07-05Adds MIXUserPreference Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIXUserPreference Parser and Serializer based on examples in XEP 0369, which passes. Change-Id: I06595325f4cc2b34d5ab5a93a6caa00330fe0737
2017-07-03Adds MIX Create Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIX Create Parser and Serializer based on examples in XEP 0369, which passes. Change-Id: I33b85c8243d55cd293c886f2607bdd9dec6c7bdb
2017-06-26Adds MIX Join Element, its Parser and Serializer.Tarun Gupta
Add MIXDestroySerializer to FullPayloadSerializerCollection. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIX Join Parser and Serializer based on examples in XEP 0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Ibf7446dd65714dccdd39c485549fd9fb9faba40c
2017-06-26Remove unneeded forward declarations from Swiften headersTobias Markmann
Found by cppclean. Test-Information: Still builds on macOS 10.12.5 with clang trunk. Change-Id: Ie8a154e12b196587c956c8b333abf529a36f6bb3
2017-06-25Adds MIX Destroy Element, its Parser and Serializer.Tarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Added tests for MIX Destroy Parser and Serializer based on examples in XEP 0369, which passes. Change-Id: I56810eb2fc26cc6aeb5e1cfb2a32e312f0607ba9
2017-06-18Adds MIX Participant Element, its Parsers and Serializers.Tarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Adds tests for MIX Participant Parser and Serializer from XEP-0369, which passes. Tested on Ubuntu 16.04 LTS. Change-Id: Iee2d96c8ebdf9461c28518f8f8c28c11d2a94524
2017-03-23Add Client State Indication Element, its Parser and SerializerTarun Gupta
License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: Adds tests for Client State Parser and Serializer, which passes. Tests performed on Ubuntu 16.04 LTS. Change-Id: I60c63f63e1c0fdd55600ef42faa95989ca5ab75b
2016-12-15Merge branch 'swift-3.x’Tobias Markmann
* swift-3.x: - Fix building Swift on 32-bit Linux distributions - Remove optional_fwd.hpp use; workaround for Boost Bug #12179 - Split COPYING.thirdparty in contributions/dependencies - Fixes for building packages on Debian Conflicts: BuildTools/SCons/SConstruct Sluift/Console.h Sluift/ITunesInterface.h Sluift/Terminal.h Swift/Packaging/Debian/debian/control.in Swift/QtUI/SConscript Swiften/Elements/Stanza.h Swiften/FileTransfer/FileTransferTransporter.h Swiften/FileTransfer/IBBReceiveSession.h Swiften/JID/JID.h Swiften/Network/BoostConnectionServer.h Swiften/Network/ConnectionServer.h Swiften/Parser/AttributeMap.h Test-Information: Builds on macOS 10.12.1 with clang trunk. Change-Id: I9f41ab199f227bc106721627ea994313c68e5cfe
2016-11-30Show MUC PM item-not-found error in MUC PM windowTobias Markmann
Previously, if one would send a MUC PM to a user that has left a room the error response from the MUC would be shown in the MUC room. Now the error will show in the MUC PM window, if the MUC PM full JID has a ChatController. Test-Information: Added unit test verifying new behaviour. Manually verified that the error is shown in the MUC PM window instead of the MUC room window. Change-Id: I1b259d5eee9e22217bbe7e5c09294d2166a77895
2016-11-23Migrate remaining Swiften/Base/foreach.h use to range-based for loopTobias Markmann
Test-Information: Build on macOS 10.12.1 and all tests pass. Change-Id: Iedaa3fa7e7672c77909fd0568bf30e9393cb87e0
2016-11-10Use FeatureOracle to detect file-transfer support in rosterTobias Markmann
The FeatureOracle provides tri-state feature lookup functionality for bare JIDs. It returns Yes if a feature is supported by all resources of the bare JID, Maybe if some support it, and No if none of the resources support it. If passed a full JID, it returns the specific features supported by that end-point. Sending a file to a bare JID, will send a file to the resource of the bare JID with the highest availability by presence, show status and priority and which supports the features required for a Jingle file-transfer. Test-Information: Added unit test verifying new behavior. All tests pass on OS X 10.11.6. Added new unit tests for FeatureOracle. Manually verified that the roster and chat window both use the same mechanism to detect support for file-transfers. Manually verified that file-transfers via the contact list goes to already bound full JIDs if there is an existing ChatController. Change-Id: I0175ac42ecb73f1d54f9c96ffbba773eb5e24296
2016-10-04Remove optional_fwd.hpp use; workaround for Boost Ticket #12179Tobias Markmann
Test-Information: Builds on macOS 10.12 and unit tests pass. Change-Id: Ia979e7dbd6f6c84085b1b951d81b925dffbed262
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-07-15Add missing includes for assert()swift-4.0beta1Tobias Markmann
This fixes building via ./Swift/Packaging/Debian/package_all_platforms.sh . Removed #pragma statements and did minimal associated cleanup. Test-Information: ./Swift/Packaging/Debian/package_all_platforms.sh passes successfully. ./scons test=all passes on OS X 10.11.5. Change-Id: I1688da31ca6081eddfcda83d473b15c3f711b420
2016-07-01Implement Message Carbons in Swift and Swift/ControllersTobias Markmann
If the server supports message carbons, Swift will try to enable it. Carbon copied messages will open a chat window in the background if no chat window exists for the conversation. Test-Information: Tested with a XMPP server Swift and a mobile Android client all supporting message carbons. Tested direct messages and MUC PM messages. All working as expected. Added unit tests for message carbons of sent messages and message carbons of received messages. All unit tests pass on OS X 10.11.5 Change-Id: I8d5b5d9975651a2353909dea976f58e4bf12e014
2016-06-14Fix handling of notify attribute in PubSub retract elementsTobias Markmann
Test-Information: Added serializer and parser unit tests. All tests pass on Mac OS X 10.11.4. Change-Id: I8550c76ba182a67613d55634c72c0f2979f8b80a
2016-06-10Fix remaining compiler warnings on OS X with clangTobias Markmann
This changes HippoMocks include to -isystem include so it will not cause compiler warnings. This changes UserLocation floating point values to double and remove remaining numerical casts. Change C++11 compiler test to not cause warnings. Test-Information: Builds with allow_warnings=0 on OS X 10.11.5 with Xcode clang. Change-Id: I26c60265a86c9be656089ade63fe9ad63851580f
2016-05-25Remove unnecessary include of iostream headerTobias Markmann
Move std::cout/cerr logging to SWIFT_LOG. Test-Information: Builds and all tests pass on OS X 10.11.5. Change-Id: I0a0c24654a8b3abf3244a79fd6d970eee90559d0
2016-05-04Fix /me message handling for highlighted messagesTobias Markmann
Test-Information: Added a unit test to test for the fix. Tests pass on OS X 10.11.4. Change-Id: Ibf071ae47663bfefdc856339932de6a1fe4a642d
2016-04-08Fix code in response to compiler warnings by clangTobias Markmann
Test-Information: Builds on OS X 10.11.4 with Apple clang and clang master. Change-Id: I012577e29c6fcf2fb452b4f13912aaeb37250fb5
2016-04-04Modernize code to use range based for loops using clang-tidyTobias Markmann
Run 'clang-tidy -fix -checks=modernize-loop-convert' on all source code files on OS X. This does not modernize platform specific code on Linux and Windows Test-Information: Code builds and unit tests pass on OS X 10.11.4. Change-Id: I65b99e0978cfab8ca6de2a3e5342e7a81416c12c
2016-04-04Apply automated clang-tidy fixes and add missing includesTobias Markmann
Test-Information: Builds on OS X 10.11.4 and unit tests pass. Change-Id: I8775e8d1e3addbc88b220c1cc618637f706daca2
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-03-17Tidy XEP-0141 codeTim Robbings
This change addresses some feedback the previous XEP-0141 commit (a39d650). Test-information: Ran the CPPUnit tests, these completed successfully. Change-Id: I2caf1eb1349f7527bd9af8ce8adfb194391253e4
2016-02-02Change stanza body to boost::optional<std::string> typeTobias Markmann
Changed MUCController to only handle message stanzas as subject change if <subject/> is present and neither <body/> nor <thread/> is present in the message stanza. Test-Information: Added unit tests verifying behavior described in XEP-0045 section 8.1. Unit tests pass on OS X 10.11.2. Change-Id: I1d22272da1675176be131ab360b214a98f20533f
2015-10-15Only bind full JID to ChatController on non-empty or typing messagesTobias Markmann
With this commit a ChatController is only bound to a full JID of a contact, if the incoming message of the contact has a non-empty body or is a 'typing' chat state notification. This avoids random binding to an arbitrary resource of a contact, that has multiple online resources and responds with delivery receipts. Test-Information: Tested with a conversation of a one resource account (A) to a two resource account (B). Sending two messages to B, the first used to go to both resources, then A would bind to the full JID and the second message would only go to one resource. With this fix all messages go to both resources, i.e. are send to the bare JID, until one resource of B replies. This binds the controller at A to the full JID of the reply of B. Change-Id: I8d9321a4226ab798e1196351ad087990d5dff8c3
2015-07-24Add missing includes for dependencies in public header filesTobias Markmann
Added Swiften/Base/Concat.h to the exception list for <algorithm> include, as Concat.h uses std::copy, defined in <algorithm>. Added Swiften/FileTransfer/S5BTransportSession.h to the exception list for <boost/bind.hpp> include, as S5BTransportSession.h declares a template class using boost::bind. Test-Information: Tested that each of Swiften's public header files compiles on its own. Change-Id: Iac794b6e0f5959cd8261888a67761813b710fe85
2015-06-29Parse hostname for xep-0233Mili Verma
Test-information: Verified with M-Link. Unit tests pass. Change-Id: Ic675c8d7cd70e01be61c51c0280e1d7208b364ba
2015-06-08Add missing SWIFTEN_API annotations to public Swiften APITobias Markmann
Test-Information: Tested build on Windows 8 with VS 2014 and ran unit tests. Change-Id: I3d8096df4801be6901f22564e36eecba0e7310c4
2015-03-28Add missing line endingsTobias Markmann
Test-Information: Builds. Change-Id: Ica4b1bca4ff71f103ee5ebad707bc0f95595ad37
2015-02-20Add elements/parsers/serializers/tests for Message Carbons (XEP-0280)Tobias Markmann
In addition this patch adds an element, a parser and a serializer for the <thread/> element from XMPP IM. Test-Information: Implemented unit tests pass as expected. Change-Id: I0a14c778c2c0bf65f4b405c9878c741449bfe142
2015-02-17Swiften XEP-0141 supportTim Robbings
Classes to support XEP-0141 data forms layout. This includes <page/>, <section/>, <reportedref/> and <text/> elements. The form parser and serializer classes have also been updated to handle these new elements, with added CPPUnit tests. Test-information: Tested using updated CPPUnit tests to check the parsing and serializing of new elements. All tests complete successfully. Change-Id: Ibeab22d2834512d06c7f656acd1ef24eea39d650
2015-02-11Support domain names in S5B proxy <streamhost> tags.Tobias Markmann
S5BProxyManager now resolves DNS names of proxy entries discovered via service discovery. Test-Information: Tested against a XMPP installation that uses domain names in proxy entires. Change-Id: I728243333ec6e62e86f088f2a7b6e222c629757b