summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2019-09-16Close the stream for disallowed XML featuresJoanna Hulboj
According to RFC 6120 if any disallowed XML feature is encountered, we should close the stream with a <restricted-xml/>. The following features of XML are prohibited in XMPP: - processing instructions - internal or external DTD subsets - internal or external entity references - comments Test-information: Unit tests pass on Windows 10 and Ubuntu 18.04.1 LTS Change-Id: I475920c91b7f9da51ab37c106a4783a52f6e3cae
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
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-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-07Update namespace for MIX ElementsTarun Gupta
Namespace update from urn:xmpp:mix:1 to urn:xmpp:mix:0 for MIX elements for checking against server implementation License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: I1bbd06d83f54fcde81ae0ed06dda90aec0ef1aeb
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-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-22Handle badly-formed labels catalogueThanos Doukoudakis
Updated the code to ignore labels that belong to a catalog item that is malformed and not added as a valid item. Test-Information: Added unit tests for badly formed catalog items and labels. Tested on Windows 10 (Qt 5.7.1) and Ubuntu 16.04 (Qt 5.5.1) Change-Id: I11fbd3b54faa3ee225a08a87ad8ed59977b7ff20
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-28Modified XMLBeautifier to handle split payloadsJoanna Hulboj
When receiving network data we were processing it in chunks. Sometimes one XML message got split across multiple chunks. XMLBeautifier was stateless and would create a new parser for every single chunk. This was causing multi-chunk messages to be truncated in the beautified output. The change I made in XMLBeautifier allows it to maintain the state. Test-Information: Tested unger Windows 10 and CentOS. Unit tests pass OK. Change-Id: Idad2a8e0248ed3cbe2b47a12718b909e56ac1279
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-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-18Improve string to HostAddress conversion APITobias Markmann
Previously HostAddress had a constructor which allowed initialisation via a std::string. This initialisation can fail and this is heavily used for checking whether a string is a valid IP address. This constructor is removed in this commit and replaced by a static method HostAddress::fromString, taking a string and returning an optional HostAddress. This clearly communicates that the conversion can fail. Test-Information: ./scons test=all passes on macOS 10.12.1. Change-Id: Idaafee6f84010ce541c55f267ac77ad6ac8f02b4
2016-10-05Add missing sensible asserts to testing and QtMainWindowTobias Markmann
Test-Information: Unit tests pass in ASAN-enabled build on macOS 10.12. Change-Id: I7a8dae7d06e5e1d3dc9391f9c9a342df384d90fc
2016-07-27Include missing cassertMichael Vetter
Test-Information: Build successfully on openSUSE Leap 41.2 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Change-Id: I9bd96e99e166ae02e1c2f1a8481d61c57edbbe71
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-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-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-30Change bare JID presence lookup code to ignore prioritiesTobias Markmann
Before presence handling code was handled by both, the ContactRosterItem in Swift and the PresenceOracle in Swiften. The ContactRosterItem also considered the presence priority for deciding what presence to show for a bare JID. With this code all full or bare JID presence requests are finally handled by the PresenceOracle. For bare JIDs it is looked up to a presence of one of the available resources of that JID regardless of the priorities. Test-Information: Adjusted tests according to above description and documentation in PresenceOracle. Change-Id: I972a4574f476cdf4d4b5593a035eb1c25ef2f8ba
2015-07-14Add tests for Parsers and Serializers.Tarun Gupta
Adds InBandRegistrationPayloadParserTest, IBBSerializerTest, IsodeIQDelegationSerializerTest. Adds UserTune Parser and Serializer. Adds UserLocation Parser and Serializer. License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details. Test-Information: All tests passes. Change-Id: Ida220574c33ca9ee6f2aa8a2f4fba4c68e3fec60
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-09Update DiscoInfo string for Jingle file-transfer to :4 and remove obsolete filesTobias Markmann
Test-Information: Unit tests run successful on OS X 10.9.5 Change-Id: I9df0c798723f79df85cfc7301aed0a7ad6309904
2015-02-03Added support for dstaddr attribute for SOCKS5 bytestream jingleTobias Markmann
transport method element, parser and serializer. Test-Information: Adjusted parser and serializer tests to cover this feature. Change-Id: I660ef8d292a0fe09f80c042bc6df417b0e7525b1
2015-02-03Update Jingle FT protocol to namespace verison ↵Tobias Markmann
urn:xmpp:jingle:apps:file-transfer:4. Test-Information: Adjusted unit tests and successfully build/run them on OS X 10.9.5. Change-Id: I63789e3fb351999f719157b54fa9fcf95f40fb07
2014-12-15Update Copyright in SwiftenKevin Smith
Change-Id: I94ab4bbb68c603fe872abeb8090575de042f5cb4
2014-12-14Add index element to ResultSetEdwin Mons
The index element was missing, added it in Swiften and Sluift. Change-Id: I709037fafcc5242c7c2e2fddb8469316c106d51a
2014-10-30Add node attribute to MAMQueryEdwin Mons
Added node to MAMQuery, the serializers, unit tests and the Sluift ElementConvertor. Test-Information: Unit tests pass on OS X 10.9 Sluift script querying a pubsub archive sent the right query. Change-Id: If8620104a11b402d7b51a6e9b34ccbe1b7e6d15a
2014-10-30Brining XEP-0313 (MAM) implementation in line with version 3.0.Tobias Markmann
Added support for <fin/> element, including serializer/parsers and unit tests for them. Added more unit tests based on XEP examples for existing parsers. Removed unneccesarry includes from existing MAM implementation. Test-Information: Existing and new unit tests pass successfully. Change-Id: I7e6bf85e0961d59801b452e4559cc1db9e9e6ed8
2014-05-12Add support for <before/> to ResultSetEdwin Mons
Change-Id: I46bd9f24fc887b180cee3c2aa75a6c9e1761473b
2014-04-24Added MAM parsers, serializers and tests.Richard Maudsley
Change-Id: I589a7c65664bfecfd0ac34240600dcccb4cbd40e
2013-08-31Move newline handling for Base64 to VCard parser. IBB's Base64 won't have ↵Tobias Markmann
newlines. Change-Id: I700949ea572421972b53539b83c4d04ff4d368f0 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-08-27PubSub implementation & Sluift refactoring.Remko Tronçon
Change-Id: I04ff7111b73565c00bff6db183451774a633344f
2013-08-23FormField element refactoring.Remko Tronçon
This should make FormField easier to use. Change-Id: Ia5eeedcdb673e2fe5e38fd23d5ab00970178bc44
2013-05-11File Transfer refactoring.Remko Tronçon
Allocate S5B server lazily. Forward forts lazily. Various state machine fixes. Temporarily disabling S5B proxy support. Change-Id: I3145e85a99b15a7e457306bbfbe9c0eb570191e4
2013-03-27Adding support for Blocking Command (XEP-0191) to Swift(-en).Tobias Markmann
Change-Id: I7c92518dc389474d520d4cf96f96a11459f73d26 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-03-04Adding support for idle time.Tobias Markmann
Change-Id: I1b14edb97a0c87431ec377b084362e9761caded9 License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2013-01-13Fix more warnings.Remko Tronçon
Fix sign conversion warnings. Removing heavy unnecessary includes. Change-Id: I992f43065498823098a875badb020c7c84fc4797
2013-01-12Adding basic vCard edit/show support.Tobias Markmann
Change-Id: I3104efcb9d56cfcaafda45eac2a51d2702f5245b License: This patch is BSD-licensed, see Documentation/Licenses/BSD-simplified.txt for details.
2012-12-04Add parsing for disco#info nodesKevin Smith
Change-Id: Icf9a526183650add0b5b42243fb1c78757c960c7
2012-06-20Parse node attribute in DiscoItemsParser and add DiscoItemsParser testJan Kaluza
Copyright (c) 2012 Jan Kaluza Licensed under the Simplified BSD license. See Documentation/Licenses/BSD-simplified.txt for more information.
2012-05-06Fixed unit test compilation failure.Remko Tronçon