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

408 commits

Author SHA1 Message Date
Florian Schmaus
717d39c8fc Fix caps support (SMACK-361, SMACK-459).
SMACK-459 splitted the SDM identities over two member variables which
are joined by getIdentities(), therefore this method must be used to
calculated the hash for entity caps.

Also recalculate the hash if an identity is added/remvoed/changed.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13801 b35dd754-fafc-0310-a699-88a17e54d16e
2013-11-04 20:58:36 +00:00
Florian Schmaus
385cfac9fa SMACK-459 Make it user proof by returning an unmodifiable set again
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13797 b35dd754-fafc-0310-a699-88a17e54d16e
2013-10-31 20:28:40 +00:00
Florian Schmaus
6fa2cbee68 SMACK-459 actually add the defaultIdentity to the result of getIdentities()
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13796 b35dd754-fafc-0310-a699-88a17e54d16e
2013-10-31 20:24:02 +00:00
Florian Schmaus
addf9ea6cd SMACK-459 Add option to configure the default identity in ServiceDiscoveryManager
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13790 b35dd754-fafc-0310-a699-88a17e54d16e
2013-10-26 23:50:59 +00:00
Florian Schmaus
c4014b8ba9 SMACK-441 ServiceDiscoveryManager identities should be non-static and kept in a Set to allow multiple identities as per XEP-0030
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13783 b35dd754-fafc-0310-a699-88a17e54d16e
2013-10-22 14:43:23 +00:00
rcollier
dac68c64a9 Merge from 3.3 branch
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13663 b35dd754-fafc-0310-a699-88a17e54d16e
2013-05-18 16:56:52 +00:00
Florian Schmaus
2195d66e4d SMACK-439
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13649 b35dd754-fafc-0310-a699-88a17e54d16e
2013-05-12 14:51:50 +00:00
Florian Schmaus
37f6bf12da SMACK-438 Avoid NPE when the weak reference is null. Add InvitationsMonitor as strong reference within getInvitationsMonitor and return it within the block so it can't get gc'ed between put() and get().
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13648 b35dd754-fafc-0310-a699-88a17e54d16e
2013-05-12 14:51:41 +00:00
Florian Schmaus
6b70974269 SMACK-437 Replaced 'String.isEmpty()' with 'String.length() > 0'
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13631 b35dd754-fafc-0310-a699-88a17e54d16e
2013-05-03 09:48:41 +00:00
rcollier
238ce7aac3 SMACK-415 Added code that was mistakenly removed to handle optional node attribute
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13625 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-29 11:40:49 +00:00
rcollier
f0d729ef52 SMACK-415 Added fix for handling the empty tag case.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13624 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-27 15:37:21 +00:00
rcollier
13d87e3d40 SMACK-361 Changed default for filename encoding to Base 32 (which should work on all file systems) and added a Base 64 filename and url safe implementation of the StringEncoder.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13619 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-20 21:55:27 +00:00
rcollier
9f0f676151 SMACK-403 Pulling this contribution until the related specs reach a draft status
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13611 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-16 01:50:41 +00:00
rcollier
3a4b05ac00 SMACK-412 Abstracted the keepalive implementation and set the thread to start and stop on demand.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13610 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-16 01:39:17 +00:00
rcollier
b4432d7627 SMACK-352 Changed or removed copyright notices that should not have been attributed to Jive Software.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13604 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-07 19:15:32 +00:00
rcollier
b28037bc79 SMACK-331 Changed methods to existing Smack conventions and moved interface to top level.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13601 b35dd754-fafc-0310-a699-88a17e54d16e
2013-04-02 00:23:55 +00:00
rcollier
0fdfd6e75e SMACK-361 Some general code cleanup added some missing hashcode methods and added back some removed public API methods (marked as deprecated).
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13598 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-31 14:24:50 +00:00
rcollier
58f56ee31b SMACK-413 Put removed public method back in and marked as deprecated. We can remove in major release.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13592 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-24 15:02:25 +00:00
rcollier
d1fdd497d9 SMACK-415 Applied patch to fix improper use of parser.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13590 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 22:18:38 +00:00
rcollier
a14178990b SMACK-412 Added the pingMyServer back in, cleaned up unneeded synchronization and removed minimum ping interval.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13588 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 11:59:08 +00:00
Florian Schmaus
07a0b8f722 SMACK-413 fixed vCard parsing regarding the PHOTO element. Moved vCard test cases to unit-test where appropriate. Added testcases for vCard PHOTO parsing.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13586 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 00:30:59 +00:00
Florian Schmaus
374a12b73a Document how an Avatar can be removed from a vCard. Add a convenience method.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13585 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 00:30:44 +00:00
Florian Schmaus
638d34fd06 SMACK-413 fixed vCard parsing regarding the PHOTO element. Moved vCard test cases to unit-test where appropriate. Added testcases for vCard PHOTO parsing.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13584 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 00:27:14 +00:00
Florian Schmaus
ca2f8efe60 Document how an Avatar can be removed from a vCard. Add a convenience method.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13583 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-23 00:26:42 +00:00
Florian Schmaus
6aa195eb88 SMACK-382 Prevent memory leak in AdHocCommandManager by only creating the Thread if it's actually needed
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13582 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-22 18:15:21 +00:00
Florian Schmaus
a7d73993b0 SMACK-430 Re-activated code that throws an exception if createOutgoingFileTransfer() was called with a bare JID
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13580 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-22 18:15:06 +00:00
Florian Schmaus
ebfe3e69ed SMACK-382 Prevent memory leak in AdHocCommandManager by only creating the Thread if it's actually needed
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13578 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-22 18:14:15 +00:00
Florian Schmaus
b091f6161e SMACK-430 Re-activated code that throws an exception if createOutgoingFileTransfer() was called with a bare JID
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13576 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-22 18:14:01 +00:00
rcollier
aab1dcdabe SMACK-412 Split the ping implementation to a server ping to replace keepalive and a simplified ping manager for manual pings of other entities.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13569 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-19 02:37:36 +00:00
Florian Schmaus
21be8c55ee SMACK-361 Added support for Entity Capabilities.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/branches/smack_3_3_0@13560 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-18 08:50:48 +00:00
Florian Schmaus
9123578ea5 SMACK-361 Added support for Entity Capabilities.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13558 b35dd754-fafc-0310-a699-88a17e54d16e
2013-03-18 08:40:35 +00:00
Florian Schmaus
5c6f257027 SMACK-388
Use ScheduledExecutorService.
Set ping received when pinging another entity.
Refactored PacketListener and ConnectionListeners as anonymous inner-classes

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13531 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-27 22:49:04 +00:00
Florian Schmaus
4060a97b65 SMACK-345: Improved detection of last activity. Properly synchronized access to lastMessageSent and registerd last activity namespace with ServiceDiscoveryManager. Improved LastActivity Provider
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13475 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-14 00:00:54 +00:00
Florian Schmaus
ddabe436b4 PingManager: Fixed imports
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13474 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-14 00:00:26 +00:00
Florian Schmaus
1a170c1561 ServiceDiscoveryManager: Use 'Set' as data structure for features to prevent reporting duplicate features
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13465 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-11 17:22:42 +00:00
Florian Schmaus
7723b9fcfd ServiceDiscoveryManager: Anounce 'disco#info' and 'disco#items' on service discovery queries in accordance with XEP-0030
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13464 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-11 17:22:31 +00:00
Florian Schmaus
b907d606d9 SMACK-352 removed duplicated headers, fixed svn keywords
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13459 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-07 19:10:22 +00:00
Florian Schmaus
a686b4c092 Update MultiUserChat to use the correct namespace according to the latest version of XEP-0045.
Newer versions for XEP-0045 (MUC) use muc#admin for all onwer related operations.
Fixes SMACK-371. Credits and thanks go to Colby White for reporting this.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13458 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-07 19:08:05 +00:00
Florian Schmaus
6bbf425157 SMACK-352
- fixed wrong header
- replaced old Jive license with Apache 2.0 license
- added license header to files without

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13457 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-07 14:19:47 +00:00
rcollier
14f139f642 Fixed small problem in one field and removed possible NPE on get from any field.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13454 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-07 03:57:38 +00:00
rcollier
d1e9d81769 SMACK-341 Updated collectors to use concurrent classes.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13452 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-07 03:42:33 +00:00
Florian Schmaus
04cea9e28c SMACK-395 Forgot to actually add the discovered proxies
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13441 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 21:59:07 +00:00
Florian Schmaus
592135c0e9 SMACK-395 Socks5BytestreamManager.establishConnection(): Don't bail out with an Exception uf the local XMPP service does not support Service Discovery (e.g. talk.google.com). Instead remember the Exception and give the local proxy (if enabled) a chance.
Also compute the digest only if it's really needed, that is when streamHosts is not empty.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13440 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 21:36:39 +00:00
Florian Schmaus
0ca8b726bd PubSub SubcribeForm: Use new StringUtils.formatXEP0082Date to get the correct date string. Note that the previous used SimpleDateFormat "yyyy-MM-dd'T'HH:mm:ss.SSSZ" did not produce XEP-0082 conforming strings, since Z is replace with e.g. '+0100' whereas it should be '+01:00'.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13434 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 13:33:15 +00:00
Florian Schmaus
ca78c5be49 String.isEmpty() only comes with Android API level 9 (or higher). Switching back to old isEmptyString check, making Smack Android compatible again
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13432 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 11:04:00 +00:00
Florian Schmaus
bfefbdb777 Implement XEP-0184 delivery notifications
This patch provides three components required to implement XEP-0184:

 * DeliveryReceiptRequest is a PacketExtension to request a receipt
 * DeliveryReceipt is a PacketExtension that contains the receipt
 * DeliveryReceiptManager to handle sending/receiving of requests and
   receipts.

Implementation:

For requesting a receipt, just add a new DeliveryReceiptRequest() to
your message or use the helper function:

    DeliveryReceiptManager.addDeliveryReceiptRequest(packet);

Register a ReceiptReceivedListener to find out if your packet arrived:

    DeliveryReceiptManager.getInstanceFor(myConnection)
	.registerReceiptReceivedListener(new ReceiptReceivedListener() {
	    @Override public void onReceiptReceived(String fromJid,
				    String toJid, String receiptId) {
		// receipt received for packet id receiptId
	    }

To answer a receipt request, you can either check incoming packets
manually:

    if (DeliveryReceiptManager.hasDeliveryReceiptRequest(packet)) {
	// send receipt
    }

Or you can enable automatic receipt transmission with:

    DeliveryReceiptManager.getInstanceFor(myConnection)
	    .setAutoReceiptsEnabled(true);

Signed-Off-By: Georg Lukas <georg@op-co.de>

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13431 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 09:53:56 +00:00
rcollier
f0cd048635 Added check for missing field type for multi list in data forms.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13430 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 03:53:53 +00:00
rcollier
1d36ae8db4 SMACK-391 Moved all date parsing into StringUtils and made it much more robust in handling multiple valid and invalid formats.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13428 b35dd754-fafc-0310-a699-88a17e54d16e
2013-02-04 03:45:37 +00:00
Florian Schmaus
e75f45082b SMACK-270 MultiUserChat relied on finalize() being called in order to remove packet listeners and the association with RoomListenerMultiplexor. The PacketListeners are referenced by Connection, which meant that MultiUserChat is always strongly reachable until the connection dies.
This patch introduces an new MultiUserChat.cleanup() method that is called when userHashLeft() is triggered.

Thanks to Stuart Chalmers and scgmile for reporting this.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13418 b35dd754-fafc-0310-a699-88a17e54d16e
2013-01-31 22:30:49 +00:00
Florian Schmaus
a75d2d7d0d SMACK-375 Properly escape Strings in DiscoverInfo and DiscoverItems for XML.
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@13417 b35dd754-fafc-0310-a699-88a17e54d16e
2013-01-31 22:30:36 +00:00