1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-05 11:45:58 +01:00
Commit graph

2681 commits

Author SHA1 Message Date
Florian Schmaus
9e9241c0b9 Update PrivacyListManager
- to use CopyOnWriteArraySet for listeners
- do not wrap instance map in sync block (getInstanceFor() is already synchronized)
- use PacketTypeFilter instead of PacketExtensionFilter
- add removeListener(PrivacyListListener)
- rework getPrivacyLists
- don't set from attribute
- remove unused getUser()
2014-12-09 14:31:43 +01:00
Florian Schmaus
7bf3c3ea5d Move jxmppVersion and smackMinAndroidSdk to version.gradle 2014-12-09 13:54:12 +01:00
Florian Schmaus
05870e6a22 s/Unkown/Unknown/g 2014-12-09 13:23:01 +01:00
Florian Schmaus
187e158260 Improve OfflineMessages.getMessages()
poll the result before waiting for a message (with nextResult()), in
order to prevent waiting unnecessarily.

Add PacketCollector.pollResultOrThrow()
2014-12-07 23:43:26 +01:00
Florian Schmaus
5dd97a363c Introduce CapsVersionAndHash
Entity Capability versions are useless without the information which
hash algorithm was used to calculate those. Right now, only 'sha-1' is
used, but this may change in the feature. This commit makes the first
steps preparing for such a feature.

Also fixes a minor bug:

-        CAPS_CACHE.put(currentCapsVersion, discoverInfo);

currentCapsVersion is not a valid key for the cache, as it does cache
"node + '#' + ver" to disco infos.
2014-12-03 13:01:13 +01:00
Florian Schmaus
96f8bee78e Remove obsolete comment from CapsExtension 2014-12-02 18:23:16 +01:00
Florian Schmaus
3cbd845df2 s/intercepter/interceptor/ in comment of EntityCapsManager 2014-12-02 18:16:34 +01:00
Florian Schmaus
ba2df2a995 Add Message(String,String) 2014-12-01 14:40:58 +01:00
Florian Schmaus
15d60ea876 Smack 4.1.0-alpha7-SNAPSHOT 2014-11-30 11:28:45 +01:00
Florian Schmaus
ad0921e18c Smack 4.1.0-alpha6 2014-11-29 18:06:27 +01:00
Florian Schmaus
dd84d53bbc Don't use dynamic dependency for dnsjava 2014-11-29 18:06:26 +01:00
Florian Schmaus
bc4fdf1e57 Improve javadoc of PingManager.setPingInterval() 2014-11-29 14:15:05 +01:00
Florian Schmaus
252d5172e9 Return more specific types (e.g. Collection → List)
be generic as possible in what you accept, but more specific in what you
return.

Also tweak MultiuserChatManager methods a bit.
2014-11-29 13:41:49 +01:00
Florian Schmaus
9286a1decb Rework XMPP Error class design
Introduce AbstractError, change 'Conditions' to enums. Because of
AbstractError, it was necessary that PlainStreamElement and
TopLevelStreamElement becomes an interface. Thus the implementation of
TopLevelStreamElement.toString() had to be removed.

This adds

- policy-violation
- unexpected-request

to XMPPError.Condition, and removes the

- payment-required
- remote-server-error
- unexpected-condition
- request-timeout

Conditions

The file transfer code does now no longer throw XMPPErrorExceptions, but
SmackExceptions.

Fixes SMACK-608. Makes it possible to resolves SMACK-386.
2014-11-25 13:19:32 +01:00
Florian Schmaus
cc09192095 Smack 4.0.6
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iQF8BAABCgBmBQJUci2fXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
 ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4
 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI415IIH/j1eCvLIjNqNP6ytXdgomYY+
 j2i5KRHMv69La1JqtdmAeTeZfD13549s/66I5VUfegEfaADGUPr1NGrQKlb8lJBe
 YSqthMaQUybLBuCL9Lwg/3jE6s27GixRjW/Wip4ntac1wS2R3qD18lAxYIivsGJh
 gvyGHGoXvdct6teu9X0RtmyE/EOBfV63y1gVJG07Jv5/AJ2wCh9dIOD4jFuqvkoA
 cz2OfVJOIFletBV2psLxc0VVeqU9Lpba5TZuW1ZylY61z+X2rpt9BwCgBD35jTF9
 ztP2ytQY80+vZO6uP+Tl75QxdQd/e0O9oGnYbmMp1gfYQjgETaHUDxAL2uw4XNo=
 =7UY+
 -----END PGP SIGNATURE-----

