mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-12 02:29:38 +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
|
@ -42,6 +42,7 @@ public class DiscoverInfoProvider implements IQProvider {
|
|||
String name = "";
|
||||
String type = "";
|
||||
String variable = "";
|
||||
String lang = "";
|
||||
discoverInfo.setNode(parser.getAttributeValue("", "node"));
|
||||
while (!done) {
|
||||
int eventType = parser.next();
|
||||
|
@ -51,6 +52,7 @@ public class DiscoverInfoProvider implements IQProvider {
|
|||
category = parser.getAttributeValue("", "category");
|
||||
name = parser.getAttributeValue("", "name");
|
||||
type = parser.getAttributeValue("", "type");
|
||||
lang = parser.getAttributeValue(parser.getNamespace("xml"), "lang");
|
||||
}
|
||||
else if (parser.getName().equals("feature")) {
|
||||
// Initialize the variables from the parsed XML
|
||||
|
@ -64,8 +66,9 @@ public class DiscoverInfoProvider implements IQProvider {
|
|||
} else if (eventType == XmlPullParser.END_TAG) {
|
||||
if (parser.getName().equals("identity")) {
|
||||
// Create a new identity and add it to the discovered info.
|
||||
identity = new DiscoverInfo.Identity(category, name);
|
||||
identity.setType(type);
|
||||
identity = new DiscoverInfo.Identity(category, name, type);
|
||||
if (lang != null)
|
||||
identity.setLanguage(lang);
|
||||
discoverInfo.addIdentity(identity);
|
||||
}
|
||||
if (parser.getName().equals("feature")) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue