Package org.jivesoftware.smack.packet

Examples of org.jivesoftware.smack.packet.Privacy


     * @param listName the list that has changed its content.
   */
  public void deletePrivacyList(String listName) throws XMPPException {
   
    // The request of the list is an privacy message with an empty list
    Privacy request = new Privacy();
    request.setPrivacyList(listName, new ArrayList());

    // Send the package to the server
    setRequest(request);
  }
View Full Code Here


  public PrivacyProvider() {
  }

  public IQ parseIQ(XmlPullParser parser) throws Exception {
        Privacy privacy = new Privacy();
        /* privacy.addExtension(PacketParserUtils.parsePacketExtension(parser
                .getName(), parser.getNamespace(), parser)); */
        privacy.addExtension(new DefaultPacketExtension(parser.getName(), parser.getNamespace()));
        boolean done = false;
        while (!done) {
            int eventType = parser.next();
            if (eventType == XmlPullParser.START_TAG) {
                if (parser.getName().equals("active")) {
                  String activeName = parser.getAttributeValue("", "name");
                  if (activeName == null) {
                    privacy.setDeclineActiveList(true);
                  } else {
                    privacy.setActiveName(activeName);
                  }
                }
                else if (parser.getName().equals("default")) {
                  String defaultName = parser.getAttributeValue("", "name");
                  if (defaultName == null) {
                    privacy.setDeclineDefaultList(true);
                  } else {
                    privacy.setDefaultName(defaultName);
                  }
                }
                else if (parser.getName().equals("list")) {
                    parseList(parser, privacy);
                }
View Full Code Here

TOP

Related Classes of org.jivesoftware.smack.packet.Privacy

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.