Merge tag '4.0.6'

Smack 4.0.6

Conflicts:
	smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/caps/EntityCapsManager.java
	version.gradle
2014-11-23 20:05:44 +01:00
Florian Schmaus
721c3559d5 Smack 4.0.6 2014-11-23 19:55:08 +01:00
Florian Schmaus
a15245eb22 Add version.gradle 2014-11-23 19:54:36 +01:00
Florian Schmaus
255f7a1ad5 Add AbstractDebugger and JulDebugger
there was a lot of duplicate code in ConsoleDebugger and
AndroidDebugger, which resides now in AbstractDebugger. Those two and
the new JulDebugger subclass AbstractDebugger.
2014-11-21 18:36:26 +01:00
Florian Schmaus
c60f81f342 Fix typo in smack-android/build.gradle 2014-11-21 14:23:13 +01:00
Florian Schmaus
775f862bc1 Add XData(Layout)Manager
to register the features with ServiceDiscoveryManager for XEP-4 and
XEP-141.
2014-11-21 09:59:24 +01:00
Florian Schmaus
848d2dbf13 Change DataFormProvider to new style provider design
By using e.g. string-switch/case.
2014-11-21 09:38:50 +01:00
Florian Schmaus
bf557d498b Remove DataFormProvider from extension.providers
XEP-141 Data Forms are never used as stand alone packet extension, there
is no need to register the provider with the ProviderManager.

This makes the parse method of DataFormProvider static.
2014-11-20 23:52:01 +01:00
Anno
ff977825da Support for XEP-0141: Data Forms Layout.
Data Forms layouts are a part of Data Forms and implemented as
extensions, added to a Dataform. Fixes issue SMACK-612.
2014-11-20 23:25:26 +01:00
Florian Schmaus
6e569701b3 Add support for SASL X-OAUTH2 2014-11-20 18:50:33 +01:00
Florian Schmaus
646a4a6f90 Add support for SASL failure 'text' elements
- Also move toString() into TopLevelStreamElement.
- Fix SASLFailure toXML xmlnsAttribute(NAMESPACE)
- Improve SASLFailure parsing
- And introduce XmlUnitUtils
2014-11-19 09:57:39 +01:00
Florian Schmaus
59d3f55003 Set smWasEnableAtLeastOnce before sync point
to allow users to add stanza acknowledged listeners in
ConnectionListener.authenticated().
2014-11-17 23:59:00 +01:00
Florian Schmaus
5dd2bb5874 Log a warning if the server didn't report SASL mechanisms
and return the empty list.
2014-11-16 19:03:03 +01:00
Florian Schmaus
504b550ef2 Report not connected/authenticated when resumeable
Since c81cd34561 we can report not
connected/authenticated when the client is disconnected but the stream
could be resumed. The previous behavior caused some confusion among
the users.
2014-11-16 18:53:31 +01:00
Florian Schmaus
763f9c7c14 Implemented MD5 just like the SHA1 util 2014-11-15 09:46:39 +01:00
Florian Schmaus
0db76f4eb1 Throw a NotConnectedException on disconnect()
if not connected. For consistent behavior, so that it is always
thrown. Previously it may be thrown or not.
2014-11-15 09:46:39 +01:00
Florian Schmaus
301519a264 Fix END_DOCUMENT handling in XMPPTCPConnection
The 'break' statement in the END_DOCUMENT case should break the parsing
loop and not the switch/case within. Therefore we need to add a loop
label on break on that label.
2014-11-15 09:46:39 +01:00
Florian Schmaus
def8fea05f Add reply timeout to NoResponseException message 2014-11-15 09:46:38 +01:00
Florian Schmaus
c81cd34561 Apply builder pattern to ConnectionConfiguration
Introducing a clean split between the constant connection configuration
parameters, which are now all in ConnectionConfiguration and the dynamic
connection state (e.g. hostAddresses) which are now in
AbstractXMPPConnection.

