1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Streamline LastActivity API, add enable/disable

Allow LastActivity to be enabled/disabled. The API is now similar to the
ones of the other Managers. Added unit tests.
This commit is contained in:
Florian Schmaus 2014-03-23 14:18:41 +01:00
parent 978f692eb0
commit 010a86444a
4 changed files with 146 additions and 52 deletions

View file

@ -17,7 +17,9 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.Presence;
/**
* Filters for packets of a particular type. The type is given as a Class object, so
@ -32,6 +34,9 @@ import org.jivesoftware.smack.packet.Packet;
*/
public class PacketTypeFilter implements PacketFilter {
public static final PacketTypeFilter PRESENCE = new PacketTypeFilter(Presence.class);
public static final PacketTypeFilter MESSAGE = new PacketTypeFilter(Message.class);
Class<? extends Packet> packetType;
/**