1 /** 2 * $RCSfile$ 3 * $Revision$ 4 * $Date$ 5 * 6 * Copyright 2003-2007 Jive Software. 7 * 8 * All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 */ 20 21 package org.jivesoftware.smackx; 22 23 import org.jivesoftware.smack.packet.PacketExtension; 24 import org.jivesoftware.smackx.packet.DiscoverInfo; 25 import org.jivesoftware.smackx.packet.DiscoverItems; 26 27 import java.util.List; 28 29 30 /** 31 * The NodeInformationProvider is responsible for providing supported indentities, features 32 * and hosted items (i.e. DiscoverItems.Item) about a given node. This information will be 33 * requested each time this XMPPP client receives a disco info or items requests on the 34 * given node. each time this XMPPP client receives a disco info or items requests on the 35 * given node. 36 * 37 * @author Gaston Dombiak 38 */ 39 public interface NodeInformationProvider { 40 41 /** 42 * Returns a list of the Items {@link org.jivesoftware.smackx.packet.DiscoverItems.Item} 43 * defined in the node. For example, the MUC protocol specifies that an XMPP client should 44 * answer an Item for each joined room when asked for the rooms where the use has joined. 45 * 46 * @return a list of the Items defined in the node. 47 */ 48 List<DiscoverItems.Item> getNodeItems(); 49 50 /** 51 * Returns a list of the features defined in the node. For 52 * example, the entity caps protocol specifies that an XMPP client 53 * should answer with each feature supported by the client version 54 * or extension. 55 * 56 * @return a list of the feature strings defined in the node. 57 */ 58 List<String> getNodeFeatures(); 59 60 /** 61 * Returns a list of the indentites defined in the node. For 62 * example, the x-command protocol must provide an identity of 63 * category automation and type command-node for each command. 64 * 65 * @return a list of the Identities defined in the node. 66 */ 67 List<DiscoverInfo.Identity> getNodeIdentities(); 68 69 /** 70 * Returns a list of the packet extensions defined in the node. 71 * 72 * @return a list of the packet extensions defined in the node. 73 */ 74 List<PacketExtension> getNodePacketExtensions(); 75 } 76