Also removed all arguments of login() since the username, password,
resource and callback handler need now to be configured via
ConnectionConfiguration.

Also remove documentation/extensions/messageevents.md, as it's already
in documentation/legacy
2014-11-15 09:46:31 +01:00
Florian Schmaus
a848437284 Make digest() in EntityCapsManager synchronized
Fixes SMACK-617
2014-11-14 21:02:18 +01:00
Florian Schmaus
4000adb70c Fallback to host if DNS SRV lookup fails
Also fix javadoc for DNSUtil, _jabber SRV records are no longer tried.

Fixes SMACK-616.
2014-11-10 21:21:44 +01:00
Florian Schmaus
69f387b344 Don't use extending stanza addressing if not strictly necessary 2014-11-10 17:37:27 +01:00
Florian Schmaus
6168fca288 Message Evenents is in smack-legacy and documentation/legacy 2014-11-10 11:43:25 +01:00
Florian Schmaus
9e797c1b17 Enable PacketExtensions for IQs
This is actually only part one, i.e. with this commit if the user adds a
PacketExtension to an IQ it will be included in IQ.toXml(). Which was
previously only the case if the IQ subclass explicitly included packet
extensions.

The second part of the change is to change the IQ provider, so that
packet extensions are automatically parsed.

Cases where PacketExtensions are used for Message and IQ are slightly
changed. The IQ sublcass now only has a field with this
PacketExtension (see for example
bytestreams.ibb.packet.DataPacketExtension).

Also changed hoxt API: Removed unnecessary indirection and made the
API more Smack idiomatic.
2014-11-10 11:43:18 +01:00
Florian Schmaus
a9c798f3bb Remove empty statements 2014-11-09 18:31:07 +01:00
Florian Schmaus
77a4867450 Change Packet.getExtensionsXML()
Remove the synchronized, as getExtensions() is properly synchronized and will
return a copy.

Return XmlStringBuilder instead of CharSequence to take advantage of
fast XmlStringBuilder.append(XmlStringBuilder).

Mark the method as final, as it should not be overwritten.
2014-11-05 20:25:51 +01:00
Florian Schmaus
10643cce7c Use LinkedHashMap for PacketExtensions in Packet
to keep the order in which the elements are added.

Some XEPs define a Schema using 'xs:sequence' (see for example XEP-60 §
17.1), so the order the PacketExtensions are added should be the same
they are transformed to a XML String.
2014-11-05 17:58:32 +01:00
Florian Schmaus
b9167c5fe2 Add version.gradle 2014-11-04 14:43:41 +01:00
Florian Schmaus
775477dcc7 Smack 4.1.0-alpha6-SNAPSHOT 2014-11-02 12:21:15 +01:00
Florian Schmaus
aecb3cc861 Smack 4.1.0-alpha5 2014-11-02 12:13:21 +01:00
Florian Schmaus
fe3dcba9b2 Fix javadoc warnings and deprecated methods 2014-11-02 12:12:56 +01:00
Florian Schmaus
c351382c73 Require jxmpp 0.4.0 2014-11-02 11:24:28 +01:00
Florian Schmaus
fadef7d1bf Remove ServiceDiscoveryManager.getFeaturesList()
The method was redundant, getFeatures() did already return a copy of the
features. There is also no need to make it an unmodifiable List.
2014-11-01 13:16:22 +01:00
Florian Schmaus
ed313c9629 Add IntelliJ and Mac OS X files to gitignore 2014-11-01 12:52:19 +01:00
Florian Schmaus
5647cac39c Move is(Connected|Authenticated) and getUser()
into AbstractXMPPConnection.

Also remove wasAuthenticated field from XMPPBOSHConnection, it is
already in AbstractXMPPConnection.
2014-11-01 12:42:53 +01:00
Florian Schmaus
6fec813ec0 Rework DiscoverInfo
Make Feature and Identity immutable and allow fast lookup of those two
in DiscoverInfo.
2014-10-31 23:44:04 +01:00