1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-04 23:55:58 +01:00
Commit graph

250 commits

Author SHA1 Message Date
Florian Schmaus
062e9ee415 Fix javadoc of pubsub.Item 2015-04-12 18:13:19 +02:00
Florian Schmaus
9ac3633612 javadoc: s/packet/stanza/ 2015-03-24 17:15:50 +01:00
Florian Schmaus
164b7c6690 Set localNodeVer after currentCapsVersion is set 2015-03-24 12:05:56 +01:00
Florian Schmaus
49c2c35609 Synchronize SDM methods that change the state
Other Managers, e.g. EntityCapsManager, may be notified if e.g. a
feature is added or removed. While they are notified, the state of SDM
must be consistent, therefore synchronize SDM methods that modify the
state.
2015-03-24 11:59:35 +01:00
Florian Schmaus
130a8216d1 EntityCapsManager must not use CapsVersionAndHash.toString()
as it would return Object.toString(). Instead the entity version string
was required. Use getLocalNodeVer() instead.
2015-03-24 11:59:31 +01:00
Florian Schmaus
451eb4c826 Add missing break statements 2015-03-23 09:52:01 +01:00
Florian Schmaus
5e86db4f80 Substitute 'packet' with 'stanza(/packet)' in javadoc 2015-03-21 09:36:28 +01:00
Florian Schmaus
f6ba363843 Always include role in MUCItem if it's set
As not including "role='none'" when kicking a user will result in an
XMPPErrorException. Also there appears to be nothing in XEP-45 which
says "if role is not set, then it defaults to 'none'".
2015-03-11 12:36:15 +01:00
Florian Schmaus
e85c1881d7 Add TypedCloneable 2015-03-10 22:50:48 +01:00
Florian Schmaus
d389b4db20 Fix NPE in EntityCapsManager
persistentCache may be null.
2015-03-10 13:22:48 +01:00
Florian Schmaus
a95d25544c Improve EmbeddedPacketExtension javadoc
parsePacketExtension is deprecated, use parseExtensionElement instead.
2015-03-07 21:12:42 +01:00
Florian Schmaus
48aae12ba3 Remove XMPPException from MultiUserChat.sendMessage
as it's not actually thrown.
2015-03-07 20:52:44 +01:00
Florian Schmaus
2db5ebb4b7 Fix BytestreamsProvider: Mode is optional
and defaults to TCP.
2015-03-07 20:51:23 +01:00
Florian Schmaus
ed4fa3390f Add XMPPConnection.sendStanza(Stanza)
and deprecate sendPacket().
2015-03-04 21:46:44 +01:00
Florian Schmaus
183af99ffb DeliveryReceipt helper methods take Message as argument
Since it makes only sense for messages to have delivery receipts.
2015-03-04 21:46:40 +01:00
Florian Schmaus
b813e3aa9e Return delivery receipts with the same type as the request
Message delivery receipts now use the same message type as the
corresponding message with the delivery receipt request.
2015-03-04 15:26:20 +01:00
Florian Schmaus
85a9b07230 Fix MUC participantStatusListeners
Thanks to Anno van Vliet for reporting the issue and proposing the fix.
2015-03-03 17:11:42 +01:00
Florian Schmaus
50cf7f42f3 DataListener is no longer a StanzaListener
it's just an IqRequestHandler. So remove the previous code related to it
being a stanza listener.
2015-03-02 16:17:52 +01:00
Anno van Vliet
63fabf78ed Fixed Data IQ packet receiving
Data packets where not received by the InBandByteStream due to a missing
IQRequestHandler

Conflicts:
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/DataListener.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamManager.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java
2015-03-02 16:17:52 +01:00
Florian Schmaus
dde0cfd7f6 Fix incoming file transfers
With bb8dcc9874 the concept if IQ request
handlers was introduced in Smack. This doesn't allow packet/stanza
collectors/listeners to filter for incoming IQ requests. Unfortunately
the file transfer code relied on this being able, so it broke with the
change.

There were two places where the file transfer code was listening for
incoming IQ requests:
- InitationListener(s)
- Negotiator(s)

With this change, we let the InitiationListener signal the existence of
an incoming initation request, send by an IQ of type 'set', using the
newly created EventManager utility.

The negotiator waits for those events to arrive and proceedes as it would
have done when the packet collector was used.
2015-03-02 15:56:26 +01:00
Florian Schmaus
75ec271c6c Rename PacketListener to StanzaListener
and add the PacketListener as deprecated interface.
2015-03-02 15:49:56 +01:00
Florian Schmaus
d4a6d8e653 Rename PacketFilter (and implementing classes) and PacketExtension
to StanzaFilter and ExtensionElement.
2015-02-28 13:49:38 +01:00
Florian Schmaus
2250ac20ed Make VCard XML null value safe
The user is able to set (most) values to null. We must take that into
consideration when transforming the VCard to XML.
2015-02-26 08:56:08 +01:00
Florian Schmaus
404b90054b Use Executors.newSingleThreadScheduledExecutor
and remove the calls to setMaximumPoolSize() and steKeepAliveTime()
since they are ineffective on Android.
2015-02-25 16:17:09 +01:00
Florian Schmaus
9006ccf291 Fix VCardManager.saveVCard(VCard)
In case the users tries to save a VCard he previously retrieved via
loadVCard() this would previously fail, as the 'to' address is set to
the clients full JID.
2015-02-23 22:39:40 +01:00
Florian Schmaus
29bda59617 Log warning if account creation over insecure connection
Prepare for SMACK-644.
2015-02-21 16:57:16 +01:00
Florian Schmaus
19f96d2c40 Avoid duplicate provider lookup in ItemProvider
This also fixes a programming error, since it could be possible that the
provider was removed between the lookup and the usage.
2015-02-20 12:27:54 +01:00
Florian Schmaus
7ebea7ce94 Add StanzaIdFilter, deprecate PacketIDFilter 2015-02-19 16:07:42 +01:00
Florian Schmaus
887c6114b7 Add filter information to NoResponseException
in order to aid debugging errors. This made it necessary to override
'toString()' for all filters in Smack.
2015-02-19 12:14:16 +01:00
Florian Schmaus
33cf205bdc Use Objects.requireNonNull() in BytestreamSIDFilter 2015-02-18 10:06:12 +01:00
Florian Schmaus
57c1b57b7c s/ a XMPP/ an XMPP/ 2015-02-12 12:13:19 +01:00
Chris Deering
0b4072ad66 Re-implementing the vCard provider using a pull parser. Extended unit tests. 2015-02-09 07:35:15 +01:00
Florian Schmaus
4698805a34 Rename 'Packet' class to 'Stanza'
Smack still uses the term 'Packet' in some places. This is just the
first step towards using correct XMPP terms in Smack.
2015-02-06 09:34:51 +01:00
Florian Schmaus
86ea027301 Add StringUtils.requireNotNullOrEmpty and Objects.requireNonNull
and use this in a few places.
2015-01-26 20:47:09 +01:00
Florian Schmaus
2cba6a68eb Fix DataFormProvider parsing 'fixed' FormFields
b71039660b made FormField.setType(Type)
throw an illegal argument exception if type is fixed, but the
DataFormProvider was not changed, so it still would call
setType(Type.fixed).

Change DataFormProvider so that the non-argument constructer of
FormField is used when type == fixed.
2015-01-26 07:54:12 +01:00
Florian Schmaus
d5b8647d9d Create smack-im subproject for XMPP-IM
Move Roster and Chat(Manager) code into their own packages within the
new smack-im subproject.

Apply Manager pattern to Roster.

Fixes SMACK-637.
2015-01-26 07:54:05 +01:00
Florian Schmaus
b265d2d2a2 Add XDataManager.isSupported(String)
also make FormField and Option implement NamedElement and some other
minor changes to data form API.
2015-01-21 09:50:50 +01:00
Florian Schmaus
c5db012fc8 Improve privacy parsing and API. Add NumberUtil
Make 'order' an long

Parse fall-through case's child elements (message, iq, presence-in,
presence-out)

Remove

privacy.addExtension(new DefaultPacketExtension(parser.getName(), parser.getNamespace()));

at the beginning of PrivacyProvider. Was there since day one for an
unknown reason.
2015-01-21 09:50:44 +01:00
Florian Schmaus
1bc3e10cff Improve Message Delivery Receipt (XEP-184) API
add a new AutoReceiptMode enum that specifies how delivery receipt
requests are handled. Default is to send receipts if the requstor is
subscribed to the user's presence.

Also make sure that messages contain an id if a receipt request is
added to it.
2015-01-20 12:43:11 +01:00
Florian Schmaus
8409dddffd Add PacketUtil.extensionElementFrom()
and deprecate extensionElementfromCollection()
2015-01-19 08:41:21 +01:00
Florian Schmaus
6bf9498904 Add note about getMultiUserChat in MUC's javadoc 2015-01-19 08:38:11 +01:00
Florian Schmaus
c36ffd18c2 Improve VCard API
move API out of VCard into VCardManager. Mark old methods as deprecated.
2015-01-17 11:45:02 +01:00
Florian Schmaus
2e23a6f150 Allows PacketCollector's to cancel each other
This is useful for cases where a result set is requested, as it's the
case in XEP-13 and XEP-313.

Also adds
XMPPConnection.createPacketCollector(PacketCollector.Configuration).
2015-01-16 20:55:32 +01:00
Florian Schmaus
eb6b8df7c5 Add MultiUserChat.requestVoice() 2015-01-13 13:31:45 +01:00
Florian Schmaus
b0cecee710 Rename IQ.ELEMENT to IQ.IQ_ELEMENT
to avoid confusion between the IQ element 'iq' and the IQs child
element. ELEMENT defined in an IQ sublcass should contain the *child*
element.

Add element to StreamInitation and fix FileTransferManager which still
used a packet listener instead of an IQ request handler to handle
incoming stream initiation requests.
2015-01-11 21:54:46 +01:00
Florian Schmaus
f1a1215f35 Make DataForm type an enum 2015-01-10 20:10:46 +01:00
Florian Schmaus
98c69f6895 Add ServiceDiscoveryManager.serverSupportsFeature() 2015-01-10 19:36:33 +01:00
Florian Schmaus
b71039660b Improve data form API
Add

DataForm.getField(String)
DataForm.getHiddenFormTypeField()
2015-01-10 18:05:05 +01:00
Florian Schmaus
e4bc6c2f37 Add support for 'ofrom' type (XEP-33)
of Extended Stanza Addressing.

Fixes SMACK-626.
2015-01-10 11:33:59 +01:00
Florian Schmaus
50c7d0bc2c Don't log whole exceptions in VCardProvider
when trying to harden the parser.
2015-01-10 11:26:15 +01:00