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

2075 commits

Author SHA1 Message Date
Florian Schmaus
1b2231be0b Add PacketExtensionFilter(PacketExtension) constructor
and PacketExtensionFilter(Class<? extends PacketExtension).
2014-06-10 18:52:46 +02:00
Florian Schmaus
b083449cc3 Throw more exceptions when parsing Presences
when parsing core elements of Presences.
2014-06-10 18:42:17 +02:00
Florian Schmaus
009057e2e2 Streamline String to Enum transformation
for the core stanza Enums.
2014-06-10 18:35:24 +02:00
Florian Schmaus
0fe263106a Fix MessageTypeFilter.ERROR
s/Type.headline/Type.error/
2014-06-10 17:59:13 +02:00
Florian Schmaus
3e18a23e47 Merge branch '4.0'
Conflicts:
	build.gradle
	smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java
2014-06-07 12:24:51 +02:00
Florian Schmaus
120be69a30 Smack 4.0.0 2014-06-07 12:18:59 +02:00
Júlio Cesar Bueno Cotta
9be0c480e3 Change IQ.Type to enum 2014-06-06 21:10:13 -03:00
Florian Schmaus
91fa7a8219 Add missing mechanism-too-weak SASL Error 2014-06-05 20:52:10 +02:00
Florian Schmaus
36a86f2dfc Improve getMultipleRecipientServiceAddress
and MultipleRecipient (XEP-33) related code in general (e.g. use
constants where possible).

For getMultipleRecipientServiceAddress() this means that
- the "synchronized (services)" block is removed
- ServiceDiscoveryManager is only retrieved once
2014-06-05 15:38:27 +02:00
Florian Schmaus
0680553ef7 Make getMulitipleRecipientServiceAddress() more robust
the method should not throw if one of server's items fail to query.
2014-06-05 15:16:46 +02:00
Júlio Cesar Bueno Cotta
944ac37fc3 Remove getConfiguration() from XMPPConnection
interface definition.
2014-06-05 11:42:26 +02:00
Florian Schmaus
445d175a2e Use fixed versions instead of dynamic dependencies 2014-06-03 13:10:43 +02:00
Florian Schmaus
c7db63612c Remove javadoc references to code now in JXMPP 2014-06-02 16:59:45 +02:00
Florian Schmaus
8bf30b960c Don't remove the MUC listeners after a disconnect
keep state of XMPPConnection between disconnects.

Fixes SMACK-571
2014-06-02 16:58:53 +02:00
Florian Schmaus
12b9e9d507 Add AndroidDebugger as possible debugger
Create AbstractXMPPConnection.DEBUGGERS with possible debugger classes.
2014-06-01 12:24:50 +02:00
Florian Schmaus
f67d655fe7 Use jxmpp-core (0.1.0-alpha1-SNAPSHOT)
fixes also SMACK-570, since jxmpp-core's XmppStringUtil contains the fix
for SMACK-570.
2014-06-01 12:24:30 +02:00
Florian Schmaus
f05f6bf901 Fix lost sharedManfiest configuration in build.xml
The configuration of ext.sharedManifest was no longer included (since
39c837190d).
2014-05-30 22:35:18 +02:00
Florian Schmaus
8977f5b3f0 Improve TLS/SSL support
Add TLSUtils. Make it possible to set the enabled SSL/TLS protocols and
ciphers and provide sane error reporting.
2014-05-30 12:28:19 +02:00
Florian Schmaus
8cc2a76e7f Refactor Message Event (XEP-22) code to current design 2014-05-29 21:04:56 +02:00
Florian Schmaus
c3ae73472e Do not filter groupchat messages without body
for MessageListeners in MultiUserChat

SMACK-568
2014-05-29 17:49:52 +02:00
Florian Schmaus
e9b47d4164 Smack 4.0.0-rc3-SNAPSHOT 2014-05-29 17:49:52 +02:00
Florian Schmaus
2a091debc1 Add FlexiblePacketTypeFilter
and make constructors of MessageTypeFilter and IQTypeFilter
private, because we now provide constants instead.
2014-05-29 17:45:32 +02:00
Florian Schmaus
c606530e22 Add .travis.yml 2014-05-28 08:18:45 +02:00
Florian Schmaus
ca4fbcf2b0 Make PacketReader and PacketWriter nested classes
of XMPPTCPConnection.
2014-05-28 08:18:45 +02:00
Florian Schmaus
6fd4bb850e Remove schedule() from XMPPConnection interface
The idea that we abstract the scheduling of tasks on Android over this
method turned out to be unnecessary. schedule() was also not really part
of the *public* XMPPConnection API, so it's good that it's gone.
2014-05-28 08:18:45 +02:00
Florian Schmaus
3647a7fce5 Improve parsing. Add method for de-serializing Strings
Move some duplicate code from XMPP(TCP|BOSH)Connection to
PacketParserUtils. Remove TestUtils as the method now part of Smack's
public API in PacketParserUtils.
2014-05-28 08:18:44 +02:00
Florian Schmaus
beecb8a675 Make XMPPConnection an interface
create AbstractXMPPConnection.
2014-05-28 08:18:41 +02:00
Florian Schmaus
6dd180e9d3 Improve Entity Capabilities code
Most importantly, rename reload() method of persistent cache to
"DiscoverInfo lookup(String nodeVer)" and lazily load the data from the
persistent cache to the memory cache.
2014-05-25 17:56:32 +02:00
Florian Schmaus
47d9146c76 Update Maven repositories in README.md 2014-05-25 11:01:52 +02:00
Florian Schmaus
f69e81d7ea Smack 4.1.0-alpha1-SNAPSHOT 2014-05-24 16:02:28 +02:00
Florian Schmaus
183ecb5542 Smack 4.0.0-rc2 2014-05-24 11:45:02 +02:00
Florian Schmaus
d790db5729 Don't throw an IOException if IBBStream got closed by the remote
Smack should not throw an IOException in case a stream got closed by
the remote peer and the user is trying to read() from the stream. This
commit fixes that, by making Smack return '-1' if the stream got
closed by the remote. An IOException will only be thrown if the user
tries to read from a stream that got already closed by *himself*.

SMACK-468
2014-05-23 13:13:24 +02:00
Florian Schmaus
a19181ce04 Make XMPPConnection.schedule() protected
This method was never intended to be part of the public API. It's also
critical that the given Runnables complete within a reasonable
time frame so that they don't block following ones.
2014-05-23 13:13:24 +02:00
Florian Schmaus
1302dbe9cb Re-use executorService as listenerExecutor 2014-05-23 13:13:21 +02:00
Florian Schmaus
f4f7eca7ca Shutdown listenerExecutor to prevent the Thread from leaking
listenerExecutor needs to get shutdown once it is no longer required.

SMACK-567
2014-05-21 21:45:15 +02:00
Florian Schmaus
f1f7713513 Introduced unchangedEntries in Roster logic
If the connection has been reconnected, then we will receive entries
that have been unchanged since the last time we received a roster
result. Without this change, those entries ended up in 'toDelete' and
got deleted.

This change also inlines some roster methods.
2014-05-17 10:50:01 +02:00
Florian Schmaus
9a61c75ab0 Make Roster.hasValidSubscriptionType() static 2014-05-17 09:45:20 +02:00
Florian Schmaus
c80a4044e6 Replace deprecated Z(Input|Output)Stream
Thanks to Волков Вячеслав (Vyacheslav Volkov) for the hint.
2014-05-15 16:44:34 +02:00
Florian Schmaus
4c76f2652d Reworked OSGi support of Smack (SMACK-343)
Because of OSGi, no subproject of Smack (which is the same as a OSGi
bundle) must export a package that is already exported by another
subproject.

Therefore it was necessary to move the TCP and BOSH code into their own
packages: org.jivesoftware.smack.(tcp|bosh).

OSGi classloader restrictions also made it necessary to create a
Declarative Service for smack-extensions, smack-experimental and
smack-lagacy (i.e. smack subprojects which should be initialized), in
order to initialize them accordingly, as smack-core is, when used in a
OSGi environment, unable to load and initialize classes from other smack
bundles. OSGi's "Service Component Runtime" (SCR) will now take care of
running the initialization code of the particular Smack bundle by
activating its Declarative Service.

That is also the reason why most initialization related method now have an
additional classloader argument.

Note that due the refactoring, some ugly changes in XMPPTCPConnection
and its PacketReader and PacketWriter where necessary.
2014-05-15 16:09:37 +02:00
Jared DiCioccio
541b8b3798 Update Presence.java
No code changes. Proofread API docs for Presence.java
Fixed grammar / unclear sentences in some javadocs.
Changed some nouns to be more consistent with API terminology.
Fixed some typos.
2014-05-12 19:25:23 +02:00
Florian Schmaus
98333e362d Add 'null' check to parseContentDepth
Does not fix the actual problem, but at least prevents resource
allocation until OOM.
2014-05-11 10:18:49 +02:00
Florian Schmaus
e0b8577930 Make IQ attributes final in parseIQ() 2014-05-11 10:15:14 +02:00
Florian Schmaus
de6eb4b21c Tell Gradle to download javadoc
when creating the classpath for eclipse.
2014-05-11 09:38:13 +02:00
Florian Schmaus
90ea9ba2fc Make ProviderManager static
also remove initialize() from ProviderFileLoader, by simply putting the
code into the constructor.
2014-05-11 09:27:41 +02:00
Florian Schmaus
0111be1a04 Fix description of subprojects POMs file
by adding evaluationDependsOnChildren() on the root project. Thanks to
Peter Niederwieser for the hint.
2014-05-10 21:00:40 +02:00
Florian Schmaus
82654cd15e Use StringBuilder in parseContentDepth()
instead of StringBuffer, which comes with unnecessary synchronization
overhead.
2014-05-10 10:53:03 +02:00
Florian Schmaus
5618da4e23 Add parseContentDepthTest() 2014-05-10 10:51:45 +02:00
Florian Schmaus
ecccfe61af Reset usingTLS in XMPPTCPConnection.shutdown() 2014-05-10 10:26:48 +02:00
Florian Schmaus
7a5533c823 Fix NPE in DiscoverInfo.Identities XmlStringBuilder
The 'name' attribute of an service discovery identity is
optional. Thanks to Jens Offenbach for reporting.
2014-05-07 12:46:24 +02:00
Florian Schmaus
07d6b9203c Synchronize PacketWriter shutdown
try the best to send the queue elements and the closing stream element.
2014-05-06 07:47:57 +02:00