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

119 commits

Author SHA1 Message Date
Florian Schmaus
36744ea0d1 Remove MUC DeafOccupantIntercepter
as it's a old (likely unused) Jive (Wildfire) proprietary extension.
2014-10-09 23:12:22 +02:00
Florian Schmaus
452b2aca0f Add 'PacketParserUtils.addPacketextension()' 2014-10-08 16:01:19 +02:00
Florian Schmaus
6980c8e63d Rework Smack Provider design
this is the first stop towards fixing "SMACK-65: parsing should look for
depth", by providing the initial parsing depth to the provider. Some
methods (.e.g parseMessage) now use the depth as abort condition,
instead of a unclean String equals check.

parseIQ() and parseExtension() where both renamed to parse.

This also restricts the Exceptions thrown by the parse method, to just
XmlPullParserException, IOException and SmackException (not really a big
victory, but nevertheless a slight improvement).

StreamFeatureProvider is now gone, we simply use PacketExtensionProvider
for stream features.
2014-10-08 16:01:14 +02:00
Florian Schmaus
387be5bded Add DeliveryReceiptRequest.addTo(Message) 2014-10-07 21:50:32 +02:00
Florian Schmaus
19ee9f016b Use CopyOnWriteArraySet in DeliveryReceiptManager 2014-10-05 16:27:52 +02:00
Florian Schmaus
8bf74c6e92 Add Packet to onReceiptReceived parameters
in ReceiptReceivedListener. SMACK-582
2014-10-05 12:56:32 +02:00
Florian Schmaus
1e803ab29d Use from(Packet) instead of getFrom(Packet) in DeliveryReceiptManager 2014-10-05 12:52:19 +02:00
Florian Schmaus
5f06234149 Use CopyOnWriteArraySet in InvitationsMonitor 2014-10-05 12:46:51 +02:00
Florian Schmaus
f7517ab6cc Apply Manager pattern to InvitationsMonitor
Don't remove listeners on disconnect (SMACK-571).
2014-10-05 12:04:46 +02:00
Florian Schmaus
a0fe337bcd Use Collections.emptyList() in MultiUserChat 2014-10-05 12:04:46 +02:00
Florian Schmaus
8529d1463f Use from(Packet) instead of getFrom(Packet) in MultiUserChat 2014-10-05 12:04:45 +02:00
Florian Schmaus
414db1ebbe Add PingManager.pingMyServer(boolean,long) 2014-09-30 13:09:09 +02:00
Florian Schmaus
7521ef951a Ensure that connection is authenticated in PingManager 2014-09-29 17:04:18 +02:00
Florian Schmaus
50e068b6a7 Merge branch '4.0'
Conflicts:
	build.gradle
2014-09-29 14:00:48 +02:00
Florian Schmaus
039fac7ab7 Fix PingManager.ping(String,long)
ignoring timeout. SMACK-609
2014-09-29 13:52:13 +02:00
Abmar Barros
ae385e6b44 Enabling additional and returned extensions in getItems() 2014-09-26 16:56:08 +02:00
Florian Schmaus
13f4f36995 Use non-deprecated method in DelayInformationManager 2014-09-24 19:23:49 +02:00
Florian Schmaus
b945e591ff Add MessageWithBodies and DelayedStanza Filter 2014-09-24 19:23:49 +02:00
Florian Schmaus
d8c77de785 Remove duplicate code in pubusb LeafNode
Make fields of GetItemsRequest and NodeExtension final and use
XmlStringBuilder.
2014-09-21 20:49:11 +02:00
Florian Schmaus
bd0fb973c8 Add new RSMSet constructors
and fix typo in RSMSetManager
2014-09-20 16:54:36 +02:00
Florian Schmaus
58e430af42 PacketExtension.from(Packet), deprecate getFrom()
add 'from(Packet)' to DataForm
2014-09-16 22:22:25 +02:00
Florian Schmaus
f0651bae2d Remove unnecessary check for non-null in PubSubProvider
addExtension() does that already.
2014-09-13 12:33:51 +02:00
Florian Schmaus
2dc93d7639 Add support for XEP-0059: Result Set Management
SMACK-581
2014-09-13 12:28:18 +02:00
Florian Schmaus
f2718c2d76 Remove smack.util.Cache
and use the Cache from jxmpp-util-cache instead.
2014-09-13 00:38:11 +02:00
Florian Schmaus
9016120d71 Add support for (custom) data form extensions
Fixes SMACK-605
2014-09-12 13:43:04 +02:00
Florian Schmaus
3a37b71e19 Use XmlStringBuilder in AdHocCommandData
also remove 'lang' attribute, since it belongs into IQ, see XEP-50 3.7:

"The requester SHOULD provide its locale information using the "xml:lang"
attribute on either the <iq/> (RECOMMENDED) or <command/> element."
2014-09-12 11:22:49 +02:00
Florian Schmaus
46a4402a69 Add StreamFeatureProvider
so that AccountManager and the CapsExtension can be moved to
smack-extensions, where they belong.
2014-09-11 23:58:07 +02:00
Florian Schmaus
fc51f3df48 Add support for XEP-0198: Stream Management
- De-duplicate code by moving it into AbstractXMPPConnection
- Introduce TopLevelStreamElement as superclass for all XMPP stream elements.
- Add SynchronizationPoint, ParserUtils
- Add ParserUtils

Fixes SMACK-333 and SMACK-521
2014-09-11 09:49:16 +02:00
Florian Schmaus
d8db43e4c5 Improve FileTransfer.writeToStream()
let's use the standard idiom for Input- to OutputStream transfers. This
also avoids an initial no-op on the first write, when the count is '0'.

Also fixes a bug when the size of file/stream transferred is '0' (which
is perfectly fine and possible).
2014-09-09 21:06:12 +02:00
Florian Schmaus
090f7cfc49 Add PingManager.pingServerIfNecessary()
which is basically the body of the pingServerRunnable available as
public part of the API. The intention is to allow 3rd party
components (e.g. Android's AlarmManager) to trigger the code.
2014-09-08 10:09:05 +02:00
Florian Schmaus
184604bba2 Init Base64 test encoder for unit-tests
The previous approach with

testCompile project("smack-java7")

was flawed. Instead we setup a Base64 encoder especially for the unit
tests now.
2014-09-07 17:22:55 +02:00
Florian Schmaus
34bc13bec7 Merge branch '4.0'
Conflicts:
	build.gradle
	smack-core/src/main/java/org/jivesoftware/smack/PacketCollector.java
	smack-core/src/main/java/org/jivesoftware/smack/packet/XMPPError.java
	smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
	smack-core/src/main/java/org/jivesoftware/smack/util/StringUtils.java
	smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/provider/ItemProvider.java
2014-09-05 22:11:35 +02:00
Florian Schmaus
28c3554085 Use switch/case in MUCUserProvider 2014-09-05 11:46:44 +02:00
Florian Schmaus
afd7c67bf9 Add support for multiple status codes to MUCUser
Fixes SMACK-604
2014-09-05 11:45:06 +02:00
Florian Schmaus
5d4aa76d19 Create smack.util.stringencoder for Base64, Base32,…
Use Android's Base64 implementation when on Android, otherwise, when on
Java7, use the existing one.
2014-09-04 11:07:55 +02:00
Florian Schmaus
b5b134f569 Process all XML namespaces in PubSub ItemProvider
Fixes SMACK-601
2014-08-29 14:59:54 +02:00
Florian Schmaus
e8471baccb Add ChatState.getChatState() 2014-08-28 19:00:01 +02:00
Florian Schmaus
218dc66cf7 Filetransfer API should not wrap IOException
into SmackException.
2014-08-26 15:26:37 +02:00
Florian Schmaus
6af5d5e462 SDM: Follow guidelines, perform put() where get() is performed 2014-08-26 13:50:47 +02:00
Florian Schmaus
5d159c4be2 Make ServiceDiscoveryManager use constant PacketFilters 2014-08-26 13:50:47 +02:00
Florian Schmaus
191c4429da Fix FileTransferManager invoking request listeners
those need to be called asynchronously.

Also add a small API for that.
2014-08-26 13:50:42 +02:00
Florian Schmaus
856b4a6090 Make FaultTolerantNegotiator respect packetReplyTimeout 2014-08-26 12:04:52 +02:00
Florian Schmaus
f282323eec Extend RoomInfo to contain more meta-data
found in the extended disco info result form. See also
http://xmpp.org/extensions/xep-0045.html#disco-roominfo

Fixes SMACK-542

Also change getShortDescription() to getName()
2014-08-25 11:39:57 +02:00
Florian Schmaus
6a43fc7c36 Add shortDescription to RoomInfo
which is obtained from the disco#info result's identity. Fixes
SMACK-600.

Also make fields in RoomInfo final.
2014-08-24 20:00:35 +02:00
Florian Schmaus
e19cfa4d83 Introduce MUCRole and MUCAffiliation enums
Also rework MUCItem and parseItem to follow current coding guidelines.
2014-08-24 18:30:18 +02:00
Florian Schmaus
754bdada18 MultiUserChat grant/revoke Admin must use #admin namepsace
SMACK-371
2014-08-24 17:49:08 +02:00
Florian Schmaus
229e526f6d Make AbstractDelayInformationProvider handle empty string as reason 2014-08-21 19:47:31 +02:00
Florian Schmaus
76f8895ae3 Remove Pong class, add NAMESPACE to Ping
The Pong class was harmful, as people could try to use it with
PacketTypeFilter, which wouldn't work, a Pong is just a plain IQ result
without child XML.
2014-08-21 10:55:33 +02:00
Florian Schmaus
bbf89c65bf Fix typo in XmlStringBuilder, it's not an Angel
s/rightAngelBracket/rightAngleBracket/
2014-08-20 21:25:14 +02:00
Florian Schmaus
eeea0e34ca Add '::1' to the loopbackAddresses 2014-08-20 18:12:48 +02:00