Commit Graph

2262 Commits

Author SHA1 Message Date
Florian Schmaus 6334733dae Add LICENSE 2014-12-27 13:36:27 +01:00
Florian Schmaus 2b664ee88b Improve PingManager javadoc 2014-12-26 21:29:46 +01:00
Florian Schmaus b17ecb4555 Use standard manager pattern in PingManager
- No need to use a synchronized map, as the getInstanceFor method is
  synchronized
- Put the PingManager in the map where it's created and not in the
  constructor
2014-12-26 21:25:30 +01:00
Florian Schmaus 0293ca2bcd Add MultiUserChat.createOrJoin(String,String,DiscussionHistory,long) 2014-12-26 18:22:06 +01:00
Florian Schmaus 7874daa59b Use switch-case for Presence.getType() 2014-12-22 16:17:18 +01:00
Florian Schmaus 469548f53a Use '==' in (IQ|Message|Presence)TypeFilter
instead of 'equals()'
2014-12-22 16:17:17 +01:00
Florian Schmaus a4e3833468 Add PresenceTypeFilter 2014-12-22 13:53:11 +01:00
Florian Schmaus 71029f0a45 Fix XEP URLs in documentation/extensions/index.md
Thanks to Oliver Hausler for reporting.
2014-12-21 10:36:18 +01:00
Florian Schmaus efb9a5f517 Improve logging of finalize() methods 2014-12-19 12:55:31 +01:00
Florian Schmaus 18ac83cf8c Move SmackExecutorThreadFactory out of
AbstractXMPPConnection. And use it in PingManager.
2014-12-19 12:53:16 +01:00
Florian Schmaus eb48d02673 Make compressionMethod final in XMPPInputOutputStream 2014-12-19 11:15:01 +01:00
Florian Schmaus f4c7e2e086 Add smack-tcp to gettingstarted.md 2014-12-19 11:14:34 +01:00
Florian Schmaus 4b77d00e91 Re-add the login(String, String, String) method 2014-12-18 14:07:54 +01:00
Florian Schmaus d081055312 Use cached executor in AbstractXMPPConnection 2014-12-18 10:15:38 +01:00
Florian Schmaus a87227c531 Rename ConnectionConfigurationBuilder to Builder 2014-12-18 10:15:35 +01:00
Florian Schmaus 31c53f094c Use mathematical range syntax for dependencies
In dd84d53bbc the usage of dynamic
dependencies was removed because OSS Sonatype would not longer allow
them, i.e. the '1.2.+' notation, on release artifacts. But they allow
the mathematical range notation '(1.2,1.3]', therefore we use this now.
2014-12-17 16:23:24 +01:00
Florian Schmaus add4ff5b5a Fix PubSub namespaces
Those were broken since 9e797c1b17 as they
always used the basic PubSub namespace, i.e. without a fragment. Which
resulted in e.g. delete requests look like

<iq to="pubsub.ec-xmpp" id="2GAeW-75" type="set">
  <pubsub xmlns="http://jabber.org/protocol/pubsub">
    <delete node="2e92d38c-9e90-47f6-8e26-330d25ebe96b"/>
  </pubsub>
</iq>

when the namespace should be in fact

http://jabber.org/protocol/pubsub#owner
2014-12-17 13:34:49 +01:00
Florian Schmaus d0341c1d94 Add XMPPTCPConnection.streamWasResumed() 2014-12-17 10:34:16 +01:00
Florian Schmaus 84ffa265ce Rework SynchronizationPoint
- synchronize wasSuccessful() and requestSent()
- Add comment
- Clarify log message
2014-12-17 10:29:48 +01:00
Florian Schmaus ff2c71e042 VCardProvider should use a safe parser
Where e.g. entity reference expansion is disbled. Note that this affects
only the VCard provider, as it's the only provider in Smack that uses
SAX's DocumentBuilder.

Fixes SMACK-620
2014-12-16 23:13:24 +01:00
Florian Schmaus b5c9bb2611 Change jxmpp version to 0.4.1-alpha2-SNAPSHOT
Mostly because of 738276e1aca093da16ea160462bdda7523a26a14 in jxmpp,
which fixes fractional seconds parsing.

Which made also the slight change in DelayInformationTest necessary.
2014-12-12 11:50:33 +01:00
Jae Jang d5c7a2cad3 Switch right bracket to left bracket on condition start tag.
StreamError toXML should output <..><cond>..</cond>,
not <..>>cond>..</cond>.
2014-12-10 23:15:14 +01:00
Florian Schmaus b3b42f3a9b Fix nodeVer generation for local caps information
This was broken with 5dd97a363c, where
currentCapsVersion was changed from String to CapsVersionAndHash.
2014-12-10 15:42:31 +01:00
Florian Schmaus 4c2d5d797a Ensure that the hash value is put in lowercase on the wire 2014-12-10 14:19:01 +01:00
Florian Schmaus 8bfc887f63 Prefer AndroidDebugger over JulDebugger
since most JUL implementations do not print log messages of level
FINE (or lower) per default. Therefore the debugging output is not seen
by the user who wants to debug and a second step is required to
configure JUL to also log FINE or lower log messages to the console.
2014-12-10 14:00:36 +01:00
Florian Schmaus 7640414e8d Set conditionText to null if it's the empty string
This fixes e.g. IllegalArgumentException "'conflict' can not contain a
condition text", when receiving elements like

<stream:error>
  <conflict xmlns='urn:ietf:params:xml:ns:xmpp-streams'></conflict>
  <text xml:lang='' xmlns='urn:ietf:params:xml:ns:xmpp-streams'>
    Replaced by new connection
  </text>
</sream:error>

(ejabberd does this)
2014-12-10 12:36:35 +01:00
Florian Schmaus c89d06861b Use switch-case in PacketParserUtils.parseContentDepthWithoutRoundtrip() 2014-12-10 12:28:22 +01:00
Florian Schmaus 77f0fdc156 Add (IQ|PacketExtension)IntrospectionProvider
This simplifies code as there is no longer a distinction between
"normal" providers and introspection providers in ProviderManager
necessary.

It's also easier to get an idea where introspection is used for parsing.
2014-12-10 11:09:52 +01:00
Daniele Ricci 00f5008794 Consider also unavailable presences when dealing with the roster
This is needed for checking <delay/> extensions in unavailable
presence stanzas.

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
2014-12-09 21:30:28 +01:00
Florian Schmaus c9bf420b37 Make Filters fields final and use StringUtils 2014-12-09 14:32:09 +01:00
Florian Schmaus 1c08d1c594 Remove PacketExtensionFilter(Class) constructor
as it's potential error prone, because most PacketExtension's don't
have a non-argument constructor required for this to work.

Also add some javadoc.
2014-12-09 14:32:09 +01:00
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