mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
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
This commit is contained in:
parent
1cdb86989a
commit
21be8c55ee
33 changed files with 2395 additions and 88 deletions
|
@ -63,6 +63,11 @@ public final class SmackConfiguration {
|
|||
*/
|
||||
private static int defaultPingInterval = 1800; // 30 min (30*60)
|
||||
|
||||
/**
|
||||
* This automatically enables EntityCaps for new connections if it is set to true
|
||||
*/
|
||||
private static boolean autoEnableEntityCaps = false;
|
||||
|
||||
private SmackConfiguration() {
|
||||
}
|
||||
|
||||
|
@ -115,6 +120,9 @@ public final class SmackConfiguration {
|
|||
else if (parser.getName().equals("defaultPingInterval")) {
|
||||
defaultPingInterval = parseIntProperty(parser, defaultPingInterval);
|
||||
}
|
||||
else if (parser.getName().equals("autoEnableEntityCaps")) {
|
||||
autoEnableEntityCaps = Boolean.parseBoolean(parser.nextText());
|
||||
}
|
||||
}
|
||||
eventType = parser.next();
|
||||
}
|
||||
|
@ -329,6 +337,23 @@ public final class SmackConfiguration {
|
|||
SmackConfiguration.defaultPingInterval = defaultPingInterval;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if Entity Caps are enabled as default for every new connection
|
||||
* @return
|
||||
*/
|
||||
public static boolean autoEnableEntityCaps() {
|
||||
return autoEnableEntityCaps;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set if Entity Caps are enabled or disabled for every new connection
|
||||
*
|
||||
* @param true if Entity Caps should be auto enabled, false if not
|
||||
*/
|
||||
public static void setAutoEnableEntityCaps(boolean b) {
|
||||
autoEnableEntityCaps = b;
|
||||
}
|
||||
|
||||
private static void parseClassToLoad(XmlPullParser parser) throws Exception {
|
||||
String className = parser.nextText();
|
||||
// Attempt to load the class so that the class can get initialized
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue